<el-table-column prop="isCheck" label="權(quán)限操作" :key="isCheckAllOperate">
<template slot="header">
<span>
<el-checkbox v-model="isCheckAllOperate" :checked="isCheckAllOperate" @change="isCheckAllOperateChange" :disabled="isDisabled"></el-checkbox>
<span style="margin-left: 5px;">權(quán)限操作</span>
</span>
</template>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isCheck" @change="checkMenuOperChange(scope.row)" :disabled="isDisabled"></el-checkbox>
</template>
</el-table-column>
在代碼中更改isCheckAllOperate,發(fā)現(xiàn)復(fù)選框不隨著isCheckAllOperate而選中或不選中朽砰,加了key就解決了得运,key最好跟你要變化的數(shù)據(jù)有關(guān)膝蜈,比如這里的isCheckAllOperate。