@robot-admin/naive-ui-components 0.11.2 → 0.11.4
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/CHANGELOG.md +12 -0
- package/dist/C_Form.d.cts +2 -2
- package/dist/C_Form.d.ts +2 -2
- package/dist/C_Form2.cjs +1 -1
- package/dist/C_Form2.js +1 -1
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants2.d.cts +3 -3
- package/dist/constants2.d.ts +3 -3
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +3 -3
- package/dist/constants4.d.ts +3 -3
- package/dist/data.d.cts +1 -1
- package/dist/data.d.ts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index10.vue.d.cts +2 -2
- package/dist/index10.vue.d.ts +4 -4
- package/dist/index11.vue.d.cts +4 -4
- package/dist/index11.vue.d.ts +3 -3
- package/dist/index12.vue.d.cts +3 -3
- package/dist/index12.vue.d.ts +4 -4
- package/dist/index13.vue.d.cts +4 -4
- package/dist/index13.vue.d.ts +1 -1
- package/dist/index14.vue.d.cts +1 -1
- package/dist/index14.vue.d.ts +5 -5
- package/dist/index15.vue.d.cts +5 -5
- package/dist/index15.vue.d.ts +2 -2
- package/dist/index16.vue.d.cts +2 -2
- package/dist/index16.vue.d.ts +1 -1
- package/dist/index17.vue.d.cts +1 -1
- package/dist/index17.vue.d.ts +5 -5
- package/dist/index18.vue.d.cts +5 -5
- package/dist/index18.vue.d.ts +3 -3
- package/dist/index19.vue.d.cts +2 -2
- package/dist/index19.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +3 -3
- package/dist/index22.vue.d.ts +3 -3
- package/dist/index24.vue.d.cts +2 -2
- package/dist/index24.vue.d.ts +2 -2
- package/dist/index25.vue.d.cts +1 -1
- package/dist/index25.vue.d.ts +1 -1
- package/dist/index26.vue.d.cts +1 -1
- package/dist/index26.vue.d.ts +1 -1
- package/dist/index27.vue.d.cts +2 -2
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index3.vue.d.cts +1 -1
- package/dist/index3.vue.d.ts +1 -1
- package/dist/index4.vue.d.cts +3 -3
- package/dist/index4.vue.d.ts +3 -3
- package/dist/index5.vue.d.cts +3 -3
- package/dist/index6.vue.d.ts +2 -2
- package/dist/index7.vue.d.cts +2 -2
- package/dist/index7.vue.d.ts +1 -1
- package/dist/index8.vue.d.cts +1 -1
- package/dist/index8.vue.d.ts +2 -2
- package/dist/index9.vue.d.cts +2 -2
- package/dist/index9.vue.d.ts +2 -2
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +1 -1
- package/dist/useCollapsePanel.d.ts +1 -1
- package/dist/useCropperCore.d.cts +6 -6
- package/dist/useCropperCore.d.ts +6 -6
- package/dist/useDraggableLayout.d.cts +6 -6
- package/dist/useDraggableLayout.d.ts +6 -6
- package/dist/useDynamicFormState.d.cts +95 -85
- package/dist/useDynamicFormState.d.ts +95 -85
- package/dist/useEdgeInteraction.d.cts +1 -1
- package/dist/useEdgeInteraction.d.ts +1 -1
- package/dist/useGlobalSearch.d.cts +1 -1
- package/dist/useGlobalSearch.d.ts +1 -1
- package/dist/useInfiniteScroll.d.cts +1 -1
- package/dist/useInfiniteScroll.d.ts +1 -1
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSearchState.d.cts +4 -4
- package/dist/useSearchState.d.ts +4 -4
- package/dist/useSignatureHistory.d.cts +3 -3
- package/dist/useSignatureHistory.d.ts +3 -3
- package/dist/useSplitResize.d.cts +6 -6
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useTableQuery.d.cts +1 -1
- package/dist/useTableQuery.d.ts +1 -1
- package/dist/useTimeSelection.d.cts +4 -4
- package/dist/useTimeSelection.d.ts +4 -4
- package/dist/useTreeOperations.d.cts +6 -6
- package/dist/useTreeOperations.d.ts +6 -6
- package/dist/useWorkflowValidation.d.cts +2 -2
- package/dist/useWorkflowValidation.d.ts +2 -2
- package/dist/verification.d.cts +5 -5
- package/dist/verification.d.ts +5 -5
- package/package.json +1 -1
|
@@ -322,6 +322,43 @@ interface FormInstance<T extends object = FormRecord> {
|
|
|
322
322
|
/** 验证并提交,成功返回 true */
|
|
323
323
|
submit(): Promise<boolean>;
|
|
324
324
|
}
|
|
325
|
+
/** C_Form 默认操作区插槽参数。 */
|
|
326
|
+
interface FormActionSlotProps<T extends object = FormRecord> {
|
|
327
|
+
form: FormInst | null;
|
|
328
|
+
model: FormModel<T>;
|
|
329
|
+
validate: FormInstance<T>['validate'];
|
|
330
|
+
validateField: FormInstance<T>['validateField'];
|
|
331
|
+
reset: FormInstance<T>['resetFields'];
|
|
332
|
+
setFields: FormInstance<T>['setFields'];
|
|
333
|
+
getModel: FormInstance<T>['getModel'];
|
|
334
|
+
clearValidation: FormInstance<T>['clearValidation'];
|
|
335
|
+
submit: FormInstance<T>['submit'];
|
|
336
|
+
reloadOptions: FormInstance<T>['reloadOptions'];
|
|
337
|
+
submitting: boolean;
|
|
338
|
+
}
|
|
339
|
+
/** Tabs 布局操作区插槽参数。 */
|
|
340
|
+
interface FormTabActionsSlotProps {
|
|
341
|
+
currentTab: string;
|
|
342
|
+
totalTabs: number;
|
|
343
|
+
validateTab: () => Promise<boolean>;
|
|
344
|
+
switchToTab: (targetTab: string) => Promise<boolean>;
|
|
345
|
+
}
|
|
346
|
+
/** Steps 布局操作区插槽参数。 */
|
|
347
|
+
interface FormStepActionsSlotProps {
|
|
348
|
+
currentStep: number;
|
|
349
|
+
totalSteps: number;
|
|
350
|
+
isFirstStep: boolean;
|
|
351
|
+
isLastStep: boolean;
|
|
352
|
+
nextStep: () => Promise<void>;
|
|
353
|
+
previousStep: () => void;
|
|
354
|
+
goToStep: (stepIndex: number) => Promise<void>;
|
|
355
|
+
}
|
|
356
|
+
/** C_Form 对外公开的具名插槽。 */
|
|
357
|
+
interface FormSlots<T extends object = FormRecord> {
|
|
358
|
+
action?: (props: FormActionSlotProps<T>) => unknown;
|
|
359
|
+
'tab-actions'?: (props: FormTabActionsSlotProps) => unknown;
|
|
360
|
+
'step-actions'?: (props: FormStepActionsSlotProps) => unknown;
|
|
361
|
+
}
|
|
325
362
|
/**
|
|
326
363
|
* 表单数据模型类型(泛型)
|
|
327
364
|
*/
|
|
@@ -536,92 +573,65 @@ declare function useFormRenderer(opts: UseFormRendererOptions): {
|
|
|
536
573
|
};
|
|
537
574
|
//#endregion
|
|
538
575
|
//#region src/components/C_Form/index.vue.d.ts
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
576
|
+
declare const __VLS_export: <T extends object = FormRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
577
|
+
props: vue.PublicProps & __VLS_PrettifyLocal<{
|
|
578
|
+
/** 字段配置数组 */options: FormOption<T>[]; /** 双向绑定表单数据 */
|
|
579
|
+
modelValue?: FormModel<T>; /** 统一配置对象(收拢原先 13 个分散 Props) */
|
|
580
|
+
config?: FormConfig<T>; /** 当前表单实例的自定义渲染器,不污染全局注册表 */
|
|
581
|
+
renderers?: Record<string, FormRenderer>;
|
|
582
|
+
} & {
|
|
583
|
+
"onUpdate:modelValue"?: ((model: T) => any) | undefined;
|
|
584
|
+
onSubmit?: ((payload: SubmitEventPayload<T>) => any) | undefined;
|
|
585
|
+
"onValidate-error"?: ((errors: unknown) => any) | undefined;
|
|
586
|
+
"onValidate-success"?: ((model: T) => any) | undefined;
|
|
587
|
+
}> & (typeof globalThis extends {
|
|
588
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
589
|
+
} ? P : {});
|
|
590
|
+
expose: (exposed: vue.ShallowUnwrapRef<{
|
|
591
|
+
validate: () => Promise<void>;
|
|
592
|
+
validateField: (field: string | string[]) => Promise<void>;
|
|
593
|
+
validateStep: (stepIndex: number) => Promise<boolean>;
|
|
594
|
+
validateTab: (tabKey: string) => Promise<boolean>;
|
|
595
|
+
validateDynamicFields: () => Promise<boolean>;
|
|
596
|
+
validateCustomGroup: (groupKey: string) => Promise<boolean>;
|
|
597
|
+
clearValidation: (field?: string | string[]) => void;
|
|
598
|
+
getModel: () => FormModel;
|
|
599
|
+
setFields: (fields: FormModel) => void;
|
|
600
|
+
resetFields: () => void;
|
|
601
|
+
setFieldValue: (field: string, value: unknown, shouldValidate?: boolean) => Promise<void>;
|
|
602
|
+
getFieldValue: (field: string) => unknown;
|
|
603
|
+
setFieldsValue: (fields: FormModel, shouldValidate?: boolean) => Promise<void>;
|
|
604
|
+
formRef: vue.Ref<{
|
|
605
|
+
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
606
|
+
restoreValidation: () => void;
|
|
607
|
+
invalidateLabelWidth: () => void;
|
|
608
|
+
} | null, FormInst | {
|
|
609
|
+
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
610
|
+
restoreValidation: () => void;
|
|
611
|
+
invalidateLabelWidth: () => void;
|
|
612
|
+
} | null>;
|
|
613
|
+
formModel: FormRecord;
|
|
614
|
+
initialize: () => void;
|
|
615
|
+
layoutType: ComputedRef<LayoutType>;
|
|
616
|
+
shouldShowDefaultActions: ComputedRef<boolean>;
|
|
617
|
+
isDirty: vue.Ref<boolean, boolean>;
|
|
618
|
+
getChangedFields: () => string[];
|
|
619
|
+
isFieldDirty: (field: string) => boolean;
|
|
620
|
+
markAsClean: () => void;
|
|
621
|
+
asyncLoadingMap: vue.Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
622
|
+
asyncErrorMap: vue.Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
623
|
+
reloadOptions: (field?: string) => Promise<void>;
|
|
624
|
+
isSubmitting: vue.Ref<boolean, boolean>;
|
|
625
|
+
submit: () => Promise<boolean>;
|
|
626
|
+
}>) => void;
|
|
627
|
+
attrs: any;
|
|
628
|
+
slots: FormSlots<T>;
|
|
629
|
+
emit: ((evt: "update:modelValue", model: T) => void) & ((evt: "submit", payload: SubmitEventPayload<T>) => void) & ((evt: "validate-error", errors: unknown) => void) & ((evt: "validate-success", model: T) => void);
|
|
630
|
+
}>) => vue.VNode & {
|
|
631
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
568
632
|
};
|
|
569
|
-
declare const __VLS_base: vue.DefineComponent<CFormProps, {
|
|
570
|
-
validate: () => Promise<void>;
|
|
571
|
-
validateField: (field: string | string[]) => Promise<void>;
|
|
572
|
-
validateStep: (stepIndex: number) => Promise<boolean>;
|
|
573
|
-
validateTab: (tabKey: string) => Promise<boolean>;
|
|
574
|
-
validateDynamicFields: () => Promise<boolean>;
|
|
575
|
-
validateCustomGroup: (groupKey: string) => Promise<boolean>;
|
|
576
|
-
clearValidation: (field?: string | string[]) => void;
|
|
577
|
-
getModel: () => FormModel;
|
|
578
|
-
setFields: (fields: FormModel) => void;
|
|
579
|
-
resetFields: () => void;
|
|
580
|
-
setFieldValue: (field: string, value: unknown, shouldValidate?: boolean) => Promise<void>;
|
|
581
|
-
getFieldValue: (field: string) => unknown;
|
|
582
|
-
setFieldsValue: (fields: FormModel, shouldValidate?: boolean) => Promise<void>;
|
|
583
|
-
formRef: vue.Ref<{
|
|
584
|
-
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
585
|
-
restoreValidation: () => void;
|
|
586
|
-
invalidateLabelWidth: () => void;
|
|
587
|
-
} | null, FormInst | {
|
|
588
|
-
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
589
|
-
restoreValidation: () => void;
|
|
590
|
-
invalidateLabelWidth: () => void;
|
|
591
|
-
} | null>;
|
|
592
|
-
formModel: FormRecord;
|
|
593
|
-
initialize: () => void;
|
|
594
|
-
layoutType: vue.ComputedRef<LayoutType>;
|
|
595
|
-
shouldShowDefaultActions: vue.ComputedRef<boolean>;
|
|
596
|
-
isDirty: vue.Ref<boolean, boolean>;
|
|
597
|
-
getChangedFields: () => string[];
|
|
598
|
-
isFieldDirty: (field: string) => boolean;
|
|
599
|
-
markAsClean: () => void;
|
|
600
|
-
asyncLoadingMap: vue.Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
601
|
-
asyncErrorMap: vue.Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
602
|
-
reloadOptions: (field?: string) => Promise<void>;
|
|
603
|
-
isSubmitting: vue.Ref<boolean, boolean>;
|
|
604
|
-
submit: () => Promise<boolean>;
|
|
605
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
606
|
-
"update:modelValue": (model: FormRecord) => any;
|
|
607
|
-
submit: (payload: SubmitEventPayload<FormRecord>) => any;
|
|
608
|
-
"validate-error": (errors: unknown) => any;
|
|
609
|
-
"validate-success": (model: FormRecord) => any;
|
|
610
|
-
}, string, vue.PublicProps, Readonly<CFormProps> & Readonly<{
|
|
611
|
-
"onUpdate:modelValue"?: ((model: FormRecord) => any) | undefined;
|
|
612
|
-
onSubmit?: ((payload: SubmitEventPayload<FormRecord>) => any) | undefined;
|
|
613
|
-
"onValidate-error"?: ((errors: unknown) => any) | undefined;
|
|
614
|
-
"onValidate-success"?: ((model: FormRecord) => any) | undefined;
|
|
615
|
-
}>, {
|
|
616
|
-
config: FormConfig;
|
|
617
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
618
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
619
633
|
declare const _default: typeof __VLS_export;
|
|
620
|
-
type
|
|
621
|
-
new (): {
|
|
622
|
-
$slots: S;
|
|
623
|
-
};
|
|
624
|
-
};
|
|
634
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
625
635
|
//#endregion
|
|
626
636
|
//#region src/components/C_Form/helpers.d.ts
|
|
627
637
|
/** Preserve business-model field inference without changing the component API. */
|
|
@@ -746,4 +756,4 @@ type DynamicFormStateType = DynamicFormController;
|
|
|
746
756
|
*/
|
|
747
757
|
declare const DYNAMIC_FORM_STATE_KEY: unique symbol;
|
|
748
758
|
//#endregion
|
|
749
|
-
export {
|
|
759
|
+
export { LabelPlacement as $, useFormGlobalConfig as A, FieldPathValue as B, FormConfig as C, mergeFormConfig as D, ResolvedFormConfig as E, DynamicFieldConfig as F, FormModel as G, FormErrorContext as H, DynamicFormConfig as I, FormSlots as J, FormOption as K, DynamicFormController as L, CardLayoutConfig as M, ComponentType as N, resolveFormConfig as O, CustomLayoutConfig as P, InlineLayoutConfig as Q, DynamicFormState as R, FORM_GLOBAL_CONFIG_KEY as S, LayoutCallbacks as T, FormInstance as U, FormActionSlotProps as V, FormMode as W, FormTabActionsSlotProps as X, FormStepActionsSlotProps as Y, GridLayoutConfig as Z, UseFormRendererOptions as _, UseFormDirtyReturn as a, SubmitEventPayload as at, useFormRenderer as b, UseCFormOptions as c, useCForm as d, LayoutConfig as et, _default as f, RendererProps as g, FormRendererContext as h, useDynamicFormState as i, StepsLayoutConfig as it, AsyncOptionsContext as j, shouldShowActions as k, defineFormConfig as l, FormRenderer as m, DynamicFormStateType as n, MaybePromise as nt, useFormDirty as o, TabsLayoutConfig as ot, ComponentMap as p, FormRecord as q, FIELD_TYPE_OPTIONS as r, OptionItem as rt, useFormState as s, DYNAMIC_FORM_STATE_KEY as t, LayoutType as tt, defineFormOptions as u, registerRenderer as v, LAYOUTS_WITH_OWN_CONTROLS as w, FORM_DEFAULTS as x, unregisterRenderer as y, FieldPath as z };
|
|
@@ -322,6 +322,43 @@ interface FormInstance<T extends object = FormRecord> {
|
|
|
322
322
|
/** 验证并提交,成功返回 true */
|
|
323
323
|
submit(): Promise<boolean>;
|
|
324
324
|
}
|
|
325
|
+
/** C_Form 默认操作区插槽参数。 */
|
|
326
|
+
interface FormActionSlotProps<T extends object = FormRecord> {
|
|
327
|
+
form: FormInst | null;
|
|
328
|
+
model: FormModel<T>;
|
|
329
|
+
validate: FormInstance<T>['validate'];
|
|
330
|
+
validateField: FormInstance<T>['validateField'];
|
|
331
|
+
reset: FormInstance<T>['resetFields'];
|
|
332
|
+
setFields: FormInstance<T>['setFields'];
|
|
333
|
+
getModel: FormInstance<T>['getModel'];
|
|
334
|
+
clearValidation: FormInstance<T>['clearValidation'];
|
|
335
|
+
submit: FormInstance<T>['submit'];
|
|
336
|
+
reloadOptions: FormInstance<T>['reloadOptions'];
|
|
337
|
+
submitting: boolean;
|
|
338
|
+
}
|
|
339
|
+
/** Tabs 布局操作区插槽参数。 */
|
|
340
|
+
interface FormTabActionsSlotProps {
|
|
341
|
+
currentTab: string;
|
|
342
|
+
totalTabs: number;
|
|
343
|
+
validateTab: () => Promise<boolean>;
|
|
344
|
+
switchToTab: (targetTab: string) => Promise<boolean>;
|
|
345
|
+
}
|
|
346
|
+
/** Steps 布局操作区插槽参数。 */
|
|
347
|
+
interface FormStepActionsSlotProps {
|
|
348
|
+
currentStep: number;
|
|
349
|
+
totalSteps: number;
|
|
350
|
+
isFirstStep: boolean;
|
|
351
|
+
isLastStep: boolean;
|
|
352
|
+
nextStep: () => Promise<void>;
|
|
353
|
+
previousStep: () => void;
|
|
354
|
+
goToStep: (stepIndex: number) => Promise<void>;
|
|
355
|
+
}
|
|
356
|
+
/** C_Form 对外公开的具名插槽。 */
|
|
357
|
+
interface FormSlots<T extends object = FormRecord> {
|
|
358
|
+
action?: (props: FormActionSlotProps<T>) => unknown;
|
|
359
|
+
'tab-actions'?: (props: FormTabActionsSlotProps) => unknown;
|
|
360
|
+
'step-actions'?: (props: FormStepActionsSlotProps) => unknown;
|
|
361
|
+
}
|
|
325
362
|
/**
|
|
326
363
|
* 表单数据模型类型(泛型)
|
|
327
364
|
*/
|
|
@@ -536,92 +573,65 @@ declare function useFormRenderer(opts: UseFormRendererOptions): {
|
|
|
536
573
|
};
|
|
537
574
|
//#endregion
|
|
538
575
|
//#region src/components/C_Form/index.vue.d.ts
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
576
|
+
declare const __VLS_export: <T extends object = FormRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
577
|
+
props: vue.PublicProps & __VLS_PrettifyLocal<{
|
|
578
|
+
/** 字段配置数组 */options: FormOption<T>[]; /** 双向绑定表单数据 */
|
|
579
|
+
modelValue?: FormModel<T>; /** 统一配置对象(收拢原先 13 个分散 Props) */
|
|
580
|
+
config?: FormConfig<T>; /** 当前表单实例的自定义渲染器,不污染全局注册表 */
|
|
581
|
+
renderers?: Record<string, FormRenderer>;
|
|
582
|
+
} & {
|
|
583
|
+
"onUpdate:modelValue"?: ((model: T) => any) | undefined;
|
|
584
|
+
onSubmit?: ((payload: SubmitEventPayload<T>) => any) | undefined;
|
|
585
|
+
"onValidate-error"?: ((errors: unknown) => any) | undefined;
|
|
586
|
+
"onValidate-success"?: ((model: T) => any) | undefined;
|
|
587
|
+
}> & (typeof globalThis extends {
|
|
588
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
589
|
+
} ? P : {});
|
|
590
|
+
expose: (exposed: vue.ShallowUnwrapRef<{
|
|
591
|
+
validate: () => Promise<void>;
|
|
592
|
+
validateField: (field: string | string[]) => Promise<void>;
|
|
593
|
+
validateStep: (stepIndex: number) => Promise<boolean>;
|
|
594
|
+
validateTab: (tabKey: string) => Promise<boolean>;
|
|
595
|
+
validateDynamicFields: () => Promise<boolean>;
|
|
596
|
+
validateCustomGroup: (groupKey: string) => Promise<boolean>;
|
|
597
|
+
clearValidation: (field?: string | string[]) => void;
|
|
598
|
+
getModel: () => FormModel;
|
|
599
|
+
setFields: (fields: FormModel) => void;
|
|
600
|
+
resetFields: () => void;
|
|
601
|
+
setFieldValue: (field: string, value: unknown, shouldValidate?: boolean) => Promise<void>;
|
|
602
|
+
getFieldValue: (field: string) => unknown;
|
|
603
|
+
setFieldsValue: (fields: FormModel, shouldValidate?: boolean) => Promise<void>;
|
|
604
|
+
formRef: vue.Ref<{
|
|
605
|
+
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
606
|
+
restoreValidation: () => void;
|
|
607
|
+
invalidateLabelWidth: () => void;
|
|
608
|
+
} | null, FormInst | {
|
|
609
|
+
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
610
|
+
restoreValidation: () => void;
|
|
611
|
+
invalidateLabelWidth: () => void;
|
|
612
|
+
} | null>;
|
|
613
|
+
formModel: FormRecord;
|
|
614
|
+
initialize: () => void;
|
|
615
|
+
layoutType: ComputedRef<LayoutType>;
|
|
616
|
+
shouldShowDefaultActions: ComputedRef<boolean>;
|
|
617
|
+
isDirty: vue.Ref<boolean, boolean>;
|
|
618
|
+
getChangedFields: () => string[];
|
|
619
|
+
isFieldDirty: (field: string) => boolean;
|
|
620
|
+
markAsClean: () => void;
|
|
621
|
+
asyncLoadingMap: vue.Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
622
|
+
asyncErrorMap: vue.Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
623
|
+
reloadOptions: (field?: string) => Promise<void>;
|
|
624
|
+
isSubmitting: vue.Ref<boolean, boolean>;
|
|
625
|
+
submit: () => Promise<boolean>;
|
|
626
|
+
}>) => void;
|
|
627
|
+
attrs: any;
|
|
628
|
+
slots: FormSlots<T>;
|
|
629
|
+
emit: ((evt: "update:modelValue", model: T) => void) & ((evt: "submit", payload: SubmitEventPayload<T>) => void) & ((evt: "validate-error", errors: unknown) => void) & ((evt: "validate-success", model: T) => void);
|
|
630
|
+
}>) => vue.VNode & {
|
|
631
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
568
632
|
};
|
|
569
|
-
declare const __VLS_base: vue.DefineComponent<CFormProps, {
|
|
570
|
-
validate: () => Promise<void>;
|
|
571
|
-
validateField: (field: string | string[]) => Promise<void>;
|
|
572
|
-
validateStep: (stepIndex: number) => Promise<boolean>;
|
|
573
|
-
validateTab: (tabKey: string) => Promise<boolean>;
|
|
574
|
-
validateDynamicFields: () => Promise<boolean>;
|
|
575
|
-
validateCustomGroup: (groupKey: string) => Promise<boolean>;
|
|
576
|
-
clearValidation: (field?: string | string[]) => void;
|
|
577
|
-
getModel: () => FormModel;
|
|
578
|
-
setFields: (fields: FormModel) => void;
|
|
579
|
-
resetFields: () => void;
|
|
580
|
-
setFieldValue: (field: string, value: unknown, shouldValidate?: boolean) => Promise<void>;
|
|
581
|
-
getFieldValue: (field: string) => unknown;
|
|
582
|
-
setFieldsValue: (fields: FormModel, shouldValidate?: boolean) => Promise<void>;
|
|
583
|
-
formRef: vue.Ref<{
|
|
584
|
-
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
585
|
-
restoreValidation: () => void;
|
|
586
|
-
invalidateLabelWidth: () => void;
|
|
587
|
-
} | null, FormInst | {
|
|
588
|
-
validate: naive_ui_es_form_src_interface0.FormValidate;
|
|
589
|
-
restoreValidation: () => void;
|
|
590
|
-
invalidateLabelWidth: () => void;
|
|
591
|
-
} | null>;
|
|
592
|
-
formModel: FormRecord;
|
|
593
|
-
initialize: () => void;
|
|
594
|
-
layoutType: vue.ComputedRef<LayoutType>;
|
|
595
|
-
shouldShowDefaultActions: vue.ComputedRef<boolean>;
|
|
596
|
-
isDirty: vue.Ref<boolean, boolean>;
|
|
597
|
-
getChangedFields: () => string[];
|
|
598
|
-
isFieldDirty: (field: string) => boolean;
|
|
599
|
-
markAsClean: () => void;
|
|
600
|
-
asyncLoadingMap: vue.Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
601
|
-
asyncErrorMap: vue.Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
602
|
-
reloadOptions: (field?: string) => Promise<void>;
|
|
603
|
-
isSubmitting: vue.Ref<boolean, boolean>;
|
|
604
|
-
submit: () => Promise<boolean>;
|
|
605
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
606
|
-
"update:modelValue": (model: FormRecord) => any;
|
|
607
|
-
submit: (payload: SubmitEventPayload<FormRecord>) => any;
|
|
608
|
-
"validate-error": (errors: unknown) => any;
|
|
609
|
-
"validate-success": (model: FormRecord) => any;
|
|
610
|
-
}, string, vue.PublicProps, Readonly<CFormProps> & Readonly<{
|
|
611
|
-
"onUpdate:modelValue"?: ((model: FormRecord) => any) | undefined;
|
|
612
|
-
onSubmit?: ((payload: SubmitEventPayload<FormRecord>) => any) | undefined;
|
|
613
|
-
"onValidate-error"?: ((errors: unknown) => any) | undefined;
|
|
614
|
-
"onValidate-success"?: ((model: FormRecord) => any) | undefined;
|
|
615
|
-
}>, {
|
|
616
|
-
config: FormConfig;
|
|
617
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
618
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
619
633
|
declare const _default: typeof __VLS_export;
|
|
620
|
-
type
|
|
621
|
-
new (): {
|
|
622
|
-
$slots: S;
|
|
623
|
-
};
|
|
624
|
-
};
|
|
634
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
625
635
|
//#endregion
|
|
626
636
|
//#region src/components/C_Form/helpers.d.ts
|
|
627
637
|
/** Preserve business-model field inference without changing the component API. */
|
|
@@ -746,4 +756,4 @@ type DynamicFormStateType = DynamicFormController;
|
|
|
746
756
|
*/
|
|
747
757
|
declare const DYNAMIC_FORM_STATE_KEY: unique symbol;
|
|
748
758
|
//#endregion
|
|
749
|
-
export {
|
|
759
|
+
export { LabelPlacement as $, useFormGlobalConfig as A, FieldPathValue as B, FormConfig as C, mergeFormConfig as D, ResolvedFormConfig as E, DynamicFieldConfig as F, FormModel as G, FormErrorContext as H, DynamicFormConfig as I, FormSlots as J, FormOption as K, DynamicFormController as L, CardLayoutConfig as M, ComponentType as N, resolveFormConfig as O, CustomLayoutConfig as P, InlineLayoutConfig as Q, DynamicFormState as R, FORM_GLOBAL_CONFIG_KEY as S, LayoutCallbacks as T, FormInstance as U, FormActionSlotProps as V, FormMode as W, FormTabActionsSlotProps as X, FormStepActionsSlotProps as Y, GridLayoutConfig as Z, UseFormRendererOptions as _, UseFormDirtyReturn as a, SubmitEventPayload as at, useFormRenderer as b, UseCFormOptions as c, useCForm as d, LayoutConfig as et, _default as f, RendererProps as g, FormRendererContext as h, useDynamicFormState as i, StepsLayoutConfig as it, AsyncOptionsContext as j, shouldShowActions as k, defineFormConfig as l, FormRenderer as m, DynamicFormStateType as n, MaybePromise as nt, useFormDirty as o, TabsLayoutConfig as ot, ComponentMap as p, FormRecord as q, FIELD_TYPE_OPTIONS as r, OptionItem as rt, useFormState as s, DYNAMIC_FORM_STATE_KEY as t, LayoutType as tt, defineFormOptions as u, registerRenderer as v, LAYOUTS_WITH_OWN_CONTROLS as w, FORM_DEFAULTS as x, unregisterRenderer as y, FieldPath as z };
|
|
@@ -262,8 +262,8 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
262
262
|
theme: "light" | "dark";
|
|
263
263
|
width: string | number;
|
|
264
264
|
height: string | number;
|
|
265
|
-
showToolbar: boolean;
|
|
266
265
|
readonly: boolean;
|
|
266
|
+
showToolbar: boolean;
|
|
267
267
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
268
268
|
declare const _default: typeof __VLS_export;
|
|
269
269
|
//#endregion
|
|
@@ -262,8 +262,8 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
262
262
|
theme: "light" | "dark";
|
|
263
263
|
width: string | number;
|
|
264
264
|
height: string | number;
|
|
265
|
-
showToolbar: boolean;
|
|
266
265
|
readonly: boolean;
|
|
266
|
+
showToolbar: boolean;
|
|
267
267
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
268
268
|
declare const _default: typeof __VLS_export;
|
|
269
269
|
//#endregion
|
|
@@ -51,8 +51,8 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
51
51
|
openDialog: () => Promise<void>;
|
|
52
52
|
closeDialog: () => void;
|
|
53
53
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
54
|
-
placeholder: string;
|
|
55
54
|
emptyText: string;
|
|
55
|
+
placeholder: string;
|
|
56
56
|
resultGroupTitle: string;
|
|
57
57
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
58
58
|
declare const _default: typeof __VLS_export;
|
|
@@ -51,8 +51,8 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
51
51
|
openDialog: () => Promise<void>;
|
|
52
52
|
closeDialog: () => void;
|
|
53
53
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
54
|
-
placeholder: string;
|
|
55
54
|
emptyText: string;
|
|
55
|
+
placeholder: string;
|
|
56
56
|
resultGroupTitle: string;
|
|
57
57
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
58
58
|
declare const _default: typeof __VLS_export;
|
|
@@ -89,9 +89,9 @@ declare const __VLS_base: vue.DefineComponent<WaterFallProps, WaterFallExpose, {
|
|
|
89
89
|
"onImage-loaded"?: ((item: WaterFallItem) => any) | undefined;
|
|
90
90
|
"onImage-error"?: ((item: WaterFallItem) => any) | undefined;
|
|
91
91
|
}>, {
|
|
92
|
+
gap: number;
|
|
92
93
|
loading: boolean;
|
|
93
94
|
columns: number;
|
|
94
|
-
gap: number;
|
|
95
95
|
lazy: boolean;
|
|
96
96
|
infinite: boolean;
|
|
97
97
|
skeleton: boolean;
|
|
@@ -89,9 +89,9 @@ declare const __VLS_base: vue.DefineComponent<WaterFallProps, WaterFallExpose, {
|
|
|
89
89
|
"onImage-loaded"?: ((item: WaterFallItem) => any) | undefined;
|
|
90
90
|
"onImage-error"?: ((item: WaterFallItem) => any) | undefined;
|
|
91
91
|
}>, {
|
|
92
|
+
gap: number;
|
|
92
93
|
loading: boolean;
|
|
93
94
|
columns: number;
|
|
94
|
-
gap: number;
|
|
95
95
|
lazy: boolean;
|
|
96
96
|
infinite: boolean;
|
|
97
97
|
skeleton: boolean;
|
package/dist/useQRCode.d.cts
CHANGED
|
@@ -50,16 +50,16 @@ declare const __VLS_export: vue.DefineComponent<Props, QRCodeExpose, {}, {}, {},
|
|
|
50
50
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
51
51
|
onError?: ((error: Error) => any) | undefined;
|
|
52
52
|
}>, {
|
|
53
|
-
color: string;
|
|
54
53
|
size: number;
|
|
55
54
|
label: string;
|
|
56
|
-
showBorder: boolean;
|
|
57
|
-
showLabel: boolean;
|
|
58
55
|
mode: RenderMode;
|
|
56
|
+
color: string;
|
|
59
57
|
bgColor: string;
|
|
60
58
|
errorCorrectionLevel: ErrorCorrectionLevel;
|
|
61
59
|
margin: number;
|
|
62
60
|
logo: LogoOptions;
|
|
61
|
+
showBorder: boolean;
|
|
62
|
+
showLabel: boolean;
|
|
63
63
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
64
64
|
declare const _default: typeof __VLS_export;
|
|
65
65
|
//#endregion
|
package/dist/useQRCode.d.ts
CHANGED
|
@@ -50,16 +50,16 @@ declare const __VLS_export: vue.DefineComponent<Props, QRCodeExpose, {}, {}, {},
|
|
|
50
50
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
51
51
|
onError?: ((error: Error) => any) | undefined;
|
|
52
52
|
}>, {
|
|
53
|
-
color: string;
|
|
54
53
|
size: number;
|
|
55
54
|
label: string;
|
|
56
|
-
showBorder: boolean;
|
|
57
|
-
showLabel: boolean;
|
|
58
55
|
mode: RenderMode;
|
|
56
|
+
color: string;
|
|
59
57
|
bgColor: string;
|
|
60
58
|
errorCorrectionLevel: ErrorCorrectionLevel;
|
|
61
59
|
margin: number;
|
|
62
60
|
logo: LogoOptions;
|
|
61
|
+
showBorder: boolean;
|
|
62
|
+
showLabel: boolean;
|
|
63
63
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
64
64
|
declare const _default: typeof __VLS_export;
|
|
65
65
|
//#endregion
|
|
@@ -93,9 +93,9 @@ declare const __VLS_export: vue.DefineComponent<FormSearchProps, {
|
|
|
93
93
|
onReset?: (() => any) | undefined;
|
|
94
94
|
"onChange-params"?: ((params: SearchFormParams) => any) | undefined;
|
|
95
95
|
}>, {
|
|
96
|
-
loading: boolean;
|
|
97
96
|
size: "small" | "medium" | "large";
|
|
98
97
|
bordered: boolean;
|
|
98
|
+
loading: boolean;
|
|
99
99
|
formItemList: SearchFormItem[];
|
|
100
100
|
formParams: SearchFormParams;
|
|
101
101
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -220,8 +220,8 @@ declare function useSearchState(emits: {
|
|
|
220
220
|
error?: ((rule: async_validator0.InternalRuleItem, message: string) => async_validator0.ValidateError) | undefined;
|
|
221
221
|
} | undefined;
|
|
222
222
|
pattern?: (RegExp | string) | undefined;
|
|
223
|
-
max?: number | undefined;
|
|
224
223
|
min?: number | undefined;
|
|
224
|
+
max?: number | undefined;
|
|
225
225
|
len?: number | undefined;
|
|
226
226
|
enum?: Array<string | number | boolean | null | undefined> | undefined;
|
|
227
227
|
whitespace?: boolean | undefined;
|
|
@@ -451,8 +451,8 @@ declare function useSearchState(emits: {
|
|
|
451
451
|
error?: ((rule: async_validator0.InternalRuleItem, message: string) => async_validator0.ValidateError) | undefined;
|
|
452
452
|
} | undefined;
|
|
453
453
|
pattern?: (RegExp | string) | undefined;
|
|
454
|
-
max?: number | undefined;
|
|
455
454
|
min?: number | undefined;
|
|
455
|
+
max?: number | undefined;
|
|
456
456
|
len?: number | undefined;
|
|
457
457
|
enum?: Array<string | number | boolean | null | undefined> | undefined;
|
|
458
458
|
whitespace?: boolean | undefined;
|
|
@@ -694,8 +694,8 @@ declare function useSearchState(emits: {
|
|
|
694
694
|
error?: ((rule: async_validator0.InternalRuleItem, message: string) => async_validator0.ValidateError) | undefined;
|
|
695
695
|
} | undefined;
|
|
696
696
|
pattern?: (RegExp | string) | undefined;
|
|
697
|
-
max?: number | undefined;
|
|
698
697
|
min?: number | undefined;
|
|
698
|
+
max?: number | undefined;
|
|
699
699
|
len?: number | undefined;
|
|
700
700
|
enum?: Array<string | number | boolean | null | undefined> | undefined;
|
|
701
701
|
whitespace?: boolean | undefined;
|
package/dist/useSearchState.d.ts
CHANGED
|
@@ -92,9 +92,9 @@ declare const __VLS_export: vue.DefineComponent<FormSearchProps, {
|
|
|
92
92
|
onReset?: (() => any) | undefined;
|
|
93
93
|
"onChange-params"?: ((params: SearchFormParams) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
|
-
loading: boolean;
|
|
96
95
|
size: "small" | "medium" | "large";
|
|
97
96
|
bordered: boolean;
|
|
97
|
+
loading: boolean;
|
|
98
98
|
formItemList: SearchFormItem[];
|
|
99
99
|
formParams: SearchFormParams;
|
|
100
100
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -329,8 +329,8 @@ declare function useSearchState(emits: {
|
|
|
329
329
|
error?: ((rule: InternalRuleItem, message: string) => ValidateError) | undefined;
|
|
330
330
|
} | undefined;
|
|
331
331
|
pattern?: (RegExp | string) | undefined;
|
|
332
|
-
max?: number | undefined;
|
|
333
332
|
min?: number | undefined;
|
|
333
|
+
max?: number | undefined;
|
|
334
334
|
len?: number | undefined;
|
|
335
335
|
enum?: Array<string | number | boolean | null | undefined> | undefined;
|
|
336
336
|
whitespace?: boolean | undefined;
|
|
@@ -560,8 +560,8 @@ declare function useSearchState(emits: {
|
|
|
560
560
|
error?: ((rule: InternalRuleItem, message: string) => ValidateError) | undefined;
|
|
561
561
|
} | undefined;
|
|
562
562
|
pattern?: (RegExp | string) | undefined;
|
|
563
|
-
max?: number | undefined;
|
|
564
563
|
min?: number | undefined;
|
|
564
|
+
max?: number | undefined;
|
|
565
565
|
len?: number | undefined;
|
|
566
566
|
enum?: Array<string | number | boolean | null | undefined> | undefined;
|
|
567
567
|
whitespace?: boolean | undefined;
|
|
@@ -803,8 +803,8 @@ declare function useSearchState(emits: {
|
|
|
803
803
|
error?: ((rule: InternalRuleItem, message: string) => ValidateError) | undefined;
|
|
804
804
|
} | undefined;
|
|
805
805
|
pattern?: (RegExp | string) | undefined;
|
|
806
|
-
max?: number | undefined;
|
|
807
806
|
min?: number | undefined;
|
|
807
|
+
max?: number | undefined;
|
|
808
808
|
len?: number | undefined;
|
|
809
809
|
enum?: Array<string | number | boolean | null | undefined> | undefined;
|
|
810
810
|
whitespace?: boolean | undefined;
|
|
@@ -91,16 +91,16 @@ interface SignatureEmits {
|
|
|
91
91
|
//#endregion
|
|
92
92
|
//#region src/components/C_Signature/index.vue.d.ts
|
|
93
93
|
declare const __VLS_export: vue.DefineComponent<SignatureProps, SignatureExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
94
|
-
change: (data: SignatureStroke[]) => any;
|
|
95
94
|
clear: () => any;
|
|
95
|
+
change: (data: SignatureStroke[]) => any;
|
|
96
96
|
"start-draw": () => any;
|
|
97
97
|
drawing: (point: SignaturePoint) => any;
|
|
98
98
|
"end-draw": (stroke: SignatureStroke) => any;
|
|
99
99
|
undo: () => any;
|
|
100
100
|
redo: () => any;
|
|
101
101
|
}, string, vue.PublicProps, Readonly<SignatureProps> & Readonly<{
|
|
102
|
-
onChange?: ((data: SignatureStroke[]) => any) | undefined;
|
|
103
102
|
onClear?: (() => any) | undefined;
|
|
103
|
+
onChange?: ((data: SignatureStroke[]) => any) | undefined;
|
|
104
104
|
"onStart-draw"?: (() => any) | undefined;
|
|
105
105
|
onDrawing?: ((point: SignaturePoint) => any) | undefined;
|
|
106
106
|
"onEnd-draw"?: ((stroke: SignatureStroke) => any) | undefined;
|
|
@@ -110,8 +110,8 @@ declare const __VLS_export: vue.DefineComponent<SignatureProps, SignatureExpose,
|
|
|
110
110
|
disabled: boolean;
|
|
111
111
|
width: number | string;
|
|
112
112
|
height: number | string;
|
|
113
|
-
showToolbar: boolean;
|
|
114
113
|
readonly: boolean;
|
|
114
|
+
showToolbar: boolean;
|
|
115
115
|
maxHistory: number;
|
|
116
116
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
117
117
|
declare const _default: typeof __VLS_export;
|