asiaint-lowcode 2.0.0 → 2.0.2
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/README.md +0 -73
- package/dist/asiaint-lowcode.js +12 -0
- package/dist/asiaint-lowcode.umd.cjs +1579 -0
- package/dist/index.d.ts +528 -0
- package/dist/lazy/Card-op6i_z8G.js +46 -0
- package/dist/lazy/Cascader-cy25S0M_.js +41 -0
- package/dist/lazy/Checkbox-CQ56BycM.js +75 -0
- package/dist/lazy/Collapse-DXETETv8.js +54 -0
- package/dist/lazy/ColorInput-Ox5qD0YJ.js +28 -0
- package/dist/lazy/Component-BEqoz5jH.js +321 -0
- package/dist/lazy/Component-BLahI--2.js +117 -0
- package/dist/lazy/Component-C69_b7D6.js +97 -0
- package/dist/lazy/Component-CcwERaPj.js +27 -0
- package/dist/lazy/Component-DO63yabq.js +66 -0
- package/dist/lazy/Component-DhFx0wp3.js +13 -0
- package/dist/lazy/Component-IxyabXCT.js +24 -0
- package/dist/lazy/Custom-D7E3J-kY.js +26 -0
- package/dist/lazy/DatePicker-B565iRox.js +11 -0
- package/dist/lazy/Divider-2PVfgKTw.js +21 -0
- package/dist/lazy/FormList-BAk7pGQ5.js +199 -0
- package/dist/lazy/Grid-CQ3I3JJA.js +30 -0
- package/dist/lazy/Inline-DqNMJ75M.js +30 -0
- package/dist/lazy/JsonEdit-j4lAk68A.js +16385 -0
- package/dist/lazy/ObjGroup-CKy7PIXn.js +32 -0
- package/dist/lazy/Radio-Cv3X53D3.js +77 -0
- package/dist/lazy/SearchSelect-BkYukJim.js +86 -0
- package/dist/lazy/Select-MM2rUOPj.js +67 -0
- package/dist/lazy/Tabs-BVFfJAUT.js +47 -0
- package/dist/lazy/Tag-YpWlcGOi.js +22 -0
- package/dist/lazy/TextArea-KNtWavU4.js +25 -0
- package/dist/lazy/Title-32bZDihB.js +4 -0
- package/dist/lazy/Title.vue_vue_type_script_setup_true_lang-Ceco_9-w.js +23 -0
- package/dist/lazy/index-DoIvJXpY.js +22488 -0
- package/dist/lazy/useSelect-DkY4BS54.js +50 -0
- package/dist/style.css +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { Component } from 'vue';
|
|
3
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
4
|
+
import { ComponentProvideOptions } from 'vue';
|
|
5
|
+
import { DefineComponent } from 'vue';
|
|
6
|
+
import { ExtractPropTypes } from 'vue';
|
|
7
|
+
import { FormValidationResult } from 'element-plus';
|
|
8
|
+
import { PropType } from 'vue';
|
|
9
|
+
import { PublicProps } from 'vue';
|
|
10
|
+
import { VNode } from 'vue';
|
|
11
|
+
|
|
12
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes< {
|
|
13
|
+
modelValue: PropType<Record<string, any>>;
|
|
14
|
+
schema: PropType<FormSchema>;
|
|
15
|
+
schemaContext: {
|
|
16
|
+
type: PropType<Record<string, any>>;
|
|
17
|
+
};
|
|
18
|
+
design: {
|
|
19
|
+
type: PropType<boolean>;
|
|
20
|
+
};
|
|
21
|
+
footer: {
|
|
22
|
+
type: PropType<boolean>;
|
|
23
|
+
};
|
|
24
|
+
read: {
|
|
25
|
+
type: PropType<boolean>;
|
|
26
|
+
};
|
|
27
|
+
pageRulePath: {
|
|
28
|
+
type: PropType<string>;
|
|
29
|
+
};
|
|
30
|
+
}>, {
|
|
31
|
+
formValues: Record<string, any>;
|
|
32
|
+
selectData: Record<string, Record<string, any>>;
|
|
33
|
+
initialValues: Record<string, any>;
|
|
34
|
+
context: {
|
|
35
|
+
$values: Record<string, any>;
|
|
36
|
+
$selectData: Record<string, Record<string, any>>;
|
|
37
|
+
$locale: Locale;
|
|
38
|
+
};
|
|
39
|
+
vCodePass: boolean;
|
|
40
|
+
updateFormValues: (values: Record<string, any>, isAssign?: boolean) => void;
|
|
41
|
+
updateSelectData: (key: string, value: Record<string, any>) => void;
|
|
42
|
+
updateInitialValues: (values: Record<string, any>) => void;
|
|
43
|
+
updateVCodePass: (value: boolean) => void;
|
|
44
|
+
validate: () => FormValidationResult | undefined;
|
|
45
|
+
resetFields: (names?: string[]) => void;
|
|
46
|
+
submit: () => void;
|
|
47
|
+
setDisabled: (disabled: boolean) => void;
|
|
48
|
+
findItemByName: (items: FormItemType[], name: string) => FormItemType | null;
|
|
49
|
+
type: string;
|
|
50
|
+
schema: FormSchema;
|
|
51
|
+
schemaContext: Record<string, any>;
|
|
52
|
+
design: boolean;
|
|
53
|
+
footer: boolean;
|
|
54
|
+
read: boolean;
|
|
55
|
+
pageRulePath: string;
|
|
56
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
57
|
+
reset: () => void;
|
|
58
|
+
finish: (values: Record<string, any>) => void;
|
|
59
|
+
failed: (errors: {
|
|
60
|
+
message?: string;
|
|
61
|
+
fieldValue?: any;
|
|
62
|
+
field?: string;
|
|
63
|
+
}[]) => void;
|
|
64
|
+
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
65
|
+
modelValue: PropType<Record<string, any>>;
|
|
66
|
+
schema: PropType<FormSchema>;
|
|
67
|
+
schemaContext: {
|
|
68
|
+
type: PropType<Record<string, any>>;
|
|
69
|
+
};
|
|
70
|
+
design: {
|
|
71
|
+
type: PropType<boolean>;
|
|
72
|
+
};
|
|
73
|
+
footer: {
|
|
74
|
+
type: PropType<boolean>;
|
|
75
|
+
};
|
|
76
|
+
read: {
|
|
77
|
+
type: PropType<boolean>;
|
|
78
|
+
};
|
|
79
|
+
pageRulePath: {
|
|
80
|
+
type: PropType<string>;
|
|
81
|
+
};
|
|
82
|
+
}>> & Readonly<{
|
|
83
|
+
onReset?: (() => any) | undefined;
|
|
84
|
+
onFinish?: ((values: Record<string, any>) => any) | undefined;
|
|
85
|
+
onFailed?: ((errors: {
|
|
86
|
+
message?: string;
|
|
87
|
+
fieldValue?: any;
|
|
88
|
+
field?: string;
|
|
89
|
+
}[]) => any) | undefined;
|
|
90
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
91
|
+
|
|
92
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
93
|
+
|
|
94
|
+
declare type __VLS_Prettify<T> = {
|
|
95
|
+
[K in keyof T]: T[K];
|
|
96
|
+
} & {};
|
|
97
|
+
|
|
98
|
+
declare function __VLS_template(): {
|
|
99
|
+
default?(_: {}): any;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
103
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
104
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
105
|
+
} : {
|
|
106
|
+
type: PropType<T[K]>;
|
|
107
|
+
required: true;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
112
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
113
|
+
default: D[K];
|
|
114
|
+
}> : P[K];
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
118
|
+
new (): {
|
|
119
|
+
$slots: S;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
declare const _default: {
|
|
124
|
+
install: (app: App<Element>, options?: Options) => void;
|
|
125
|
+
};
|
|
126
|
+
export default _default;
|
|
127
|
+
|
|
128
|
+
declare type FormChange = {
|
|
129
|
+
target: string;
|
|
130
|
+
value?: any;
|
|
131
|
+
condition?: any;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export declare const FormDesign: DefineComponent<ExtractPropTypes< {
|
|
135
|
+
modelValue: PropType<FormSchema>;
|
|
136
|
+
schemaContext: {
|
|
137
|
+
type: PropType<Record<string, any>>;
|
|
138
|
+
default: () => {};
|
|
139
|
+
};
|
|
140
|
+
templates: {
|
|
141
|
+
type: PropType<TemplateData>;
|
|
142
|
+
default: () => never[];
|
|
143
|
+
};
|
|
144
|
+
omitMenus: {
|
|
145
|
+
type: PropType<string[]>;
|
|
146
|
+
default: () => never[];
|
|
147
|
+
};
|
|
148
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
149
|
+
add: (element: FormElement) => void;
|
|
150
|
+
save: () => void;
|
|
151
|
+
onSave: () => void;
|
|
152
|
+
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
153
|
+
modelValue: PropType<FormSchema>;
|
|
154
|
+
schemaContext: {
|
|
155
|
+
type: PropType<Record<string, any>>;
|
|
156
|
+
default: () => {};
|
|
157
|
+
};
|
|
158
|
+
templates: {
|
|
159
|
+
type: PropType<TemplateData>;
|
|
160
|
+
default: () => never[];
|
|
161
|
+
};
|
|
162
|
+
omitMenus: {
|
|
163
|
+
type: PropType<string[]>;
|
|
164
|
+
default: () => never[];
|
|
165
|
+
};
|
|
166
|
+
}>> & Readonly<{
|
|
167
|
+
onAdd?: ((element: FormElement) => any) | undefined;
|
|
168
|
+
onSave?: (() => any) | undefined;
|
|
169
|
+
onOnSave?: (() => any) | undefined;
|
|
170
|
+
}>, {
|
|
171
|
+
schemaContext: Record<string, any>;
|
|
172
|
+
templates: TemplateData;
|
|
173
|
+
omitMenus: string[];
|
|
174
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
175
|
+
|
|
176
|
+
export declare type FormElement = {
|
|
177
|
+
title: string;
|
|
178
|
+
component: string;
|
|
179
|
+
render: string | VNode | Component;
|
|
180
|
+
icon: string | VNode | Component;
|
|
181
|
+
type: 'assist' | 'layout' | 'basic' | 'high';
|
|
182
|
+
order: number;
|
|
183
|
+
modelName?: string;
|
|
184
|
+
attrSchema: FormSchema;
|
|
185
|
+
lbTitle?: boolean;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export declare interface FormInstance extends FormRenderProps {
|
|
189
|
+
formValues: Record<string, any>;
|
|
190
|
+
selectData: Record<string, Record<string, any>>;
|
|
191
|
+
initialValues: Record<string, Record<string, any>>;
|
|
192
|
+
context: Record<string, any>;
|
|
193
|
+
vCodePass: boolean;
|
|
194
|
+
updateFormValues: (values: Record<string, any>, isAssign?: boolean) => void;
|
|
195
|
+
updateSelectData: (key: string, value: Record<string, any>) => void;
|
|
196
|
+
updateInitialValues: (values: Record<string, any>) => void;
|
|
197
|
+
updateVCodePass: (value: boolean) => void;
|
|
198
|
+
validate: () => FormValidationResult | undefined;
|
|
199
|
+
resetFields: (names?: string[]) => void;
|
|
200
|
+
submit: () => void;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export declare interface FormItemType {
|
|
204
|
+
label?: string;
|
|
205
|
+
name: string;
|
|
206
|
+
component: string;
|
|
207
|
+
required?: boolean;
|
|
208
|
+
props?: Record<string, any>;
|
|
209
|
+
initialValue?: any;
|
|
210
|
+
help?: string;
|
|
211
|
+
children?: FormItemType[];
|
|
212
|
+
hidden?: boolean | string;
|
|
213
|
+
hideLabel?: boolean;
|
|
214
|
+
designKey?: string;
|
|
215
|
+
rules?: FormRule[];
|
|
216
|
+
class?: any;
|
|
217
|
+
style?: any;
|
|
218
|
+
change?: FormChange[];
|
|
219
|
+
dialog?: boolean;
|
|
220
|
+
width?: number;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export declare const FormRender: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
224
|
+
|
|
225
|
+
declare interface FormRenderProps {
|
|
226
|
+
schema: FormSchema;
|
|
227
|
+
schemaContext?: Record<string, any>;
|
|
228
|
+
design?: boolean;
|
|
229
|
+
footer?: boolean;
|
|
230
|
+
read?: boolean;
|
|
231
|
+
pageRulePath?: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare type FormRule = {
|
|
235
|
+
type: 'email' | 'url' | 'custom' | string;
|
|
236
|
+
customReg?: string;
|
|
237
|
+
templateExp?: any;
|
|
238
|
+
message?: string;
|
|
239
|
+
trigger: string[];
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export declare type FormSchema = {
|
|
243
|
+
labelWidth?: number;
|
|
244
|
+
labelPosition?: 'top' | 'left' | 'right';
|
|
245
|
+
labelSuffix?: string;
|
|
246
|
+
size?: 'default' | 'small' | 'large';
|
|
247
|
+
disabled?: boolean;
|
|
248
|
+
hideRequiredAsterisk?: boolean;
|
|
249
|
+
labelBold?: boolean;
|
|
250
|
+
scrollToError?: boolean;
|
|
251
|
+
initialValues?: Record<string, any>;
|
|
252
|
+
key?: string;
|
|
253
|
+
items: FormItemType[];
|
|
254
|
+
rulePath?: string;
|
|
255
|
+
hidden?: boolean;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
declare type Locale = {
|
|
259
|
+
menus: {
|
|
260
|
+
basicTitle: string;
|
|
261
|
+
highTitle: string;
|
|
262
|
+
layoutTitle: string;
|
|
263
|
+
assistTitle: string;
|
|
264
|
+
useTemplateBtn: string;
|
|
265
|
+
};
|
|
266
|
+
actions: {
|
|
267
|
+
previewJson: string;
|
|
268
|
+
previewVueCode: string;
|
|
269
|
+
previewForm: string;
|
|
270
|
+
clear: string;
|
|
271
|
+
save: string;
|
|
272
|
+
};
|
|
273
|
+
canvas: {
|
|
274
|
+
emptyTip: string;
|
|
275
|
+
wrapperEmptyTip: string;
|
|
276
|
+
};
|
|
277
|
+
attr: {
|
|
278
|
+
tab1: {
|
|
279
|
+
title: string;
|
|
280
|
+
emptyTip: string;
|
|
281
|
+
linkage: {
|
|
282
|
+
text: string;
|
|
283
|
+
action1: string;
|
|
284
|
+
action2: string;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
tab2: {
|
|
288
|
+
title: string;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
declare type Options = {
|
|
294
|
+
request?: (options: Record<string, any>) => Promise<Record<string, any>>;
|
|
295
|
+
extendElements?: Record<string, FormElement>;
|
|
296
|
+
lang?: 'zh' | 'en';
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
export declare type PageMethods = {
|
|
300
|
+
findRef: (key: string) => any;
|
|
301
|
+
setFormDisabled: (key: string, disabled: boolean) => void;
|
|
302
|
+
validate: (keys: string[] | string) => Promise<void>;
|
|
303
|
+
getData: (keys?: string[] | string) => any;
|
|
304
|
+
resetFields: (keys?: string[] | string) => void;
|
|
305
|
+
emit: (event: 'done' | 'refresh') => void;
|
|
306
|
+
setData: (key: string, dataModel: any, isAssign: boolean) => void;
|
|
307
|
+
getItemByName: (formKey: string, itemKey: string) => FormItemType | null | undefined;
|
|
308
|
+
setHidden: (key: string, hiddenState: boolean) => void;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export declare const PageRender: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
312
|
+
ruleMap: Record<string, any>;
|
|
313
|
+
pageSchema: PageSchema;
|
|
314
|
+
pageParams?: any;
|
|
315
|
+
}>, {}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
316
|
+
done: (...args: any[]) => void;
|
|
317
|
+
refresh: (...args: any[]) => void;
|
|
318
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
319
|
+
ruleMap: Record<string, any>;
|
|
320
|
+
pageSchema: PageSchema;
|
|
321
|
+
pageParams?: any;
|
|
322
|
+
}>, {}>>> & Readonly<{
|
|
323
|
+
onDone?: ((...args: any[]) => any) | undefined;
|
|
324
|
+
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
325
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
326
|
+
|
|
327
|
+
declare type PageSchema = {
|
|
328
|
+
key: string;
|
|
329
|
+
rulePath?: string;
|
|
330
|
+
onMounted?: string;
|
|
331
|
+
onActivated?: string;
|
|
332
|
+
content: Array<{
|
|
333
|
+
type: 'form';
|
|
334
|
+
schema: FormSchema;
|
|
335
|
+
} | {
|
|
336
|
+
type: 'table';
|
|
337
|
+
schema: TableSchema;
|
|
338
|
+
}>;
|
|
339
|
+
btns: Array<{
|
|
340
|
+
key: string;
|
|
341
|
+
text: string;
|
|
342
|
+
onClick: string;
|
|
343
|
+
disabled: boolean;
|
|
344
|
+
visible: boolean;
|
|
345
|
+
}>;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
declare interface TableColumn {
|
|
349
|
+
label: string;
|
|
350
|
+
key: string;
|
|
351
|
+
minWidth?: string;
|
|
352
|
+
fixed?: boolean;
|
|
353
|
+
hidden?: boolean;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export declare const TableRender: DefineComponent<ExtractPropTypes< {
|
|
357
|
+
schema: {
|
|
358
|
+
required: true;
|
|
359
|
+
type: PropType<TableSchema>;
|
|
360
|
+
};
|
|
361
|
+
modelValue: PropType<Array<any>>;
|
|
362
|
+
design: {
|
|
363
|
+
type: PropType<boolean>;
|
|
364
|
+
};
|
|
365
|
+
read: {
|
|
366
|
+
type: PropType<boolean>;
|
|
367
|
+
};
|
|
368
|
+
pageRulePath: {
|
|
369
|
+
type: PropType<string>;
|
|
370
|
+
};
|
|
371
|
+
}>, {
|
|
372
|
+
setCellData: (rowIndex: number, field: string, value: any) => void;
|
|
373
|
+
clearSelection: () => void;
|
|
374
|
+
getData: () => any[];
|
|
375
|
+
getCurrentRow: () => Record<string, any> | undefined;
|
|
376
|
+
getSelectedRows: () => any;
|
|
377
|
+
addRow: (rowData?: {}) => void;
|
|
378
|
+
deleteRow: (rowIndex: number) => void;
|
|
379
|
+
refresh: () => Promise<void>;
|
|
380
|
+
validate: () => Promise<boolean>;
|
|
381
|
+
setData: (data: any[]) => void;
|
|
382
|
+
selectRow: (row: Record<string, any>) => void;
|
|
383
|
+
selectRowNum: (num: number) => void;
|
|
384
|
+
setTotal: (val: number) => void;
|
|
385
|
+
getPagination: () => {
|
|
386
|
+
pageNum: number;
|
|
387
|
+
pageSize: number;
|
|
388
|
+
};
|
|
389
|
+
setPagination: (val: {
|
|
390
|
+
pageNum: number;
|
|
391
|
+
pageSize: number;
|
|
392
|
+
}) => {
|
|
393
|
+
pagination: {
|
|
394
|
+
pageNum: number;
|
|
395
|
+
pageSize: number;
|
|
396
|
+
};
|
|
397
|
+
isChange: boolean;
|
|
398
|
+
};
|
|
399
|
+
type: string;
|
|
400
|
+
design: boolean;
|
|
401
|
+
read: boolean;
|
|
402
|
+
pageRulePath: string;
|
|
403
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
404
|
+
schema: {
|
|
405
|
+
required: true;
|
|
406
|
+
type: PropType<TableSchema>;
|
|
407
|
+
};
|
|
408
|
+
modelValue: PropType<Array<any>>;
|
|
409
|
+
design: {
|
|
410
|
+
type: PropType<boolean>;
|
|
411
|
+
};
|
|
412
|
+
read: {
|
|
413
|
+
type: PropType<boolean>;
|
|
414
|
+
};
|
|
415
|
+
pageRulePath: {
|
|
416
|
+
type: PropType<string>;
|
|
417
|
+
};
|
|
418
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
419
|
+
|
|
420
|
+
declare type TableSchema = {
|
|
421
|
+
label: string;
|
|
422
|
+
key: string;
|
|
423
|
+
rulePath: string;
|
|
424
|
+
rowKey?: string;
|
|
425
|
+
addForm?: FormRenderProps;
|
|
426
|
+
showDynamicSearch?: boolean;
|
|
427
|
+
multipleSelection?: boolean;
|
|
428
|
+
highlightCurrentRow?: boolean;
|
|
429
|
+
rowClick?: string;
|
|
430
|
+
rowDbClick?: string;
|
|
431
|
+
sizeChange?: string;
|
|
432
|
+
pageChange?: string;
|
|
433
|
+
topBtns?: Record<string, any>[];
|
|
434
|
+
rowBtns?: Record<string, any>[];
|
|
435
|
+
columns: TableColumn[];
|
|
436
|
+
form?: FormSchema;
|
|
437
|
+
hidden?: boolean;
|
|
438
|
+
hiddenPagination?: boolean;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
export declare type TemplateData = {
|
|
442
|
+
name: string;
|
|
443
|
+
schema: FormSchema;
|
|
444
|
+
id?: string;
|
|
445
|
+
}[];
|
|
446
|
+
|
|
447
|
+
export declare const useFormInstance: () => {
|
|
448
|
+
readonly formValues: {
|
|
449
|
+
readonly [x: string]: any;
|
|
450
|
+
};
|
|
451
|
+
readonly selectData: {
|
|
452
|
+
readonly [x: string]: {
|
|
453
|
+
readonly [x: string]: any;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
readonly initialValues: {
|
|
457
|
+
readonly [x: string]: {
|
|
458
|
+
readonly [x: string]: any;
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
readonly context: {
|
|
462
|
+
readonly [x: string]: any;
|
|
463
|
+
};
|
|
464
|
+
readonly vCodePass: boolean;
|
|
465
|
+
readonly updateFormValues: (values: Record<string, any>, isAssign?: boolean) => void;
|
|
466
|
+
readonly updateSelectData: (key: string, value: Record<string, any>) => void;
|
|
467
|
+
readonly updateInitialValues: (values: Record<string, any>) => void;
|
|
468
|
+
readonly updateVCodePass: (value: boolean) => void;
|
|
469
|
+
readonly validate: () => FormValidationResult | undefined;
|
|
470
|
+
readonly resetFields: (names?: string[]) => void;
|
|
471
|
+
readonly submit: () => void;
|
|
472
|
+
readonly schema: {
|
|
473
|
+
readonly labelWidth?: number | undefined;
|
|
474
|
+
readonly labelPosition?: ("top" | "left" | "right") | undefined;
|
|
475
|
+
readonly labelSuffix?: string | undefined;
|
|
476
|
+
readonly size?: ("default" | "small" | "large") | undefined;
|
|
477
|
+
readonly disabled?: boolean | undefined;
|
|
478
|
+
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
479
|
+
readonly labelBold?: boolean | undefined;
|
|
480
|
+
readonly scrollToError?: boolean | undefined;
|
|
481
|
+
readonly initialValues?: {
|
|
482
|
+
readonly [x: string]: any;
|
|
483
|
+
} | undefined;
|
|
484
|
+
readonly key?: string | undefined;
|
|
485
|
+
readonly items: readonly {
|
|
486
|
+
readonly label?: string | undefined;
|
|
487
|
+
readonly name: string;
|
|
488
|
+
readonly component: string;
|
|
489
|
+
readonly required?: boolean | undefined;
|
|
490
|
+
readonly props?: {
|
|
491
|
+
readonly [x: string]: any;
|
|
492
|
+
} | undefined;
|
|
493
|
+
readonly initialValue?: any;
|
|
494
|
+
readonly help?: string | undefined;
|
|
495
|
+
readonly children?: readonly any[] | undefined;
|
|
496
|
+
readonly hidden?: (boolean | string) | undefined;
|
|
497
|
+
readonly hideLabel?: boolean | undefined;
|
|
498
|
+
readonly designKey?: string | undefined;
|
|
499
|
+
readonly rules?: readonly {
|
|
500
|
+
readonly type: "email" | "url" | "custom" | string;
|
|
501
|
+
readonly customReg?: string | undefined;
|
|
502
|
+
readonly templateExp?: any;
|
|
503
|
+
readonly message?: string | undefined;
|
|
504
|
+
readonly trigger: readonly string[];
|
|
505
|
+
}[] | undefined;
|
|
506
|
+
readonly class?: any;
|
|
507
|
+
readonly style?: any;
|
|
508
|
+
readonly change?: readonly {
|
|
509
|
+
readonly target: string;
|
|
510
|
+
readonly value?: any;
|
|
511
|
+
readonly condition?: any;
|
|
512
|
+
}[] | undefined;
|
|
513
|
+
readonly dialog?: boolean | undefined;
|
|
514
|
+
readonly width?: number | undefined;
|
|
515
|
+
}[];
|
|
516
|
+
readonly rulePath?: string | undefined;
|
|
517
|
+
readonly hidden?: boolean | undefined;
|
|
518
|
+
};
|
|
519
|
+
readonly schemaContext?: {
|
|
520
|
+
readonly [x: string]: any;
|
|
521
|
+
} | undefined;
|
|
522
|
+
readonly design?: boolean | undefined;
|
|
523
|
+
readonly footer?: boolean | undefined;
|
|
524
|
+
readonly read?: boolean | undefined;
|
|
525
|
+
readonly pageRulePath?: string | undefined;
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
export { }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent as p, ref as c, resolveComponent as m, openBlock as r, createBlock as n, normalizeProps as u, guardReactiveProps as _, withCtx as o, createElementVNode as l, toDisplayString as f, unref as t, normalizeClass as v, createCommentVNode as C, createVNode as d, Transition as h, withDirectives as w, vShow as b } from "vue";
|
|
2
|
+
import { _ as k, a as $, b as y } from "./index-DoIvJXpY.js";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
const B = { class: "card-header" }, E = /* @__PURE__ */ p({
|
|
5
|
+
__name: "Card",
|
|
6
|
+
props: {
|
|
7
|
+
children: {},
|
|
8
|
+
collapsible: { type: Boolean },
|
|
9
|
+
header: {}
|
|
10
|
+
},
|
|
11
|
+
setup(N) {
|
|
12
|
+
const e = c(!1);
|
|
13
|
+
return (a, s) => {
|
|
14
|
+
const i = m("ElCard");
|
|
15
|
+
return r(), n(i, u(_(a.$attrs)), {
|
|
16
|
+
header: o(() => [
|
|
17
|
+
l("div", B, [
|
|
18
|
+
l("span", null, f(a.header), 1),
|
|
19
|
+
a.collapsible ? (r(), n(t(k), {
|
|
20
|
+
key: 0,
|
|
21
|
+
name: "dropdown",
|
|
22
|
+
onClick: s[0] || (s[0] = (V) => e.value = !e.value),
|
|
23
|
+
class: v(["dropdown-icon", { "is-collapsed": e.value }])
|
|
24
|
+
}, null, 8, ["class"])) : C("", !0)
|
|
25
|
+
])
|
|
26
|
+
]),
|
|
27
|
+
default: o(() => [
|
|
28
|
+
d(h, { name: "collapse" }, {
|
|
29
|
+
default: o(() => [
|
|
30
|
+
w(l("div", null, [
|
|
31
|
+
d(t($), { list: a.children }, null, 8, ["list"])
|
|
32
|
+
], 512), [
|
|
33
|
+
[b, !e.value]
|
|
34
|
+
])
|
|
35
|
+
]),
|
|
36
|
+
_: 1
|
|
37
|
+
})
|
|
38
|
+
]),
|
|
39
|
+
_: 1
|
|
40
|
+
}, 16);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}), P = /* @__PURE__ */ y(E, [["__scopeId", "data-v-f48b76d3"]]);
|
|
44
|
+
export {
|
|
45
|
+
P as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as m, mergeModels as i, useModel as c, resolveComponent as f, openBlock as g, createBlock as v, mergeProps as C, unref as l } from "vue";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import { u as y } from "./useSelect-DkY4BS54.js";
|
|
4
|
+
const h = /* @__PURE__ */ m({
|
|
5
|
+
__name: "Cascader",
|
|
6
|
+
props: /* @__PURE__ */ i({
|
|
7
|
+
options: { default: () => [] },
|
|
8
|
+
multiple: { type: Boolean, default: !1 },
|
|
9
|
+
mode: { default: "static" },
|
|
10
|
+
labelKey: { default: "label" },
|
|
11
|
+
valueKey: { default: "value" },
|
|
12
|
+
disabledKey: {},
|
|
13
|
+
api: {},
|
|
14
|
+
name: { default: "" },
|
|
15
|
+
onChange: {}
|
|
16
|
+
}, {
|
|
17
|
+
modelValue: {},
|
|
18
|
+
modelModifiers: {}
|
|
19
|
+
}),
|
|
20
|
+
emits: ["update:modelValue"],
|
|
21
|
+
setup(o) {
|
|
22
|
+
const n = o, a = c(o, "modelValue"), { currentOptions: u, selectChange: s, loading: d } = y(n);
|
|
23
|
+
return (e, t) => {
|
|
24
|
+
const p = f("el-cascader");
|
|
25
|
+
return g(), v(p, C({
|
|
26
|
+
modelValue: a.value,
|
|
27
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => a.value = r),
|
|
28
|
+
options: l(u),
|
|
29
|
+
loading: l(d),
|
|
30
|
+
props: {
|
|
31
|
+
multiple: e.multiple,
|
|
32
|
+
label: e.labelKey,
|
|
33
|
+
value: e.valueKey
|
|
34
|
+
}
|
|
35
|
+
}, e.$attrs, { onChange: l(s) }), null, 16, ["modelValue", "options", "loading", "props", "onChange"]);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
h as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineComponent as w, mergeModels as B, useModel as D, watch as M, resolveComponent as u, resolveDirective as F, unref as a, openBlock as l, createElementBlock as n, toDisplayString as I, Fragment as d, createCommentVNode as i, withDirectives as S, createBlock as s, mergeProps as j, withCtx as f, renderList as h } from "vue";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import { u as E } from "./index-DoIvJXpY.js";
|
|
4
|
+
import { u as L } from "./useSelect-DkY4BS54.js";
|
|
5
|
+
const N = { key: 0 }, O = {
|
|
6
|
+
key: 0,
|
|
7
|
+
style: { "font-size": "12px" }
|
|
8
|
+
}, A = /* @__PURE__ */ w({
|
|
9
|
+
__name: "Checkbox",
|
|
10
|
+
props: /* @__PURE__ */ B({
|
|
11
|
+
options: { default: () => [] },
|
|
12
|
+
mode: { default: "static" },
|
|
13
|
+
labelKey: { default: "label" },
|
|
14
|
+
valueKey: { default: "value" },
|
|
15
|
+
disabledKey: {},
|
|
16
|
+
api: {},
|
|
17
|
+
name: { default: "" },
|
|
18
|
+
onChange: {},
|
|
19
|
+
optionType: { default: "circle" },
|
|
20
|
+
direction: { default: "horizontal" },
|
|
21
|
+
space: { default: 20 }
|
|
22
|
+
}, {
|
|
23
|
+
modelValue: {},
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
setup(p) {
|
|
28
|
+
const k = p, t = D(p, "modelValue"), g = E(), { currentOptions: r, selectChange: c, loading: m } = L(k);
|
|
29
|
+
return M(t, c), (e, y) => {
|
|
30
|
+
var b;
|
|
31
|
+
const K = u("el-checkbox"), C = u("el-checkbox-button"), _ = u("el-space"), V = u("el-checkbox-group"), z = F("loading");
|
|
32
|
+
return a(g).read ? (l(), n("div", N, I((b = t.value) == null ? void 0 : b.map((o) => {
|
|
33
|
+
var v;
|
|
34
|
+
return (v = a(r).find((T) => T[e.valueKey] === o)) == null ? void 0 : v[e.labelKey];
|
|
35
|
+
}).join("、")), 1)) : (l(), n(d, { key: 1 }, [
|
|
36
|
+
!a(r).length && !a(m) ? (l(), n("div", O, "暂无选项")) : i("", !0),
|
|
37
|
+
S((l(), s(V, j(e.$attrs, {
|
|
38
|
+
modelValue: t.value,
|
|
39
|
+
"onUpdate:modelValue": y[0] || (y[0] = (o) => t.value = o),
|
|
40
|
+
onChange: a(c)
|
|
41
|
+
}), {
|
|
42
|
+
default: f(() => [
|
|
43
|
+
e.optionType === "circle" || e.optionType === "border" ? (l(!0), n(d, { key: 0 }, h(a(r), (o) => (l(), s(K, {
|
|
44
|
+
key: o[e.valueKey],
|
|
45
|
+
label: o[e.labelKey],
|
|
46
|
+
value: o[e.valueKey],
|
|
47
|
+
border: e.optionType === "border"
|
|
48
|
+
}, null, 8, ["label", "value", "border"]))), 128)) : i("", !0),
|
|
49
|
+
e.optionType === "button" ? (l(), s(_, {
|
|
50
|
+
key: 1,
|
|
51
|
+
wrap: "",
|
|
52
|
+
size: [e.space, e.space]
|
|
53
|
+
}, {
|
|
54
|
+
default: f(() => [
|
|
55
|
+
(l(!0), n(d, null, h(a(r), (o) => (l(), s(C, {
|
|
56
|
+
key: o[e.valueKey],
|
|
57
|
+
label: o[e.labelKey],
|
|
58
|
+
value: o[e.valueKey],
|
|
59
|
+
size: "large"
|
|
60
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["size"])) : i("", !0)
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 16, ["modelValue", "onChange"])), [
|
|
67
|
+
[z, a(m)]
|
|
68
|
+
])
|
|
69
|
+
], 64));
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export {
|
|
74
|
+
A as default
|
|
75
|
+
};
|