element table复选框回显报错

toggleRowSelection总报错
Cannot read properties of undefined (reading 'toggleRowSelection')
因为toggleRowSelection要在dom选然后才可以调用
解决:加nextTick

this.$nextTick(() => {
    
    
// this.$refs.leftTable.toggleRowSelection(row, true)
})

猜你喜欢

转载自blog.csdn.net/q249859693/article/details/127928012
今日推荐