tiddy 2.3.2 → 2.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.
- package/dist/index.d.ts +66 -59
- package/dist/index.js +14 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { AllowedComponentProps, CSSProperties, Component, ComputedRef, DefineComponent, ExtractPublicPropTypes, PropType, Raw, Ref as Ref$1, Slot } from "vue";
|
|
1
|
+
import * as vue69 from "vue";
|
|
2
|
+
import { AllowedComponentProps, CSSProperties, Component, ComputedRef, DefineComponent, ExtractPublicPropTypes, HTMLAttributes, PropType, Raw, Ref as Ref$1, Slot } from "vue";
|
|
3
3
|
import * as element_plus0 from "element-plus";
|
|
4
4
|
import { DialogInstance, DialogProps, FormInstance, FormItemProp, FormItemProps, FormItemRule, FormProps, SelectInstance, TableColumnInstance, TableInstance } from "element-plus";
|
|
5
5
|
|
|
@@ -23,6 +23,9 @@ type OrRef<T> = T | Ref<T>;
|
|
|
23
23
|
type TdFieldsProps = {
|
|
24
24
|
fields: TdFormFieldProps[];
|
|
25
25
|
};
|
|
26
|
+
type TdArrayFieldsProps = {
|
|
27
|
+
fields: OrFunction<TdFormFieldProps[]>;
|
|
28
|
+
};
|
|
26
29
|
declare const objectFieldPropsDef: {
|
|
27
30
|
prop: {
|
|
28
31
|
type: PropType<OrFunction<string>>;
|
|
@@ -148,7 +151,7 @@ declare const arrayFieldPropsDef: {
|
|
|
148
151
|
type: PropType<FormProps["labelPosition"]>;
|
|
149
152
|
};
|
|
150
153
|
fields: {
|
|
151
|
-
type: PropType<any[]
|
|
154
|
+
type: PropType<OrFunction<any[]>>;
|
|
152
155
|
default: () => never[];
|
|
153
156
|
};
|
|
154
157
|
type: {
|
|
@@ -180,7 +183,7 @@ declare const arrayFieldPropsDef: {
|
|
|
180
183
|
default: boolean;
|
|
181
184
|
};
|
|
182
185
|
};
|
|
183
|
-
type TdArrayFieldProps =
|
|
186
|
+
type TdArrayFieldProps = TdArrayFieldsProps & ExtractPublicPropTypes<typeof arrayFieldPropsDef> & AllowedComponentProps;
|
|
184
187
|
declare const layoutFieldPropsDef: {
|
|
185
188
|
prop: {
|
|
186
189
|
type: PropType<OrFunction<string>>;
|
|
@@ -241,9 +244,10 @@ declare const tdformItemProps: {
|
|
|
241
244
|
};
|
|
242
245
|
};
|
|
243
246
|
type TdFormItemProps = ExtractPublicPropTypes<typeof tdformItemProps> & Partial<FormItemProps>;
|
|
244
|
-
|
|
247
|
+
type PropsOrRef<T> = { [K in keyof T]?: OrRef<T[K]> } | Ref$1<T>;
|
|
248
|
+
declare function widget<T>(c: T | Raw<T>, props?: PropsOrRef<PropsOf<T> & HTMLAttributes>): {
|
|
245
249
|
component: T | Raw<T>;
|
|
246
|
-
widget:
|
|
250
|
+
widget: PropsOrRef<PropsOf<T> & HTMLAttributes> | undefined;
|
|
247
251
|
};
|
|
248
252
|
//#endregion
|
|
249
253
|
//#region src/form/form.vue.d.ts
|
|
@@ -252,7 +256,7 @@ declare function isValidateError(prop: string): boolean;
|
|
|
252
256
|
declare const expose$1: {
|
|
253
257
|
reValidateErrorFields: typeof reValidateErrorFields;
|
|
254
258
|
isValidateError: typeof isValidateError;
|
|
255
|
-
model:
|
|
259
|
+
model: vue69.ComputedRef<unknown>;
|
|
256
260
|
};
|
|
257
261
|
type __TdFormExpose = typeof expose$1 & FormInstance;
|
|
258
262
|
declare var __VLS_11$2: {}, __VLS_13$1: {}, __VLS_19$1: {};
|
|
@@ -263,24 +267,24 @@ type __VLS_Slots$4 = {} & {
|
|
|
263
267
|
} & {
|
|
264
268
|
suffix?: (props: typeof __VLS_19$1) => any;
|
|
265
269
|
};
|
|
266
|
-
declare const __VLS_base$4:
|
|
270
|
+
declare const __VLS_base$4: vue69.DefineComponent<vue69.ExtractPropTypes<{
|
|
267
271
|
fields: {
|
|
268
|
-
type:
|
|
272
|
+
type: vue69.PropType<TdFormFieldProps[]>;
|
|
269
273
|
default: () => never[];
|
|
270
274
|
};
|
|
271
275
|
item: {
|
|
272
|
-
type:
|
|
276
|
+
type: vue69.PropType<element_plus0.FormItemProps>;
|
|
273
277
|
default: () => {};
|
|
274
278
|
};
|
|
275
|
-
}>, __TdFormExpose, {}, {}, {},
|
|
279
|
+
}>, __TdFormExpose, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {
|
|
276
280
|
submit: (data: any) => any;
|
|
277
|
-
}, string,
|
|
281
|
+
}, string, vue69.PublicProps, Readonly<vue69.ExtractPropTypes<{
|
|
278
282
|
fields: {
|
|
279
|
-
type:
|
|
283
|
+
type: vue69.PropType<TdFormFieldProps[]>;
|
|
280
284
|
default: () => never[];
|
|
281
285
|
};
|
|
282
286
|
item: {
|
|
283
|
-
type:
|
|
287
|
+
type: vue69.PropType<element_plus0.FormItemProps>;
|
|
284
288
|
default: () => {};
|
|
285
289
|
};
|
|
286
290
|
}>> & Readonly<{
|
|
@@ -288,7 +292,7 @@ declare const __VLS_base$4: vue56.DefineComponent<vue56.ExtractPropTypes<{
|
|
|
288
292
|
}>, {
|
|
289
293
|
fields: TdFormFieldProps[];
|
|
290
294
|
item: element_plus0.FormItemProps;
|
|
291
|
-
}, {}, {}, {}, string,
|
|
295
|
+
}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any>;
|
|
292
296
|
declare const __VLS_export$6: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
293
297
|
declare const _default$2: typeof __VLS_export$6;
|
|
294
298
|
type __VLS_WithSlots$4<T, S> = T & {
|
|
@@ -300,37 +304,37 @@ type __VLS_WithSlots$4<T, S> = T & {
|
|
|
300
304
|
//#region src/form/form-item.vue.d.ts
|
|
301
305
|
declare var __VLS_10$1: string | number, __VLS_11$1: any;
|
|
302
306
|
type __VLS_Slots$3 = {} & { [K in NonNullable<typeof __VLS_10$1>]?: (props: typeof __VLS_11$1) => any };
|
|
303
|
-
declare const __VLS_base$3:
|
|
307
|
+
declare const __VLS_base$3: vue69.DefineComponent<vue69.ExtractPropTypes<{
|
|
304
308
|
messageLabel: {
|
|
305
|
-
type:
|
|
309
|
+
type: vue69.PropType<OrRef<string>>;
|
|
306
310
|
default: string;
|
|
307
311
|
};
|
|
308
312
|
formatMessage: {
|
|
309
|
-
type:
|
|
313
|
+
type: vue69.PropType<AnyFunction>;
|
|
310
314
|
default: null;
|
|
311
315
|
};
|
|
312
316
|
hideRequiredAsterisk: {
|
|
313
|
-
type:
|
|
317
|
+
type: vue69.PropType<boolean>;
|
|
314
318
|
default: boolean;
|
|
315
319
|
};
|
|
316
|
-
}>, {}, {}, {}, {},
|
|
320
|
+
}>, {}, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<vue69.ExtractPropTypes<{
|
|
317
321
|
messageLabel: {
|
|
318
|
-
type:
|
|
322
|
+
type: vue69.PropType<OrRef<string>>;
|
|
319
323
|
default: string;
|
|
320
324
|
};
|
|
321
325
|
formatMessage: {
|
|
322
|
-
type:
|
|
326
|
+
type: vue69.PropType<AnyFunction>;
|
|
323
327
|
default: null;
|
|
324
328
|
};
|
|
325
329
|
hideRequiredAsterisk: {
|
|
326
|
-
type:
|
|
330
|
+
type: vue69.PropType<boolean>;
|
|
327
331
|
default: boolean;
|
|
328
332
|
};
|
|
329
333
|
}>> & Readonly<{}>, {
|
|
330
334
|
hideRequiredAsterisk: boolean;
|
|
331
335
|
messageLabel: any;
|
|
332
336
|
formatMessage: AnyFunction;
|
|
333
|
-
}, {}, {}, {}, string,
|
|
337
|
+
}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any>;
|
|
334
338
|
declare const __VLS_export$5: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
335
339
|
declare const _default$4: typeof __VLS_export$5;
|
|
336
340
|
type __VLS_WithSlots$3<T, S> = T & {
|
|
@@ -340,7 +344,7 @@ type __VLS_WithSlots$3<T, S> = T & {
|
|
|
340
344
|
};
|
|
341
345
|
//#endregion
|
|
342
346
|
//#region src/form/form-field.vue.d.ts
|
|
343
|
-
declare const __VLS_export$4:
|
|
347
|
+
declare const __VLS_export$4: vue69.DefineComponent<{}, {}, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any>;
|
|
344
348
|
declare const _default$3: typeof __VLS_export$4;
|
|
345
349
|
//#endregion
|
|
346
350
|
//#region src/form/index.d.ts
|
|
@@ -388,19 +392,19 @@ type __VLS_Slots$2 = {} & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof
|
|
|
388
392
|
} & {
|
|
389
393
|
after?: (props: typeof __VLS_19) => any;
|
|
390
394
|
};
|
|
391
|
-
declare const __VLS_base$2:
|
|
395
|
+
declare const __VLS_base$2: vue69.DefineComponent<vue69.ExtractPropTypes<{
|
|
392
396
|
columns: {
|
|
393
|
-
type:
|
|
397
|
+
type: vue69.PropType<TdTableColumnProps[]>;
|
|
394
398
|
default: () => never[];
|
|
395
399
|
};
|
|
396
|
-
}>, TableInstance, {}, {}, {},
|
|
400
|
+
}>, TableInstance, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<vue69.ExtractPropTypes<{
|
|
397
401
|
columns: {
|
|
398
|
-
type:
|
|
402
|
+
type: vue69.PropType<TdTableColumnProps[]>;
|
|
399
403
|
default: () => never[];
|
|
400
404
|
};
|
|
401
405
|
}>> & Readonly<{}>, {
|
|
402
406
|
columns: TdTableColumnProps[];
|
|
403
|
-
}, {}, {}, {}, string,
|
|
407
|
+
}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any>;
|
|
404
408
|
declare const __VLS_export$3: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
405
409
|
declare const _default$5: typeof __VLS_export$3;
|
|
406
410
|
type __VLS_WithSlots$2<T, S> = T & {
|
|
@@ -410,55 +414,55 @@ type __VLS_WithSlots$2<T, S> = T & {
|
|
|
410
414
|
};
|
|
411
415
|
//#endregion
|
|
412
416
|
//#region src/table/table-col.vue.d.ts
|
|
413
|
-
declare const __VLS_export$2:
|
|
417
|
+
declare const __VLS_export$2: vue69.DefineComponent<vue69.ExtractPropTypes<{
|
|
414
418
|
slots: {
|
|
415
|
-
type:
|
|
419
|
+
type: vue69.PropType<OrArray<SlotDef>>;
|
|
416
420
|
default: null;
|
|
417
421
|
};
|
|
418
422
|
columns: {
|
|
419
|
-
type:
|
|
423
|
+
type: vue69.PropType<TdTableColumnProps[]>;
|
|
420
424
|
default: () => never[];
|
|
421
425
|
};
|
|
422
426
|
transform: {
|
|
423
|
-
type:
|
|
427
|
+
type: vue69.PropType<AnyFunction[]>;
|
|
424
428
|
default: () => never[];
|
|
425
429
|
};
|
|
426
430
|
hide: {
|
|
427
|
-
type:
|
|
431
|
+
type: vue69.PropType<boolean | vue69.Ref<boolean>>;
|
|
428
432
|
default: false;
|
|
429
433
|
};
|
|
430
434
|
dangerouslyUseHTMLString: {
|
|
431
|
-
type:
|
|
435
|
+
type: vue69.PropType<boolean | vue69.Ref<boolean>>;
|
|
432
436
|
default: false;
|
|
433
437
|
};
|
|
434
|
-
}>, {}, {}, {}, {},
|
|
438
|
+
}>, {}, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<vue69.ExtractPropTypes<{
|
|
435
439
|
slots: {
|
|
436
|
-
type:
|
|
440
|
+
type: vue69.PropType<OrArray<SlotDef>>;
|
|
437
441
|
default: null;
|
|
438
442
|
};
|
|
439
443
|
columns: {
|
|
440
|
-
type:
|
|
444
|
+
type: vue69.PropType<TdTableColumnProps[]>;
|
|
441
445
|
default: () => never[];
|
|
442
446
|
};
|
|
443
447
|
transform: {
|
|
444
|
-
type:
|
|
448
|
+
type: vue69.PropType<AnyFunction[]>;
|
|
445
449
|
default: () => never[];
|
|
446
450
|
};
|
|
447
451
|
hide: {
|
|
448
|
-
type:
|
|
452
|
+
type: vue69.PropType<boolean | vue69.Ref<boolean>>;
|
|
449
453
|
default: false;
|
|
450
454
|
};
|
|
451
455
|
dangerouslyUseHTMLString: {
|
|
452
|
-
type:
|
|
456
|
+
type: vue69.PropType<boolean | vue69.Ref<boolean>>;
|
|
453
457
|
default: false;
|
|
454
458
|
};
|
|
455
459
|
}>> & Readonly<{}>, {
|
|
456
460
|
slots: OrArray<SlotDef>;
|
|
457
461
|
columns: TdTableColumnProps[];
|
|
458
462
|
transform: AnyFunction[];
|
|
459
|
-
hide: boolean |
|
|
460
|
-
dangerouslyUseHTMLString: boolean |
|
|
461
|
-
}, {}, {}, {}, string,
|
|
463
|
+
hide: boolean | vue69.Ref<boolean, boolean>;
|
|
464
|
+
dangerouslyUseHTMLString: boolean | vue69.Ref<boolean, boolean>;
|
|
465
|
+
}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any>;
|
|
462
466
|
declare const _default$6: typeof __VLS_export$2;
|
|
463
467
|
//#endregion
|
|
464
468
|
//#region src/table/index.d.ts
|
|
@@ -491,7 +495,7 @@ declare var __VLS_13: "default" | "title" | "header" | "footer", __VLS_14: {
|
|
|
491
495
|
titleClass?: string | undefined;
|
|
492
496
|
};
|
|
493
497
|
type __VLS_Slots$1 = {} & { [K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any };
|
|
494
|
-
declare const __VLS_base$1:
|
|
498
|
+
declare const __VLS_base$1: vue69.DefineComponent<{}, __TdDialogExpose, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any>;
|
|
495
499
|
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
496
500
|
declare const _default: typeof __VLS_export$1;
|
|
497
501
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
@@ -505,29 +509,32 @@ type Instance = InstanceType<typeof _default>;
|
|
|
505
509
|
type TdDialogInstance = Instance & Omit<DialogInstance, keyof Instance & string>;
|
|
506
510
|
//#endregion
|
|
507
511
|
//#region src/enum-select/store.d.ts
|
|
508
|
-
type OptionItem<T> = {
|
|
512
|
+
type OptionItem<T = any, E = undefined> = E extends undefined ? {
|
|
509
513
|
label: string;
|
|
510
514
|
value: T;
|
|
511
|
-
}
|
|
512
|
-
|
|
515
|
+
} : {
|
|
516
|
+
label: string;
|
|
517
|
+
value: T;
|
|
518
|
+
} & E;
|
|
519
|
+
type EnumData<T extends OptionItem> = {
|
|
513
520
|
loading: boolean;
|
|
514
|
-
options: Array<
|
|
515
|
-
fetch?: (code: string) => Promise<
|
|
521
|
+
options: Array<T>;
|
|
522
|
+
fetch?: (code: string) => Promise<T[]>;
|
|
516
523
|
};
|
|
517
524
|
declare function clearEnum(code: string): void;
|
|
518
|
-
declare function getEnum<
|
|
519
|
-
declare function getEnum<
|
|
525
|
+
declare function getEnum<V, E = undefined>(code: string, fetch?: EnumData<OptionItem<V, E>>['fetch']): ComputedRef<OptionItem<V, E>[]>;
|
|
526
|
+
declare function getEnum<V, E = undefined>(code: string, value: V, fetch?: EnumData<OptionItem<V, E>>['fetch']): ComputedRef<OptionItem<V, E> | undefined>;
|
|
520
527
|
declare function resetEnum(code: string): void;
|
|
521
|
-
declare function setDefaultEnumFetch(fetch: Exclude<
|
|
528
|
+
declare function setDefaultEnumFetch(fetch: Exclude<EnumData<any>['fetch'], undefined>): void;
|
|
522
529
|
//#endregion
|
|
523
530
|
//#region src/enum-select/enum-select.vue.d.ts
|
|
524
531
|
type __VLS_Props = {
|
|
525
532
|
code: string;
|
|
526
|
-
fetch?:
|
|
533
|
+
fetch?: EnumData<any>['fetch'];
|
|
527
534
|
};
|
|
528
535
|
declare var __VLS_10: string | number, __VLS_11: any;
|
|
529
536
|
type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any };
|
|
530
|
-
declare const __VLS_base:
|
|
537
|
+
declare const __VLS_base: vue69.DefineComponent<__VLS_Props, SelectInstance, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue69.ComponentProvideOptions, false, {}, any>;
|
|
531
538
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
532
539
|
declare const _default$1: typeof __VLS_export;
|
|
533
540
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -540,10 +547,10 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
540
547
|
type TdEnumSelectInstance = InstanceType<typeof _default$1>;
|
|
541
548
|
//#endregion
|
|
542
549
|
//#region src/hooks/use-reuse.d.ts
|
|
543
|
-
declare function useReuse(): (
|
|
550
|
+
declare function useReuse(): (vue69.DefineComponent<{}, () => null, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any> | vue69.DefineComponent<{}, () => vue69.VNode<vue69.RendererNode, vue69.RendererElement, {
|
|
544
551
|
[key: string]: any;
|
|
545
|
-
}>[] | undefined, {}, {}, {},
|
|
546
|
-
[name: string]:
|
|
552
|
+
}>[] | undefined, {}, {}, {}, vue69.ComponentOptionsMixin, vue69.ComponentOptionsMixin, {}, string, vue69.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue69.ComponentProvideOptions, true, {}, any> | vue69.ComputedRef<Readonly<{
|
|
553
|
+
[name: string]: vue69.Slot<any> | undefined;
|
|
547
554
|
}>>)[];
|
|
548
555
|
//#endregion
|
|
549
556
|
//#region src/utils/index.d.ts
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,10 @@ const fieldsPropsDef = { fields: {
|
|
|
46
46
|
type: Array,
|
|
47
47
|
default: () => []
|
|
48
48
|
} };
|
|
49
|
+
const arrayFieldsPropsDef = { fields: {
|
|
50
|
+
type: [Array, Function],
|
|
51
|
+
default: () => []
|
|
52
|
+
} };
|
|
49
53
|
const commonFieldPropsDef = {
|
|
50
54
|
prop: {
|
|
51
55
|
type: [String, Function],
|
|
@@ -188,7 +192,7 @@ const arrayFieldPropsDef = {
|
|
|
188
192
|
type: Boolean,
|
|
189
193
|
default: false
|
|
190
194
|
},
|
|
191
|
-
...
|
|
195
|
+
...arrayFieldsPropsDef,
|
|
192
196
|
...commonFieldPropsDef
|
|
193
197
|
};
|
|
194
198
|
const layoutFieldPropsDef = {
|
|
@@ -440,13 +444,14 @@ var widget_field_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
440
444
|
});
|
|
441
445
|
const Widget = resolveWidget(props.component);
|
|
442
446
|
const widgetAttrs = computed(() => {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
447
|
+
const attr4Widget = pick(attrs, [{
|
|
448
|
+
from: /^widget/,
|
|
449
|
+
to: (k) => toCamelCase(k.slice(6))
|
|
450
|
+
}]);
|
|
451
|
+
return Object.fromEntries(Object.entries({
|
|
452
|
+
...attr4Widget,
|
|
448
453
|
...unref(props.widget)
|
|
449
|
-
};
|
|
454
|
+
}).map(([k, v]) => [k, unref(v)]));
|
|
450
455
|
});
|
|
451
456
|
const widgetSlots = formCtx.getParentSlots(resolveSlotNames(props.slots, props.prop));
|
|
452
457
|
const formItemSlots = formCtx.getParentSlots(resolveSlotNames(props.itemSlots, props.prop, "item"));
|
|
@@ -683,9 +688,11 @@ var form_field_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
683
688
|
setup(__props) {
|
|
684
689
|
const attrs = useAttrs();
|
|
685
690
|
const fullProp = computed(() => attrs["full-prop"] || attrs.prop);
|
|
691
|
+
const formCtx = inject(formCtxKey);
|
|
686
692
|
const fieldAttrs = computed(() => {
|
|
687
693
|
const attr = {};
|
|
688
694
|
for (const [k, v] of Object.entries(attrs)) if (k === "component" && v) attr[k] = markRaw(toRaw(v));
|
|
695
|
+
else if (k === "fields" && isFunction(v) && !attrs.type) attr[k] = v(getDeepValue(formCtx.model, attrs["full-prop"]));
|
|
689
696
|
else attr[k] = v;
|
|
690
697
|
return attr;
|
|
691
698
|
});
|