最近在开发过程中用到了vxe table
根据需求需要根据接口参数默认勾选
在网上找到了相关方法
// 假设你已经有一个表格实例 table
const table = this.$refs.xTable;
// 设置第一行的复选框为选中状态
table.setCheckboxRow(table.getData()[0], true);
// 或者使用行的唯一标识(rowId)来设置
table.setCheckboxRow(‘rowId’, true);
//清空当页勾选
this.refs.reftabletask.clearCheckboxRow();//清空其他页勾选this.refs.ref_table_task.clearCheckboxRow();
//清空其他页勾选
this.refs.reftabletask.clearCheckboxRow();//清空其他页勾选this.refs.ref_table_task.clearCheckboxReserve();
希望能够帮到你~
看到这如果对你有用就收藏加关注吧~
点个关注不迷路~~~~

1391

被折叠的 条评论
为什么被折叠?



