fix: 兼容最新版本vxe的勾选api

This commit is contained in:
dap 2025-04-04 01:46:53 +08:00
parent fe53c33821
commit 116fe39b8d

View File

@ -317,7 +317,7 @@ function getKeys(records: MenuPermissionOption[], addCurrent: boolean) {
function getCheckedKeys() {
//
if (association.value) {
const records = tableApi?.grid?.getCheckboxRecords?.() ?? [];
const records = tableApi?.grid?.getCheckboxRecords?.(true) ?? [];
//
const nodeKeys = getKeys(records, true);
//
@ -329,7 +329,7 @@ function getCheckedKeys() {
//
//
const records = tableApi?.grid?.getCheckboxRecords?.() ?? [];
const records = tableApi?.grid?.getCheckboxRecords?.(true) ?? [];
// permissions
const allRecords = tableApi?.grid?.getData?.() ?? [];
// ids