New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
列表数据勾选禁用后仍能勾选问题,显示选的数据条数也是错误的 #791
Comments
zy |
更改后验证没问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本号:V3.5.5
问题描述:
列表数据勾选禁用后,单点勾选是不能勾选的,如果点击全部勾选,禁用的也将被勾选,勾选后显示选的数据条数没有排除禁用的
截图&代码:
![image](https://github.com/jeecgboot/jeecgboot-vue3/assets/34854608/de2b5c67-e649-49fe-80aa-b2ccc1d5d8d2) const [registerTable, { reload }, { selectedRowKeys, selectedRows }] = tableContext;const rowSelection = {
type: 'checkbox',
columnWidth: 50,
selectedRowKeys: selectedRowKeys,
selectedRows: selectedRows,
getCheckboxProps(record: Recordable) {
//判断条件可随意
if (2 == record.izShow) {
return { disabled: true };
} else {
return { disabled: false };
}
},
onChange: onSelectChange,
};
/**
*/
function onSelectChange(rowKeys, rows) {
if (rows) {
//判断条件可随意
const newRows = rows.filter((item) => 2 !== item.izShow);
selectedRows.value = newRows;
const newRowKeys = newRows.map((item) => toRaw(item).id);
selectedRowKeys.value = newRowKeys;
checkedKeys.value = newRowKeys.length;
}
}
友情提示(为了提高issue处理效率):
The text was updated successfully, but these errors were encountered: