chore: 注释说明
This commit is contained in:
parent
a9b7bf6442
commit
8ed893fb21
@ -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[];
|
||||
};
|
||||
/**
|
||||
* 表单校验规则
|
||||
*/
|
||||
|
11
apps/web-antd/types/antd.d.ts
vendored
11
apps/web-antd/types/antd.d.ts
vendored
@ -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 {};
|
Loading…
Reference in New Issue
Block a user