From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/types/form.d.ts |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/src/types/form.d.ts b/src/types/form.d.ts
new file mode 100644
index 0000000..980c8cc
--- /dev/null
+++ b/src/types/form.d.ts
@@ -0,0 +1,44 @@
+import type { CSSProperties } from 'vue'
+import { ColProps, ComponentProps, ComponentName } from '@/types/components'
+import type { AxiosPromise } from 'axios'
+
+export type FormSetPropsType = {
+  field: string
+  path: string
+  value: any
+}
+
+export type FormValueType = string | number | string[] | number[] | boolean | undefined | null
+
+export type FormItemProps = {
+  labelWidth?: string | number
+  required?: boolean
+  rules?: Recordable
+  error?: string
+  showMessage?: boolean
+  inlineMessage?: boolean
+  style?: CSSProperties
+}
+
+export type FormSchema = {
+  // 鍞竴鍊�
+  field: string
+  // 鏍囬
+  label?: string
+  // 鎻愮ず
+  labelMessage?: string
+  // col缁勪欢灞炴��
+  colProps?: ColProps
+  // 琛ㄥ崟缁勪欢灞炴�э紝slots瀵瑰簲鐨勬槸琛ㄥ崟缁勪欢鐨勬彃妲斤紝瑙勫垯锛�${field}-xxx锛屽叿浣撳彲浠ユ煡鐪媏lement-plus鏂囨。
+  componentProps?: { slots?: Recordable } & ComponentProps
+  // formItem缁勪欢灞炴��
+  formItemProps?: FormItemProps
+  // 娓叉煋鐨勭粍浠�
+  component?: ComponentName
+  // 鍒濆鍊�
+  value?: FormValueType
+  // 鏄惁闅愯棌
+  hidden?: boolean
+  // 杩滅▼鍔犺浇涓嬫媺椤�
+  api?: <T = any>() => AxiosPromise<T>
+}

--
Gitblit v1.8.0