@dazhicheng/ui 1.4.22 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/components/tt-drawer/index.d.ts +3703 -0
  2. package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +2121 -0
  3. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.d.ts +94 -0
  4. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.d.ts +27 -0
  5. package/dist/components/tt-drawer/src/hooks/useDrawerRender.d.ts +10 -0
  6. package/dist/components/tt-drawer/src/hooks/useResizable.d.ts +9 -0
  7. package/dist/components/tt-drawer/src/index.d.ts +10 -0
  8. package/dist/components/tt-drawer/src/props.d.ts +99 -0
  9. package/dist/components/tt-drawer/src/typing.d.ts +154 -0
  10. package/dist/components/tt-drawer/src/utils/drawer-api.d.ts +87 -0
  11. package/dist/components/tt-form/src/config.d.ts +2 -2
  12. package/dist/components/tt-form/src/types.d.ts +6 -5
  13. package/dist/components/tt-form-item-error-tooltip/index.d.ts +1466 -2
  14. package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +734 -2
  15. package/dist/components/tt-modal/index.d.ts +112 -111
  16. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +57 -57
  17. package/dist/components/tt-modal/src/components/ModalFooter.vue.d.ts +5 -5
  18. package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +5 -5
  19. package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +22 -20
  20. package/dist/components/tt-modal/src/index.d.ts +5 -6
  21. package/dist/components/tt-modal/src/typing.d.ts +5 -5
  22. package/dist/components/tt-select/index.d.ts +2 -3
  23. package/dist/components/tt-select/src/Select.vue.d.ts +71 -71
  24. package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +8 -8
  25. package/dist/components/tt-select/src/components/Table.vue.d.ts +12 -12
  26. package/dist/components/tt-select/src/hooks/useDataSource.d.ts +8 -8
  27. package/dist/components/tt-select/src/hooks/useGrid.d.ts +2 -2
  28. package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +3 -3
  29. package/dist/components/tt-select/src/hooks/useSelect.d.ts +7 -7
  30. package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +16 -16
  31. package/dist/components/tt-select/src/props.d.ts +14 -14
  32. package/dist/components/tt-select/src/types/index.d.ts +15 -15
  33. package/dist/components/tt-table/src/Table.vue.d.ts +12 -12
  34. package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +2 -2
  35. package/dist/index.d.ts +1 -0
  36. package/dist/index.js +8633 -7906
  37. package/dist/style.css +1 -1
  38. package/package.json +1 -1
  39. /package/dist/components/tt-form/src/components/{formActions.vue.d.ts → FormActions.vue.d.ts} +0 -0
  40. /package/dist/components/tt-form/src/{useForm.vue.d.ts → index.vue.d.ts} +0 -0
@@ -0,0 +1,94 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: Readonly<{
4
+ /** 底部前置插入 */
5
+ insertFooter: () => void;
6
+ /** 底部中间插入 */
7
+ centerFooter: () => void;
8
+ /** 底部后置插入 */
9
+ appendFooter: () => void;
10
+ /** 底部插槽 */
11
+ footer: () => void;
12
+ }> & {
13
+ /** 底部前置插入 */
14
+ insertFooter: () => void;
15
+ /** 底部中间插入 */
16
+ centerFooter: () => void;
17
+ /** 底部后置插入 */
18
+ appendFooter: () => void;
19
+ /** 底部插槽 */
20
+ footer: () => void;
21
+ };
22
+ refs: {};
23
+ rootEl: HTMLDivElement;
24
+ };
25
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
26
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
27
+ confirmLoading: any;
28
+ showCancelBtn: any;
29
+ cancelButtonProps: {
30
+ type: import('vue').PropType<Partial<import('element-plus').ButtonProps>>;
31
+ default: Partial<import('element-plus').ButtonProps>;
32
+ };
33
+ cancelText: any;
34
+ showOkBtn: any;
35
+ okButtonProps: {
36
+ type: import('vue').PropType<Partial<import('element-plus').ButtonProps>>;
37
+ default: Partial<import('element-plus').ButtonProps>;
38
+ };
39
+ okText: any;
40
+ okType: any;
41
+ showFooter: any;
42
+ footerHeight: {
43
+ type: import('vue').PropType<string | number>;
44
+ default: number;
45
+ };
46
+ height: any;
47
+ size: any;
48
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
49
+ close: (e: any) => any;
50
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
51
+ confirmLoading: any;
52
+ showCancelBtn: any;
53
+ cancelButtonProps: {
54
+ type: import('vue').PropType<Partial<import('element-plus').ButtonProps>>;
55
+ default: Partial<import('element-plus').ButtonProps>;
56
+ };
57
+ cancelText: any;
58
+ showOkBtn: any;
59
+ okButtonProps: {
60
+ type: import('vue').PropType<Partial<import('element-plus').ButtonProps>>;
61
+ default: Partial<import('element-plus').ButtonProps>;
62
+ };
63
+ okText: any;
64
+ okType: any;
65
+ showFooter: any;
66
+ footerHeight: {
67
+ type: import('vue').PropType<string | number>;
68
+ default: number;
69
+ };
70
+ height: any;
71
+ size: any;
72
+ }>> & Readonly<{
73
+ onClose?: ((e: any) => any) | undefined;
74
+ }>, {
75
+ size: any;
76
+ height: any;
77
+ showFooter: any;
78
+ showOkBtn: any;
79
+ showCancelBtn: any;
80
+ cancelText: any;
81
+ okText: any;
82
+ confirmLoading: any;
83
+ footerHeight: string | number;
84
+ okButtonProps: Partial<import('element-plus').ButtonProps>;
85
+ cancelButtonProps: Partial<import('element-plus').ButtonProps>;
86
+ okType: any;
87
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
88
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
89
+ export default _default;
90
+ type __VLS_WithTemplateSlots<T, S> = T & {
91
+ new (): {
92
+ $slots: S;
93
+ };
94
+ };
@@ -0,0 +1,27 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: Readonly<{
4
+ title: () => void;
5
+ }> & {
6
+ title: () => void;
7
+ };
8
+ refs: {};
9
+ rootEl: HTMLDivElement;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
13
+ /** 标题 */
14
+ title: any;
15
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
+ /** 标题 */
17
+ title: any;
18
+ }>> & Readonly<{}>, {
19
+ title: any;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,10 @@
1
+ import { App, Component } from 'vue';
2
+ import { DrawerOptions } from '..';
3
+ import { TtDrawerApiOptions, TtDrawerExtendedDrawerApi, TtDrawerProps } from '../typing';
4
+ import { DrawerApi } from '../utils/drawer-api';
5
+ export declare function setDefaultDrawerProps(props: Partial<TtDrawerProps>): void;
6
+ /**
7
+ * drawer 可选hooks
8
+ */
9
+ export declare function useDrawerRender<TParentDrawerProps extends TtDrawerProps = TtDrawerProps>(options?: TtDrawerApiOptions, DRAWER_KEY?: symbol): readonly [import('vue').DefineSetupFnComponent<TParentDrawerProps, {}, {}, TParentDrawerProps & {}, import('vue').PublicProps>, TtDrawerExtendedDrawerApi] | readonly [import('vue').DefineSetupFnComponent<Partial<TtDrawerProps>, {}, {}, Partial<TtDrawerProps> & {}, import('vue').PublicProps>, DrawerApi];
10
+ export declare function showTtDrawer<T extends Component>(app: App, component: T, options: DrawerOptions): TtDrawerExtendedDrawerApi;
@@ -0,0 +1,9 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * @description 抽屉拖拽
4
+ * @param drawerUseId 抽屉盒子useID
5
+ * @param visibleRef 抽屉开关状态
6
+ */
7
+ export declare function useDrawerResizable(drawerUseId: string, visibleRef: Ref<boolean>, setDrawerProps?: Fn): (import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps> | {
8
+ isDragging: Ref<boolean, boolean>;
9
+ })[];
@@ -0,0 +1,10 @@
1
+ import { App, Component } from 'vue';
2
+ import { TtDrawerExtendedDrawerApi, TtDrawerProps } from './typing';
3
+ export type DrawerOptions = Partial<TtDrawerProps> & {
4
+ slots?: any;
5
+ onOk?: () => Promise<any> | any;
6
+ onCancel?: () => Promise<any> | any;
7
+ };
8
+ export type ShowDrawerFn = <T extends Component>(component: T, options: DrawerOptions) => TtDrawerExtendedDrawerApi;
9
+ export declare function setupDrawer(app: App): void;
10
+ export declare function useShowDrawer(): ShowDrawerFn;
@@ -0,0 +1,99 @@
1
+ import { ButtonProps } from 'element-plus';
2
+ import { PropType } from 'vue';
3
+ export declare const footerProps: {
4
+ /** 确定抽屉的loading */
5
+ confirmLoading: any;
6
+ /** 是否显示取消按钮 */
7
+ showCancelBtn: any;
8
+ /** 取消按钮的props */
9
+ cancelButtonProps: {
10
+ type: PropType<Partial<ButtonProps>>;
11
+ default: Partial<ButtonProps>;
12
+ };
13
+ /** 取消按钮的文本 */
14
+ cancelText: any;
15
+ /** 是否显示确定按钮 */
16
+ showOkBtn: any;
17
+ /** 确定按钮的props */
18
+ okButtonProps: {
19
+ type: PropType<Partial<ButtonProps>>;
20
+ default: Partial<ButtonProps>;
21
+ };
22
+ /** 确定按钮的文本 */
23
+ okText: any;
24
+ /** 确定按钮的类型 */
25
+ okType: any;
26
+ /** 是否显示footer */
27
+ showFooter: any;
28
+ /** footer高度 */
29
+ footerHeight: {
30
+ type: PropType<string | number>;
31
+ default: number;
32
+ };
33
+ height: any;
34
+ size: any;
35
+ };
36
+ export declare const basicProps: {
37
+ /** 确定抽屉的loading */
38
+ confirmLoading: any;
39
+ /** 是否显示取消按钮 */
40
+ showCancelBtn: any;
41
+ /** 取消按钮的props */
42
+ cancelButtonProps: {
43
+ type: PropType<Partial<ButtonProps>>;
44
+ default: Partial<ButtonProps>;
45
+ };
46
+ /** 取消按钮的文本 */
47
+ cancelText: any;
48
+ /** 是否显示确定按钮 */
49
+ showOkBtn: any;
50
+ /** 确定按钮的props */
51
+ okButtonProps: {
52
+ type: PropType<Partial<ButtonProps>>;
53
+ default: Partial<ButtonProps>;
54
+ };
55
+ /** 确定按钮的文本 */
56
+ okText: any;
57
+ /** 确定按钮的类型 */
58
+ okType: any;
59
+ /** 是否显示footer */
60
+ showFooter: any;
61
+ /** footer高度 */
62
+ footerHeight: {
63
+ type: PropType<string | number>;
64
+ default: number;
65
+ };
66
+ height: any;
67
+ size: any;
68
+ /** class */
69
+ class: any;
70
+ /** 标题 */
71
+ title: any;
72
+ /** 测试标识 */
73
+ testId: any;
74
+ /** loading文本 */
75
+ loadingText: any;
76
+ /** 显示 */
77
+ visible: any;
78
+ /** 显示loading */
79
+ loading: any;
80
+ /** 是否点击遮罩关闭弹窗 */
81
+ maskClosable: any;
82
+ /** 是否关闭销毁组件 */
83
+ destroyOnClose: {
84
+ type: BooleanConstructor;
85
+ };
86
+ /** 取消前事件 */
87
+ closeFunc: {
88
+ type: PropType<() => Promise<boolean>>;
89
+ };
90
+ /** 取消前是否显示确认弹窗 */
91
+ showConfirm: any;
92
+ /** 确认弹窗文本内容 */
93
+ confirmContent: any;
94
+ /** 是否显示modal */
95
+ modal: {
96
+ type: BooleanConstructor;
97
+ default: () => any;
98
+ };
99
+ };
@@ -0,0 +1,154 @@
1
+ import { ButtonProps } from 'element-plus';
2
+ import { DrawerProps } from 'element-plus/es/components/drawer';
3
+ import { Component, ComputedRef, Ref } from 'vue';
4
+ import { DrawerApi } from './utils/drawer-api';
5
+ export type DrawerInstance = {
6
+ /** 设置抽屉props */
7
+ setDrawerProps: (props: Partial<TtDrawerProps>) => void;
8
+ emitVisible?: (visible: boolean, uid: number) => void;
9
+ };
10
+ export type DrawerReturnMethods = {
11
+ /** 打开抽屉 */
12
+ openDrawer: <T = any>(visible?: boolean, data?: T, openOnSet?: boolean) => void;
13
+ /** 关闭抽屉 */
14
+ closeDrawer: () => void;
15
+ /** 获取visible */
16
+ getVisible?: ComputedRef<boolean>;
17
+ } & DrawerInstance;
18
+ export type DrawerReturnInnerMethods = {
19
+ /** 关闭抽屉 */
20
+ closeDrawer: () => void;
21
+ /** 设置抽屉loading */
22
+ changeLoading: (loading: boolean) => void;
23
+ /** 设置抽屉确定按钮loading */
24
+ changeOkLoading: (loading: boolean) => void;
25
+ /** 获取visible */
26
+ getVisible?: ComputedRef<boolean>;
27
+ } & DrawerInstance;
28
+ type RegisterFn = (drawerInstance: DrawerInstance, uuid: number) => void;
29
+ export type TtDrawerRegister = [methods: DrawerInstance, uuid: number];
30
+ export type UseDrawerReturnType = [RegisterFn, DrawerReturnMethods];
31
+ export type UseDrawerInnerReturnType = [RegisterFn, DrawerReturnInnerMethods];
32
+ export type DrawerFooterProps = {
33
+ /**
34
+ * 是否显示确定按钮
35
+ * @default true
36
+ */
37
+ showOkBtn?: boolean;
38
+ /**
39
+ * 是否显示取消按钮
40
+ * @default true
41
+ */
42
+ showCancelBtn?: boolean;
43
+ /**
44
+ * 取消按钮文本
45
+ * @default '取消'
46
+ */
47
+ cancelText?: string;
48
+ /**
49
+ * 确定按钮文本
50
+ * @default '确定'
51
+ */
52
+ okText?: string;
53
+ /**
54
+ * 确定按钮loading
55
+ * @default false
56
+ */
57
+ confirmLoading?: boolean;
58
+ /**
59
+ * 是否显示footer
60
+ * @default true
61
+ */
62
+ showFooter?: boolean;
63
+ /**
64
+ * footer高度
65
+ * @default 44
66
+ */
67
+ footerHeight?: string | number;
68
+ /**
69
+ * 确定按钮的props
70
+ * @default { type: 'primary' }
71
+ */
72
+ okButtonProps?: Partial<ButtonProps>;
73
+ /**
74
+ * 取消按钮的props
75
+ * @default {}
76
+ */
77
+ cancelButtonProps?: Partial<ButtonProps>;
78
+ };
79
+ export type DrawerBasicProps = {
80
+ /** class */
81
+ class?: string;
82
+ /** 标题 */
83
+ title?: string;
84
+ /** loading文本 */
85
+ loadingText?: string;
86
+ /** 测试标识 */
87
+ testId?: string;
88
+ /**
89
+ * 显示
90
+ * @default false
91
+ */
92
+ visible?: boolean;
93
+ /**
94
+ * 显示loading
95
+ * @default false
96
+ */
97
+ loading?: boolean;
98
+ /**
99
+ * 是否点击遮罩关闭弹窗
100
+ * @default true
101
+ */
102
+ maskClosable?: boolean;
103
+ /**
104
+ * 是否关闭销毁组件
105
+ */
106
+ destroyOnClose?: boolean;
107
+ /**
108
+ * 取消前事件
109
+ */
110
+ closeFunc?: () => Promise<boolean>;
111
+ /**
112
+ * 取消前是否显示确认弹窗
113
+ * @default false
114
+ */
115
+ showConfirm?: boolean;
116
+ /**
117
+ * 确认弹窗文本内容
118
+ */
119
+ confirmContent?: string;
120
+ };
121
+ export type UseDrawerProps = Partial<DrawerBasicProps> & Partial<DrawerFooterProps>;
122
+ export type TtDrawerProps = UseDrawerProps & Partial<DrawerProps>;
123
+ export type TtDrawerApiOptions = Partial<TtDrawerProps> & {
124
+ /**
125
+ * 独立的抽屉组件
126
+ */
127
+ connectedComponent?: Component;
128
+ /**
129
+ * 点击确定按钮的回调
130
+ */
131
+ onOk?: () => Promise<boolean> | boolean | void;
132
+ /**
133
+ * 点击取消按钮的回调
134
+ */
135
+ onClose?: () => void;
136
+ /**
137
+ * 弹窗关闭动画结束的回调
138
+ * @returns
139
+ */
140
+ onClosed?: () => void;
141
+ /**
142
+ * 弹窗状态变化回调
143
+ * @param visible
144
+ */
145
+ onVisibleChange?: (visible: boolean) => void;
146
+ /**
147
+ * 监听的方法
148
+ */
149
+ onReceiveSharedData?: (data: Record<string, any>) => void;
150
+ };
151
+ export type TtDrawerExtendedDrawerApi = DrawerApi & {
152
+ useStore: <T = NoInfer<TtDrawerProps>>(selector?: (state: NoInfer<TtDrawerProps>) => T) => Readonly<Ref<T>>;
153
+ };
154
+ export {};
@@ -0,0 +1,87 @@
1
+ import { ElDrawer } from 'element-plus';
2
+ import { TtDrawerApiOptions, TtDrawerProps } from '../typing';
3
+ import { Store } from '@tanstack/vue-store';
4
+ export type ApiType = Pick<TtDrawerApiOptions, "onOk" | "onClose" | "onClosed" | "onVisibleChange" | "onReceiveSharedData">;
5
+ export declare class DrawerApi {
6
+ /** el-drawer 实例的引用 */
7
+ drawerRef: InstanceType<typeof ElDrawer> | null;
8
+ /** 共享数据对象,用于在组件间传递数据 */
9
+ sharedData: Record<"payload", any>;
10
+ /** 状态存储对象,使用Store管理抽屉的各种状态 */
11
+ store: Store<Partial<TtDrawerProps>>;
12
+ /** 抽屉的API接口,用于处理外部事件 */
13
+ private api;
14
+ /** 抽屉的当前状态,使用Partial<TtDrawerProps>类型 */
15
+ state: Partial<TtDrawerProps>;
16
+ /** 构造函数,初始化抽屉的API接口和状态 */
17
+ constructor(options?: TtDrawerApiOptions);
18
+ /**
19
+ * 关闭抽屉
20
+ * @description 关闭抽屉时会调用 closeFunc 钩子函数,如果 onBeforeClose 返回 false,则不关闭弹窗
21
+ */
22
+ close(): Promise<void>;
23
+ /**
24
+ * 挂载抽屉实例和API接口
25
+ * @param drawerRef - el-drawer 实例
26
+ * @param api - 外部传入的API接口
27
+ */
28
+ mount(drawerRef: InstanceType<typeof ElDrawer> | null, api?: ApiType): void;
29
+ /**
30
+ * 获取共享数据
31
+ * @returns 共享数据对象
32
+ */
33
+ getData<T extends object = Record<string, any>>(): T;
34
+ /**
35
+ * 取消操作
36
+ */
37
+ onClosed(): void;
38
+ /**
39
+ * 确认操作
40
+ */
41
+ onOk: import('@vueuse/core').UseDebounceFnReturn<() => Promise<void>>;
42
+ /**
43
+ * 设置抽屉的状态
44
+ * @param stateOrFn - 状态对象或状态函数
45
+ * @returns 当前实例
46
+ */
47
+ setState(stateOrFn: ((prev: Partial<TtDrawerProps>) => Partial<TtDrawerProps>) | Partial<TtDrawerProps>): this;
48
+ /**
49
+ * 设置抽屉的属性
50
+ * @param props - 属性对象
51
+ * @returns 当前实例
52
+ */
53
+ setDrawerProps(props: Partial<TtDrawerProps>): this;
54
+ /**
55
+ * 设置抽屉的加载状态
56
+ * @param loading - 是否加载中
57
+ * @returns 当前实例
58
+ */
59
+ changeLoading(loading?: boolean): this;
60
+ /**
61
+ * 设置确认按钮的加载状态
62
+ * @param loading - 是否加载中
63
+ * @returns 当前实例
64
+ */
65
+ changeOkLoading(loading?: boolean): this;
66
+ /**
67
+ * 打开抽屉
68
+ * @param visible - 是否可见
69
+ * @param data - 共享数据
70
+ */
71
+ openDrawer<T>(visible?: boolean, data?: T): void;
72
+ /**
73
+ * 设置共享数据
74
+ * @param payload - 共享数据
75
+ * @returns 当前实例
76
+ */
77
+ setData(payload: any): this;
78
+ /**
79
+ * 关闭抽屉
80
+ */
81
+ closeDrawer(): void;
82
+ /**
83
+ * 获取抽屉的可见状态
84
+ * @returns 抽屉的可见状态
85
+ */
86
+ getVisible: import('vue').ComputedRef<boolean | undefined>;
87
+ }
@@ -1,6 +1,6 @@
1
1
  import { Component } from 'vue';
2
- import { BaseFormComponentType, FormCommonConfig, VbenFormAdapterOptions } from './types';
2
+ import { BaseFormComponentType, FormCommonConfig, TtFormAdapterOptions } from './types';
3
3
  export declare const DEFAULT_FORM_COMMON_CONFIG: FormCommonConfig;
4
4
  export declare const COMPONENT_MAP: Record<BaseFormComponentType, Component>;
5
5
  export declare const COMPONENT_BIND_EVENT_MAP: Partial<Record<BaseFormComponentType, string>>;
6
- export declare function setupForm<T extends BaseFormComponentType = BaseFormComponentType>(options: VbenFormAdapterOptions<T>): void;
6
+ export declare function setupForm<T extends BaseFormComponentType = BaseFormComponentType>(options: TtFormAdapterOptions<T>): void;
@@ -1,4 +1,4 @@
1
- import { ButtonProps, CheckboxProps, CheckboxGroupProps, DatePickerProps, InputProps, InputNumberProps, RadioProps, RadioButtonProps, RadioGroupProps, SwitchProps, TimePickerDefaultProps, SelectV2Props, UploadProps, SelectProps } from 'element-plus';
1
+ import { ButtonProps, CheckboxProps, CheckboxGroupProps, DatePickerProps, InputProps, InputNumberProps, RadioProps, RadioGroupProps, SelectProps, SelectV2Props, SwitchProps, TimePickerDefaultProps, UploadProps, CascaderProps } from 'element-plus';
2
2
  import { FieldOptions, FormContext, GenericObject } from 'vee-validate';
3
3
  import { Component, HtmlHTMLAttributes, MaybeRefOrGetter, Ref } from 'vue';
4
4
  import { ZodTypeAny } from 'zod';
@@ -8,20 +8,21 @@ import { FormApi } from './formApi';
8
8
  export type FormLayout = "horizontal" | "inline" | "vertical";
9
9
  export interface BaseFormComponentMap {
10
10
  TtSelect: TtSelectProp;
11
+ ElCheckbox: CheckboxProps;
11
12
  ElCheckboxButton: CheckboxProps;
12
13
  ElCheckboxGroup: CheckboxGroupProps;
13
14
  ElDatePicker: DatePickerProps;
14
15
  ElInput: InputProps;
15
16
  ElInputNumber: InputNumberProps;
16
17
  ElRadio: RadioProps;
17
- ElRadioButton: RadioButtonProps;
18
18
  ElRadioGroup: RadioGroupProps;
19
+ ElSelect: SelectProps;
20
+ ElSelectV2: SelectV2Props;
19
21
  ElSwitch: SwitchProps;
20
22
  ElTimePicker: TimePickerDefaultProps;
21
- ElSelectV2: SelectV2Props;
22
23
  ElTreeSelect: Record<string, any>;
23
24
  ElUpload: UploadProps;
24
- ElSelect: SelectProps;
25
+ ElCascader: CascaderProps;
25
26
  }
26
27
  /**
27
28
  * 表单组件类型字符串联合类型
@@ -359,7 +360,7 @@ export interface TtFormProps<T extends BaseFormComponentType = BaseFormComponent
359
360
  export type ExtendedFormApi = FormApi & {
360
361
  useStore: <T = NoInfer<TtFormProps>>(selector?: (state: NoInfer<TtFormProps>) => T) => Readonly<Ref<T>>;
361
362
  };
362
- export interface VbenFormAdapterOptions<T extends BaseFormComponentType = BaseFormComponentType> {
363
+ export interface TtFormAdapterOptions<T extends BaseFormComponentType = BaseFormComponentType> {
363
364
  config?: {
364
365
  baseModelPropName?: string;
365
366
  disabledOnChangeListener?: boolean;