chore: 点行会勾选/取消全部权限 点权限不会勾选行

This commit is contained in:
dap 2025-01-06 14:27:00 +08:00
parent d1ef1192b2
commit 5033ea2e82

View File

@ -14,7 +14,11 @@ import { uniq } from 'lodash-es';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { columns, nodeOptions } from './data';
import { menusWithPermissions, rowAndChildrenChecked } from './helper';
import {
menusWithPermissions,
rowAndChildrenChecked,
setPermissionsChecked,
} from './helper';
import { useFullScreenGuide } from './hook';
defineOptions({
@ -112,17 +116,19 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
gridEvents: {
//
checkboxChange: (params) => {
//
if (!association.value) {
updateCheckedNumber();
return;
}
//
const checked = params.checked;
//
const record = params.row;
//
rowAndChildrenChecked(record, checked);
if (association.value) {
//
//
rowAndChildrenChecked(record, checked);
} else {
//
// /
setPermissionsChecked(record, checked);
}
updateCheckedNumber();
},
//