header 中即时不应用 scope,也要把插槽加上(slot-scope=”scope”),否则 change 之后无奈回显表头中 checkbox 的勾选状态!!!!!
<el-table-column prop="ischecked" >
<template slot="header" slot-scope="scope">
<el-checkbox
v-model="istableallsearch"
@change="tableAllchecked">{{istableallsearch}}</el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox
:disabled="scope.row.disabled"
v-model="scope.row.ischecked"
@change="checkSingle"></el-checkbox>
</template>
</el-table-column>
我找了一个小时 BUG,真想反手给本人一巴掌 / 香甜