fix: TableAction 批量删除 disabled 控制

pull/132/head
puhui999 2025-06-06 16:12:11 +08:00
parent 2abe2e21bc
commit ffdccfb19b
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import type { Demo01ContactApi } from '#/api/infra/demo/demo01';
import { ref } from 'vue'; import { ref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui'; import { Page, useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart } from '@vben/utils'; import {downloadFileFromBlobPart, isEmpty} from '@vben/utils';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
@ -151,6 +151,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
label: '批量删除', label: '批量删除',
type: 'primary', type: 'primary',
danger: true, danger: true,
disabled: isEmpty(checkedIds),
icon: ACTION_ICON.DELETE, icon: ACTION_ICON.DELETE,
auth: ['infra:demo01-contact:delete'], auth: ['infra:demo01-contact:delete'],
onClick: handleDeleteBatch, onClick: handleDeleteBatch,