Hidden display of pictures in vue+el-table?

clipboard.png

vue+vue+el-table, , , , , false, , , this

,
clipboard.png

html

<el-table-column width="70">
    <template slot-scope="scope">
        <div class="switch">
            <img class="suspend" v-if="suspendBtn" @click="start(scope.row)" src="../../../../assets/index/start_hover.png">
            <img class="start" v-if="startBtn" @click="suspend" src="../../../../assets/index/suspended.png">
        </div>
    </template>
</el-table-column>

js

  data() {
    return {
      startBtn: false,
      suspendBtn: true,
    };
  },
   methods: {
    start() {
        this.startBtn = true;
        this.suspendBtn = false;
    },
    suspend() {
        this.startBtn = false;
        this.suspendBtn = true;
    }
  }
Mar.24,2021

make sure both methods are written in methods? Why do I look like I'm writing in data


the event bound by each of your buttons is the same. When startBtn changes, of course
the idea is wrong
you can save the playback index, and click on this currently played index


because each suspendBtn,startBtn is the same, and you can put it in the data of each row of the table, just like your time data.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bfe7-4131c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bfe7-4131c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?