赞
踩
vxe-table表格回显勾选复选框,我看官网是直接把行参数传过去,老是回显不对,后来把回显的几条数据每条分别勾选才可以,看代码,同时表格要有 row-id="id",这个很重要
- const setSelectRow = (rows: RowVO[], checked: boolean) => {
- checkedList.value = rows;
- const $table = tableRef.value.xTable1 as any;
- if ($table) {
- checkedList.value.forEach((item: any, index: any) => {
- $table.setCheckboxRow([item], checked);
- // $table.toggleCheckboxRow(item);
- });
- }
- };
效果图
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。