aofly-lib 1.0.3 → 1.0.5
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.
- package/dist/types/hooks/useCurd.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plugin/aoUI/index.d.ts +2 -2
- package/dist/types/types/common.d.ts +2 -1
- package/dist/types/ui/base/baseForm/config/fields/text/text.vue.d.ts +3 -0
- package/dist/types/ui/base/baseForm/config/fields/text/text.vue.d.ts.map +1 -0
- package/dist/types/ui/base/baseForm/config/utils/lib.d.ts +3 -2
- package/dist/types/ui/base/baseForm/form/form.vue.d.ts +32 -0
- package/dist/types/ui/base/baseForm/form/form.vue.d.ts.map +1 -0
- package/dist/types/ui/base/baseForm/form/index.d.ts +231 -1
- package/dist/types/ui/base/baseForm/form/index.d.ts.map +1 -1
- package/dist/types/ui/base/baseForm/form/props.d.ts +4 -3
- package/dist/types/ui/base/baseForm/formItem/formItem.vue.d.ts +14 -0
- package/dist/types/ui/base/baseForm/formItem/formItem.vue.d.ts.map +1 -0
- package/dist/types/ui/base/baseForm/formItem/index.d.ts +119 -1
- package/dist/types/ui/base/baseForm/formItem/index.d.ts.map +1 -1
- package/dist/types/ui/base/baseForm/formItem/props.d.ts +2 -1
- package/dist/types/ui/base/baseForm/hoc/useBaseForm.d.ts +19 -18
- package/dist/types/ui/base/baseForm/hook/useFormExpose.d.ts +5 -4
- package/dist/types/ui/base/baseForm/index.d.ts +2 -1
- package/dist/types/ui/index.d.ts +0 -1
- package/dist/types/ui/index.d.ts.map +1 -1
- package/package.json +9 -3
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=text.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/base/baseForm/config/fields/text/text.vue"],"names":[],"mappings":"AAGA;;AAqDA,wBAKG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { FormItemRule } from 'element-plus';
|
|
3
|
+
|
|
3
4
|
export declare const formFieldLibs: Record<string, any>;
|
|
4
5
|
type ValidateConfig = {
|
|
5
6
|
label?: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FormInstance } from 'element-plus';
|
|
2
|
+
import { AlFormProps } from './props';
|
|
3
|
+
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
footer?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AlFormProps>>, {
|
|
9
|
+
clearValues: () => void;
|
|
10
|
+
resetValues: () => void;
|
|
11
|
+
setValues: (data: Record<string, any>) => void;
|
|
12
|
+
getValues: () => Record<string, any>;
|
|
13
|
+
onSubmit: () => void;
|
|
14
|
+
getElForm: () => FormInstance | null;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AlFormProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
+
} : {
|
|
23
|
+
type: import('vue').PropType<T[K]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=form.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/base/baseForm/form/form.vue"],"names":[],"mappings":"AAqBA;AAEA,OAAO,EAAS,KAAK,YAAY,EAAC,MAAM,cAAc,CAAC;AACvD,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,SAAS,CAAC;AAoGzC,iBAAS,cAAc;qBAgJM,GAAG;oBACH,GAAG;EAG/B;AAsBD,QAAA,MAAM,eAAe;;;sBAvMI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;kTA8M1C,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1,4 +1,234 @@
|
|
|
1
|
-
export declare const AlForm:
|
|
1
|
+
export declare const AlForm: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
model: {
|
|
4
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
5
|
+
};
|
|
6
|
+
rules: {
|
|
7
|
+
type: import('vue').PropType<Partial<Record<string, import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>>>;
|
|
8
|
+
};
|
|
9
|
+
labelPosition: {
|
|
10
|
+
type: import('vue').PropType<"left" | "right" | "top">;
|
|
11
|
+
};
|
|
12
|
+
requireAsteriskPosition: {
|
|
13
|
+
type: import('vue').PropType<"left" | "right">;
|
|
14
|
+
};
|
|
15
|
+
labelWidth: {
|
|
16
|
+
type: import('vue').PropType<string | number>;
|
|
17
|
+
};
|
|
18
|
+
labelSuffix: {
|
|
19
|
+
type: import('vue').PropType<string>;
|
|
20
|
+
};
|
|
21
|
+
inline: {
|
|
22
|
+
type: import('vue').PropType<boolean>;
|
|
23
|
+
};
|
|
24
|
+
inlineMessage: {
|
|
25
|
+
type: import('vue').PropType<boolean>;
|
|
26
|
+
};
|
|
27
|
+
statusIcon: {
|
|
28
|
+
type: import('vue').PropType<boolean>;
|
|
29
|
+
};
|
|
30
|
+
showMessage: {
|
|
31
|
+
type: import('vue').PropType<boolean>;
|
|
32
|
+
};
|
|
33
|
+
validateOnRuleChange: {
|
|
34
|
+
type: import('vue').PropType<boolean>;
|
|
35
|
+
};
|
|
36
|
+
hideRequiredAsterisk: {
|
|
37
|
+
type: import('vue').PropType<boolean>;
|
|
38
|
+
};
|
|
39
|
+
scrollToError: {
|
|
40
|
+
type: import('vue').PropType<boolean>;
|
|
41
|
+
};
|
|
42
|
+
scrollIntoViewOptions: {
|
|
43
|
+
type: import('vue').PropType<boolean | ScrollIntoViewOptions>;
|
|
44
|
+
};
|
|
45
|
+
size: {
|
|
46
|
+
type: import('vue').PropType<"" | "default" | "small" | "large">;
|
|
47
|
+
};
|
|
48
|
+
disabled: {
|
|
49
|
+
type: import('vue').PropType<boolean>;
|
|
50
|
+
};
|
|
51
|
+
fields: {
|
|
52
|
+
type: import('vue').PropType<import('..').FormField<any>[]>;
|
|
53
|
+
};
|
|
54
|
+
footer: {
|
|
55
|
+
type: import('vue').PropType<boolean>;
|
|
56
|
+
};
|
|
57
|
+
submitConfig: {
|
|
58
|
+
type: import('vue').PropType<import('../../../..').AlButtonType>;
|
|
59
|
+
};
|
|
60
|
+
resetConfig: {
|
|
61
|
+
type: import('vue').PropType<import('../../../..').AlButtonType>;
|
|
62
|
+
};
|
|
63
|
+
buttons: {
|
|
64
|
+
type: import('vue').PropType<import('../../../..').AlButtonType[]>;
|
|
65
|
+
};
|
|
66
|
+
}>> & Readonly<{}>, {
|
|
67
|
+
clearValues: () => void;
|
|
68
|
+
resetValues: () => void;
|
|
69
|
+
setValues: (data: Record<string, any>) => void;
|
|
70
|
+
getValues: () => Record<string, any>;
|
|
71
|
+
onSubmit: () => void;
|
|
72
|
+
getElForm: () => import('element-plus').FormInstance | null;
|
|
73
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
74
|
+
P: {};
|
|
75
|
+
B: {};
|
|
76
|
+
D: {};
|
|
77
|
+
C: {};
|
|
78
|
+
M: {};
|
|
79
|
+
Defaults: {};
|
|
80
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
81
|
+
model: {
|
|
82
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
83
|
+
};
|
|
84
|
+
rules: {
|
|
85
|
+
type: import('vue').PropType<Partial<Record<string, import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>>>;
|
|
86
|
+
};
|
|
87
|
+
labelPosition: {
|
|
88
|
+
type: import('vue').PropType<"left" | "right" | "top">;
|
|
89
|
+
};
|
|
90
|
+
requireAsteriskPosition: {
|
|
91
|
+
type: import('vue').PropType<"left" | "right">;
|
|
92
|
+
};
|
|
93
|
+
labelWidth: {
|
|
94
|
+
type: import('vue').PropType<string | number>;
|
|
95
|
+
};
|
|
96
|
+
labelSuffix: {
|
|
97
|
+
type: import('vue').PropType<string>;
|
|
98
|
+
};
|
|
99
|
+
inline: {
|
|
100
|
+
type: import('vue').PropType<boolean>;
|
|
101
|
+
};
|
|
102
|
+
inlineMessage: {
|
|
103
|
+
type: import('vue').PropType<boolean>;
|
|
104
|
+
};
|
|
105
|
+
statusIcon: {
|
|
106
|
+
type: import('vue').PropType<boolean>;
|
|
107
|
+
};
|
|
108
|
+
showMessage: {
|
|
109
|
+
type: import('vue').PropType<boolean>;
|
|
110
|
+
};
|
|
111
|
+
validateOnRuleChange: {
|
|
112
|
+
type: import('vue').PropType<boolean>;
|
|
113
|
+
};
|
|
114
|
+
hideRequiredAsterisk: {
|
|
115
|
+
type: import('vue').PropType<boolean>;
|
|
116
|
+
};
|
|
117
|
+
scrollToError: {
|
|
118
|
+
type: import('vue').PropType<boolean>;
|
|
119
|
+
};
|
|
120
|
+
scrollIntoViewOptions: {
|
|
121
|
+
type: import('vue').PropType<boolean | ScrollIntoViewOptions>;
|
|
122
|
+
};
|
|
123
|
+
size: {
|
|
124
|
+
type: import('vue').PropType<"" | "default" | "small" | "large">;
|
|
125
|
+
};
|
|
126
|
+
disabled: {
|
|
127
|
+
type: import('vue').PropType<boolean>;
|
|
128
|
+
};
|
|
129
|
+
fields: {
|
|
130
|
+
type: import('vue').PropType<import('..').FormField<any>[]>;
|
|
131
|
+
};
|
|
132
|
+
footer: {
|
|
133
|
+
type: import('vue').PropType<boolean>;
|
|
134
|
+
};
|
|
135
|
+
submitConfig: {
|
|
136
|
+
type: import('vue').PropType<import('../../../..').AlButtonType>;
|
|
137
|
+
};
|
|
138
|
+
resetConfig: {
|
|
139
|
+
type: import('vue').PropType<import('../../../..').AlButtonType>;
|
|
140
|
+
};
|
|
141
|
+
buttons: {
|
|
142
|
+
type: import('vue').PropType<import('../../../..').AlButtonType[]>;
|
|
143
|
+
};
|
|
144
|
+
}>> & Readonly<{}>, {
|
|
145
|
+
clearValues: () => void;
|
|
146
|
+
resetValues: () => void;
|
|
147
|
+
setValues: (data: Record<string, any>) => void;
|
|
148
|
+
getValues: () => Record<string, any>;
|
|
149
|
+
onSubmit: () => void;
|
|
150
|
+
getElForm: () => import('element-plus').FormInstance | null;
|
|
151
|
+
}, {}, {}, {}, {}>;
|
|
152
|
+
__isFragment?: never;
|
|
153
|
+
__isTeleport?: never;
|
|
154
|
+
__isSuspense?: never;
|
|
155
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
156
|
+
model: {
|
|
157
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
158
|
+
};
|
|
159
|
+
rules: {
|
|
160
|
+
type: import('vue').PropType<Partial<Record<string, import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>>>;
|
|
161
|
+
};
|
|
162
|
+
labelPosition: {
|
|
163
|
+
type: import('vue').PropType<"left" | "right" | "top">;
|
|
164
|
+
};
|
|
165
|
+
requireAsteriskPosition: {
|
|
166
|
+
type: import('vue').PropType<"left" | "right">;
|
|
167
|
+
};
|
|
168
|
+
labelWidth: {
|
|
169
|
+
type: import('vue').PropType<string | number>;
|
|
170
|
+
};
|
|
171
|
+
labelSuffix: {
|
|
172
|
+
type: import('vue').PropType<string>;
|
|
173
|
+
};
|
|
174
|
+
inline: {
|
|
175
|
+
type: import('vue').PropType<boolean>;
|
|
176
|
+
};
|
|
177
|
+
inlineMessage: {
|
|
178
|
+
type: import('vue').PropType<boolean>;
|
|
179
|
+
};
|
|
180
|
+
statusIcon: {
|
|
181
|
+
type: import('vue').PropType<boolean>;
|
|
182
|
+
};
|
|
183
|
+
showMessage: {
|
|
184
|
+
type: import('vue').PropType<boolean>;
|
|
185
|
+
};
|
|
186
|
+
validateOnRuleChange: {
|
|
187
|
+
type: import('vue').PropType<boolean>;
|
|
188
|
+
};
|
|
189
|
+
hideRequiredAsterisk: {
|
|
190
|
+
type: import('vue').PropType<boolean>;
|
|
191
|
+
};
|
|
192
|
+
scrollToError: {
|
|
193
|
+
type: import('vue').PropType<boolean>;
|
|
194
|
+
};
|
|
195
|
+
scrollIntoViewOptions: {
|
|
196
|
+
type: import('vue').PropType<boolean | ScrollIntoViewOptions>;
|
|
197
|
+
};
|
|
198
|
+
size: {
|
|
199
|
+
type: import('vue').PropType<"" | "default" | "small" | "large">;
|
|
200
|
+
};
|
|
201
|
+
disabled: {
|
|
202
|
+
type: import('vue').PropType<boolean>;
|
|
203
|
+
};
|
|
204
|
+
fields: {
|
|
205
|
+
type: import('vue').PropType<import('..').FormField<any>[]>;
|
|
206
|
+
};
|
|
207
|
+
footer: {
|
|
208
|
+
type: import('vue').PropType<boolean>;
|
|
209
|
+
};
|
|
210
|
+
submitConfig: {
|
|
211
|
+
type: import('vue').PropType<import('../../../..').AlButtonType>;
|
|
212
|
+
};
|
|
213
|
+
resetConfig: {
|
|
214
|
+
type: import('vue').PropType<import('../../../..').AlButtonType>;
|
|
215
|
+
};
|
|
216
|
+
buttons: {
|
|
217
|
+
type: import('vue').PropType<import('../../../..').AlButtonType[]>;
|
|
218
|
+
};
|
|
219
|
+
}>> & Readonly<{}>, {
|
|
220
|
+
clearValues: () => void;
|
|
221
|
+
resetValues: () => void;
|
|
222
|
+
setValues: (data: Record<string, any>) => void;
|
|
223
|
+
getValues: () => Record<string, any>;
|
|
224
|
+
onSubmit: () => void;
|
|
225
|
+
getElForm: () => import('element-plus').FormInstance | null;
|
|
226
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
227
|
+
$slots: {
|
|
228
|
+
default?(_: {}): any;
|
|
229
|
+
footer?(_: {}): any;
|
|
230
|
+
};
|
|
231
|
+
});
|
|
2
232
|
export default AlForm;
|
|
3
233
|
export * from './props';
|
|
4
234
|
export type AlFormInstance = InstanceType<typeof AlForm>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/base/baseForm/form/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/base/baseForm/form/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAO,CAAA;AAC1B,eAAe,MAAM,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { FormProps } from 'element-plus';
|
|
2
|
+
import { FormField } from '../formItem';
|
|
3
|
+
import { FormButtonConfig } from '../../../../types/common';
|
|
4
|
+
|
|
4
5
|
export type AlFormProps = FormProps & AlFormConfig<any> & FormButtonConfig;
|
|
5
6
|
export type AlFormConfig<T> = {
|
|
6
7
|
fields?: FormField<T>[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AlFormItemProps } from './props';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AlFormItemProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AlFormItemProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
6
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
7
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
8
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
9
|
+
} : {
|
|
10
|
+
type: import('vue').PropType<T[K]>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=formItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formItem.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/base/baseForm/formItem/formItem.vue"],"names":[],"mappings":"AAYA;AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;;AA0H7C,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1,4 +1,122 @@
|
|
|
1
1
|
export * from './props';
|
|
2
|
-
export declare const AlFormItem: import(
|
|
2
|
+
export declare const AlFormItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
type: {
|
|
4
|
+
type: import('vue').PropType<string>;
|
|
5
|
+
};
|
|
6
|
+
defaultValue: {
|
|
7
|
+
type: import('vue').PropType<any>;
|
|
8
|
+
};
|
|
9
|
+
fieldName: {
|
|
10
|
+
type: import('vue').PropType<string>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
keyIndex: {
|
|
14
|
+
type: import('vue').PropType<string>;
|
|
15
|
+
};
|
|
16
|
+
vtype: {
|
|
17
|
+
type: import('vue').PropType<string[]>;
|
|
18
|
+
};
|
|
19
|
+
control: {
|
|
20
|
+
type: import('vue').PropType<"text" | "select" | "range">;
|
|
21
|
+
};
|
|
22
|
+
componentProps: {
|
|
23
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
24
|
+
};
|
|
25
|
+
label: {
|
|
26
|
+
type: import('vue').PropType<string>;
|
|
27
|
+
};
|
|
28
|
+
labelWidth: {
|
|
29
|
+
type: import('vue').PropType<string | number>;
|
|
30
|
+
};
|
|
31
|
+
labelPosition: {
|
|
32
|
+
type: import('vue').PropType<"" | "left" | "right" | "top">;
|
|
33
|
+
};
|
|
34
|
+
prop: {
|
|
35
|
+
type: import('vue').PropType<import('element-plus').FormItemProp>;
|
|
36
|
+
};
|
|
37
|
+
required: {
|
|
38
|
+
type: import('vue').PropType<boolean>;
|
|
39
|
+
};
|
|
40
|
+
rules: {
|
|
41
|
+
type: import('vue').PropType<import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>;
|
|
42
|
+
};
|
|
43
|
+
error: {
|
|
44
|
+
type: import('vue').PropType<string>;
|
|
45
|
+
};
|
|
46
|
+
validateStatus: {
|
|
47
|
+
type: import('vue').PropType<"" | "error" | "validating" | "success">;
|
|
48
|
+
};
|
|
49
|
+
for: {
|
|
50
|
+
type: import('vue').PropType<string>;
|
|
51
|
+
};
|
|
52
|
+
inlineMessage: {
|
|
53
|
+
type: import('vue').PropType<boolean>;
|
|
54
|
+
};
|
|
55
|
+
showMessage: {
|
|
56
|
+
type: import('vue').PropType<boolean>;
|
|
57
|
+
};
|
|
58
|
+
size: {
|
|
59
|
+
type: import('vue').PropType<"" | "default" | "small" | "large">;
|
|
60
|
+
};
|
|
61
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
62
|
+
type: {
|
|
63
|
+
type: import('vue').PropType<string>;
|
|
64
|
+
};
|
|
65
|
+
defaultValue: {
|
|
66
|
+
type: import('vue').PropType<any>;
|
|
67
|
+
};
|
|
68
|
+
fieldName: {
|
|
69
|
+
type: import('vue').PropType<string>;
|
|
70
|
+
required: true;
|
|
71
|
+
};
|
|
72
|
+
keyIndex: {
|
|
73
|
+
type: import('vue').PropType<string>;
|
|
74
|
+
};
|
|
75
|
+
vtype: {
|
|
76
|
+
type: import('vue').PropType<string[]>;
|
|
77
|
+
};
|
|
78
|
+
control: {
|
|
79
|
+
type: import('vue').PropType<"text" | "select" | "range">;
|
|
80
|
+
};
|
|
81
|
+
componentProps: {
|
|
82
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
83
|
+
};
|
|
84
|
+
label: {
|
|
85
|
+
type: import('vue').PropType<string>;
|
|
86
|
+
};
|
|
87
|
+
labelWidth: {
|
|
88
|
+
type: import('vue').PropType<string | number>;
|
|
89
|
+
};
|
|
90
|
+
labelPosition: {
|
|
91
|
+
type: import('vue').PropType<"" | "left" | "right" | "top">;
|
|
92
|
+
};
|
|
93
|
+
prop: {
|
|
94
|
+
type: import('vue').PropType<import('element-plus').FormItemProp>;
|
|
95
|
+
};
|
|
96
|
+
required: {
|
|
97
|
+
type: import('vue').PropType<boolean>;
|
|
98
|
+
};
|
|
99
|
+
rules: {
|
|
100
|
+
type: import('vue').PropType<import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>;
|
|
101
|
+
};
|
|
102
|
+
error: {
|
|
103
|
+
type: import('vue').PropType<string>;
|
|
104
|
+
};
|
|
105
|
+
validateStatus: {
|
|
106
|
+
type: import('vue').PropType<"" | "error" | "validating" | "success">;
|
|
107
|
+
};
|
|
108
|
+
for: {
|
|
109
|
+
type: import('vue').PropType<string>;
|
|
110
|
+
};
|
|
111
|
+
inlineMessage: {
|
|
112
|
+
type: import('vue').PropType<boolean>;
|
|
113
|
+
};
|
|
114
|
+
showMessage: {
|
|
115
|
+
type: import('vue').PropType<boolean>;
|
|
116
|
+
};
|
|
117
|
+
size: {
|
|
118
|
+
type: import('vue').PropType<"" | "default" | "small" | "large">;
|
|
119
|
+
};
|
|
120
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
3
121
|
export default AlFormItem;
|
|
4
122
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/base/baseForm/formItem/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAA;AACvB,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/base/baseForm/formItem/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAA;AACvB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iGAAW,CAAA;AAClC,eAAe,UAAU,CAAC"}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { FormProps } from 'element-plus';
|
|
2
|
+
import { FormField } from '../formItem';
|
|
3
|
+
import { FormButtonConfig } from '../../../../types/common';
|
|
4
|
+
|
|
4
5
|
type UseBaseFormConfig<T> = {
|
|
5
6
|
fields?: FormField<keyof T>[];
|
|
6
7
|
buttonConfig?: FormButtonConfig;
|
|
7
8
|
} & FormProps;
|
|
8
|
-
export default function useBaseForm<T extends Record<string, any>>(config: UseBaseFormConfig<T>, fieldKey?: keyof FormField<keyof T>): readonly [import(
|
|
9
|
+
export default function useBaseForm<T extends Record<string, any>>(config: UseBaseFormConfig<T>, fieldKey?: keyof FormField<keyof T>): readonly [import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
9
10
|
[key: string]: any;
|
|
10
|
-
}>, {}, {}, {}, import(
|
|
11
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
|
|
11
12
|
fields: {
|
|
12
|
-
select(_key: any): import(
|
|
13
|
+
select(_key: any): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
13
14
|
selectOne(_key: any): FormField<keyof T> | undefined;
|
|
14
15
|
selectList(): FormField<keyof T>[];
|
|
15
|
-
insert(data: FormField<keyof T>): import(
|
|
16
|
-
update(data: FormField<keyof T>): import(
|
|
17
|
-
remove(key: any): import(
|
|
18
|
-
insertAt(index: number, item: FormField<keyof T>, checkDuplicate?: boolean): import(
|
|
19
|
-
insertAfter(targetKey: any, item: FormField<keyof T>, checkDuplicate?: boolean): import(
|
|
20
|
-
insertBefore(targetKey: any, item: FormField<keyof T>, checkDuplicate?: boolean): import(
|
|
21
|
-
find(fn: (item: FormField<keyof T>) => boolean): import(
|
|
22
|
-
filter(fn: (item: FormField<keyof T>) => boolean): import(
|
|
23
|
-
sort(fn: (a: FormField<keyof T>, b: FormField<keyof T>) => number): import(
|
|
24
|
-
clear(): import(
|
|
16
|
+
insert(data: FormField<keyof T>): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
17
|
+
update(data: FormField<keyof T>): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
18
|
+
remove(key: any): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
19
|
+
insertAt(index: number, item: FormField<keyof T>, checkDuplicate?: boolean): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
20
|
+
insertAfter(targetKey: any, item: FormField<keyof T>, checkDuplicate?: boolean): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
21
|
+
insertBefore(targetKey: any, item: FormField<keyof T>, checkDuplicate?: boolean): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
22
|
+
find(fn: (item: FormField<keyof T>) => boolean): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
23
|
+
filter(fn: (item: FormField<keyof T>) => boolean): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
24
|
+
sort(fn: (a: FormField<keyof T>, b: FormField<keyof T>) => number): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
25
|
+
clear(): import('../../../../hooks/useCurd').CurdChain<FormField<keyof T>>;
|
|
25
26
|
value(): FormField<keyof T>[];
|
|
26
27
|
length: number;
|
|
27
28
|
};
|
|
28
29
|
resetValues: () => void;
|
|
29
30
|
onSubmit: () => void;
|
|
30
31
|
clearValues: () => void;
|
|
31
|
-
getValues: () => any;
|
|
32
|
+
getValues: () => Record<string, any> | undefined;
|
|
32
33
|
setValues: (data: Partial<T>) => void;
|
|
33
|
-
getElForm: () =>
|
|
34
|
+
getElForm: () => import('element-plus').FormInstance | null | undefined;
|
|
34
35
|
}];
|
|
35
36
|
export {};
|
|
36
37
|
//# sourceMappingURL=useBaseForm.d.ts.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { AlFormInstance } from '../form';
|
|
3
|
+
|
|
3
4
|
export default function useFormExpose<T extends Object>(form: Ref<AlFormInstance> | null): {
|
|
4
5
|
resetValues: () => void;
|
|
5
6
|
onSubmit: () => void;
|
|
6
7
|
clearValues: () => void;
|
|
7
|
-
getValues: () => any;
|
|
8
|
+
getValues: () => Record<string, any> | undefined;
|
|
8
9
|
setValues: (data: Partial<T>) => void;
|
|
9
|
-
getElForm: () =>
|
|
10
|
+
getElForm: () => import('element-plus').FormInstance | null | undefined;
|
|
10
11
|
};
|
|
11
12
|
//# sourceMappingURL=useFormExpose.d.ts.map
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aofly-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
8
|
+
"style": "./dist/aofly-lib.css",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
11
|
"types": "./dist/types/index.d.ts",
|
|
11
12
|
"import": "./dist/index.mjs",
|
|
12
13
|
"require": "./dist/index.cjs"
|
|
13
14
|
},
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
+
"./package.json": "./package.json",
|
|
16
|
+
"./dist/aofly-lib.css": "./dist/aofly-lib.css",
|
|
17
|
+
"./style.css": "./dist/aofly-lib.css",
|
|
18
|
+
"./aofly-lib.css": "./dist/aofly-lib.css"
|
|
15
19
|
},
|
|
16
20
|
"files": [
|
|
17
21
|
"dist",
|
|
@@ -29,7 +33,8 @@
|
|
|
29
33
|
"sideEffects": false,
|
|
30
34
|
"scripts": {
|
|
31
35
|
"dev": "vite",
|
|
32
|
-
"build": "vite build
|
|
36
|
+
"build": "vite build",
|
|
37
|
+
"build:t": "vite build && tsc -p tsconfig.build.json",
|
|
33
38
|
"build:types": "tsc -p tsconfig.build.json",
|
|
34
39
|
"preview": "vite preview"
|
|
35
40
|
},
|
|
@@ -38,6 +43,7 @@
|
|
|
38
43
|
"@types/lodash": "^4.17.23",
|
|
39
44
|
"element-plus": "^2.13.2",
|
|
40
45
|
"lodash": "^4.17.23",
|
|
46
|
+
"vite-plugin-dts": "^3.9.1",
|
|
41
47
|
"vue": "^3.5.25"
|
|
42
48
|
},
|
|
43
49
|
"devDependencies": {
|