chore: 注释说明

This commit is contained in:
dap 2025-03-08 19:57:56 +08:00
parent a9b7bf6442
commit 8ed893fb21
2 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,10 @@
<!--
2025年03月08日重构为原生表单(反向重构??)
该文件作为例子 使用原生表单而非useVbenForm
-->
<script setup lang="ts">
import type { RuleObject } from 'ant-design-vue/es/form';
import { computed, ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
@ -46,6 +52,10 @@ const defaultValues: FormData = {
* 表单数据ref
*/
const formData = ref(defaultValues);
type AntdFormRules<T> = Partial<Record<keyof T, RuleObject[]>> & {
[key: string]: RuleObject[];
};
/**
* 表单校验规则
*/

View File

@ -1,11 +0,0 @@
import type { RuleObject } from 'ant-design-vue/es/form';
declare global {
type AntdFormRules<T> = {
[key: string]: RuleObject[];
} & {
[K in keyof T]?: RuleObject[];
};
}
export {};