feat(@vben/web-antd): vxe-table)新增表单验证功能

- 在 vxe-table.ts 中添加 createRequiredValidation函数
- 在 data.ts 中使用 createRequiredValidation 替代原有的 className 函数
- 在 vxe-table 插件中添加 validation 相关的工具函数
- 优化表格列的验证逻辑,提高代码复用性和可维护性
This commit is contained in:
nehc
2025-08-02 23:28:59 +08:00
parent 5f56b14733
commit c64be886b4
4 changed files with 69 additions and 17 deletions

View File

@@ -7,6 +7,7 @@ import { IconifyIcon } from '@vben/icons';
import { $te } from '@vben/locales';
import {
AsyncComponents,
createRequiredValidation,
setupVbenVxeTable,
useVbenVxeGrid,
} from '@vben/plugins/vxe-table';
@@ -354,7 +355,7 @@ setupVbenVxeTable({
useVbenForm,
});
export { useVbenVxeGrid };
export { createRequiredValidation, useVbenVxeGrid };
const [VxeTable, VxeColumn, VxeToolbar] = AsyncComponents;
export { VxeColumn, VxeTable, VxeToolbar };