1.el-table标签上加上属性
ref=“mul” row-key=“key”(这个key是表格数据的唯一指示id,数据如果是id就用id)
2.表格中加上选择框
3.代码中调用:
_this.$refs.mul.toggleRowSelection(select[i],true)
这里的select[i]是你想
vue表格默认选中行
最新推荐文章于 2024-05-06 10:27:00 发布
1.el-table标签上加上属性
ref=“mul” row-key=“key”(这个key是表格数据的唯一指示id,数据如果是id就用id)
2.表格中加上选择框
3.代码中调用:
_this.$refs.mul.toggleRowSelection(select[i],true)
这里的select[i]是你想