el table表格怎么刷新保持打钩,我这样写问什么不行
<el-table ref="singleTable" @selection-change='selectCall' :data="dotableData" highlight-current-row style="width: 97%">
<el-table-column type="selection" width="55"></el-table-column>
</el-table>
dotableData: [
{
code: "123",
createTime: "2019-07-10 20:36:00",
},
{
code: "123333",
createTime: "2019-07-10 20:36:00",
}
],
mounted() {
this.$refs.singleTable.toggleRowSelection(this.dotableData[0],true);
},
那可能需要你选中之后存储相关数据,刷新之后调用
toggleRowSelection
方法更新:调用
toggleRowSelection
的时候异步缓冲一下