<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="900px"
:before-close="handleClose"
>
<el-table
ref="tableData"
height="300"
:data="deta"
border
>
<el-table-column
prop="read"
label="只读"
align="center"
>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.read" :checked="scope.row.read" @change="changeRead(scope.row,scope.$index)" :key="keyTable" />
</template>
</el-table-column>
<el-table/>
<el-dialog/>
js中只需要改变keyTable的值就行了,每次点击更新一次keyTable
changeRead (e, i) {
this.keyTable = Math.random() // Math.random()是获取一个随机小数来代替key值
},