今天遇到一个很奇怪的bug,在使用el-table头部插槽中使用了el-checkbox,导致我怎么点击复选框就是不改变
在控制台打印了el-checkbox 身上 v-model 的值,值是改变了但视图就是不更新,以至于我使用了this. s e t 和 t h i s . set 和 this. set和this.fuorceUpdate() 连 v-if 我都用上了,发现就是不好使,后来发现我在使用了 的时候没有使用 slot-scope=‘scope’ , 当时把我腿打断我都没想到问题会出现在这里,看下面代码块。
<el-table>
<el-table-column slot='header' **slot-scope='scope'**>
</el-table-column>`
</el-table>``
// 解决办法就是 slot-scope='scope' 一定要加上 。
具体原因还在找....