cnhis-design-vue 3.1.53-beta.3 → 3.1.53-hotfix.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/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
- package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
- package/es/components/button-print/src/utils/dialog.d.ts +2 -2
- package/es/components/button-print/src/utils/print.d.ts +13 -14
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +6 -69
- package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/form-config/index.d.ts +26 -98
- package/es/components/form-config/src/FormConfig.vue.d.ts +27 -99
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +6 -30
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -48
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +6 -30
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +7 -31
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -31
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/index.js +1 -1
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/{levelSearchCascader/index.d.ts → levelSearchCascader.d.ts} +5 -3
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -0
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +2 -3
- package/es/components/form-render/src/hooks/index.d.ts +2 -0
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -10
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
- package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +1 -9
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +26 -0
- package/es/components/form-render/src/hooks/useFormRequest.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +26 -4
- package/es/components/form-render/src/types/index.d.ts +14 -7
- package/es/components/form-render/src/utils/index.d.ts +2 -1
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +2 -2
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-table/index.d.ts +0 -39
- package/es/components/iho-table/src/IhoTable.vue.d.ts +0 -40
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +1 -4
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/types/index.d.ts +2 -7
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +0 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +29 -97
- package/es/components/info-header/src/InfoHeader.vue.d.ts +30 -98
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +5 -9
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +6 -10
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -41
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +6 -30
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +3 -23
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +4 -24
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +9 -33
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +10 -34
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
- package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
- package/es/shared/hooks/index.d.ts +0 -3
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/{useAsyncQueue/index.d.ts → useAsyncQueue.d.ts} +15 -7
- package/es/shared/hooks/useAsyncQueue.js +1 -0
- package/es/shared/hooks/useDateTime.d.ts +2 -2
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +0 -24
- package/es/shared/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +0 -552
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +0 -1
- package/es/components/iho-table/src/plugins/wordbookSettingPlugin.d.ts +0 -1
- package/es/components/iho-table/src/plugins/wordbookSettingPlugin.js +0 -1
- package/es/components/search-cascader/src/components/ClearIcon.vue.js +0 -1
- package/es/shared/hooks/selectHooks/index.d.ts +0 -4
- package/es/shared/hooks/selectHooks/index.js +0 -1
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +0 -10
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +0 -1
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +0 -6
- package/es/shared/hooks/selectHooks/useSearchContent.js +0 -1
- package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +0 -23
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +0 -1
- package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +0 -19
- package/es/shared/hooks/selectHooks/useSelectRenders.js +0 -1
- package/es/shared/hooks/useAsyncQueue/index.js +0 -1
- package/es/shared/hooks/useAsyncQueue/types.d.ts +0 -20
- package/es/shared/hooks/useAsyncQueue/types.js +0 -1
- package/es/shared/hooks/useFormRequest/index.d.ts +0 -24
- package/es/shared/hooks/useFormRequest/index.js +0 -1
- package/es/shared/hooks/useFormRequest/types.d.ts +0 -39
- package/es/shared/hooks/useFormRequest/types.js +0 -1
- package/es/shared/hooks/useLevelSearchCascader.d.ts +0 -31
- package/es/shared/hooks/useLevelSearchCascader.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Func } from '../../../../../../es/shared/types';
|
|
2
2
|
import { FormChangePayload, FormRenderProps } from '../../../../../../es/components/form-render';
|
|
3
3
|
import { InfoHeaderTypes } from '../../../../../../es/components/info-header/src/types';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -37,7 +37,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
labelField: string;
|
|
38
38
|
valueField: string;
|
|
39
39
|
minColumnWidth: string | number;
|
|
40
|
-
rootSlot: Record<string,
|
|
40
|
+
rootSlot: Record<string, Func>;
|
|
41
41
|
formProps: Partial<FormRenderProps>;
|
|
42
42
|
};
|
|
43
43
|
themeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
@@ -265,16 +265,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
265
265
|
uuid: string;
|
|
266
266
|
lifeCycle: Partial<{
|
|
267
267
|
onSetup(): void;
|
|
268
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
269
|
-
field: import("@formily/core").GeneralField;
|
|
270
|
-
oldValue: unknown;
|
|
271
|
-
}): any;
|
|
272
268
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
273
269
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
274
270
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
275
271
|
}>;
|
|
276
272
|
businessFormatter: import("../../../../../../es/components/form-render").FormBusinessFormatter;
|
|
277
|
-
requestInstance: import("
|
|
273
|
+
requestInstance: import("../../../../../../es/components/form-render").RequestInstance;
|
|
278
274
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
279
275
|
lowCodeReactions: import("../../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
280
276
|
linebarAutoHidden: boolean;
|
|
@@ -2040,19 +2036,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2040
2036
|
}>;
|
|
2041
2037
|
SlotRender: import("vue").DefineComponent<{
|
|
2042
2038
|
renderer: {
|
|
2043
|
-
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> |
|
|
2039
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | Func<any[], any>>;
|
|
2044
2040
|
required: true;
|
|
2045
2041
|
};
|
|
2046
2042
|
rootSlots: {
|
|
2047
|
-
type: import("vue").PropType<Record<string,
|
|
2043
|
+
type: import("vue").PropType<Record<string, Func<any[], any>>>;
|
|
2048
2044
|
};
|
|
2049
2045
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2050
2046
|
renderer: {
|
|
2051
|
-
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> |
|
|
2047
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | Func<any[], any>>;
|
|
2052
2048
|
required: true;
|
|
2053
2049
|
};
|
|
2054
2050
|
rootSlots: {
|
|
2055
|
-
type: import("vue").PropType<Record<string,
|
|
2051
|
+
type: import("vue").PropType<Record<string, Func<any[], any>>>;
|
|
2056
2052
|
};
|
|
2057
2053
|
}>>, {}>;
|
|
2058
2054
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -2242,17 +2238,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2242
2238
|
lifeCycle: {
|
|
2243
2239
|
type: import("vue").PropType<Partial<{
|
|
2244
2240
|
onSetup(): void;
|
|
2245
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2246
|
-
field: import("@formily/core").GeneralField;
|
|
2247
|
-
oldValue: unknown;
|
|
2248
|
-
}): any;
|
|
2249
2241
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2250
2242
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2251
2243
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2252
2244
|
}>>;
|
|
2253
2245
|
};
|
|
2254
2246
|
requestInstance: {
|
|
2255
|
-
type: import("vue").PropType<import("
|
|
2247
|
+
type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
|
|
2256
2248
|
};
|
|
2257
2249
|
enterToNextWidget: {
|
|
2258
2250
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -2391,17 +2383,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2391
2383
|
lifeCycle: {
|
|
2392
2384
|
type: import("vue").PropType<Partial<{
|
|
2393
2385
|
onSetup(): void;
|
|
2394
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2395
|
-
field: import("@formily/core").GeneralField;
|
|
2396
|
-
oldValue: unknown;
|
|
2397
|
-
}): any;
|
|
2398
2386
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2399
2387
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2400
2388
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2401
2389
|
}>>;
|
|
2402
2390
|
};
|
|
2403
2391
|
requestInstance: {
|
|
2404
|
-
type: import("vue").PropType<import("
|
|
2392
|
+
type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
|
|
2405
2393
|
};
|
|
2406
2394
|
enterToNextWidget: {
|
|
2407
2395
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -2455,7 +2443,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2455
2443
|
changeContextCollector: import("../../../../../../es/components/form-render").ContextCollector;
|
|
2456
2444
|
formUUID: string;
|
|
2457
2445
|
anchorBarRef: import("vue").Ref<{
|
|
2458
|
-
syncBarPosition:
|
|
2446
|
+
syncBarPosition: Func<any[], any>;
|
|
2459
2447
|
} | undefined>;
|
|
2460
2448
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
2461
2449
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
@@ -2464,21 +2452,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2464
2452
|
title: string;
|
|
2465
2453
|
}[]>;
|
|
2466
2454
|
onScroll: (scrollEvent: Event) => void;
|
|
2467
|
-
callLifeCycle: <T extends "onSetup" | "
|
|
2455
|
+
callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
2468
2456
|
onSetup(): void;
|
|
2469
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2470
|
-
field: import("@formily/core").GeneralField;
|
|
2471
|
-
oldValue: unknown;
|
|
2472
|
-
}): any;
|
|
2473
2457
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2474
2458
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2475
2459
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2476
2460
|
}>>[T]> | undefined) => import("../../../../../../es/shared/types").UndefinedAble<ReturnType<Required<Partial<{
|
|
2477
2461
|
onSetup(): void;
|
|
2478
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2479
|
-
field: import("@formily/core").GeneralField;
|
|
2480
|
-
oldValue: unknown;
|
|
2481
|
-
}): any;
|
|
2482
2462
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2483
2463
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2484
2464
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
@@ -2571,16 +2551,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2571
2551
|
uuid: string;
|
|
2572
2552
|
lifeCycle: Partial<{
|
|
2573
2553
|
onSetup(): void;
|
|
2574
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2575
|
-
field: import("@formily/core").GeneralField;
|
|
2576
|
-
oldValue: unknown;
|
|
2577
|
-
}): any;
|
|
2578
2554
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2579
2555
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2580
2556
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2581
2557
|
}>;
|
|
2582
2558
|
businessFormatter: import("../../../../../../es/components/form-render").FormBusinessFormatter;
|
|
2583
|
-
requestInstance: import("
|
|
2559
|
+
requestInstance: import("../../../../../../es/components/form-render").RequestInstance;
|
|
2584
2560
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
2585
2561
|
lowCodeReactions: import("../../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
2586
2562
|
linebarAutoHidden: boolean;
|
|
@@ -2982,17 +2958,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2982
2958
|
lifeCycle: {
|
|
2983
2959
|
type: import("vue").PropType<Partial<{
|
|
2984
2960
|
onSetup(): void;
|
|
2985
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2986
|
-
field: import("@formily/core").GeneralField;
|
|
2987
|
-
oldValue: unknown;
|
|
2988
|
-
}): any;
|
|
2989
2961
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2990
2962
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2991
2963
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2992
2964
|
}>>;
|
|
2993
2965
|
};
|
|
2994
2966
|
requestInstance: {
|
|
2995
|
-
type: import("vue").PropType<import("
|
|
2967
|
+
type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
|
|
2996
2968
|
};
|
|
2997
2969
|
enterToNextWidget: {
|
|
2998
2970
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -164,17 +164,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
164
|
lifeCycle: {
|
|
165
165
|
type: import("vue").PropType<Partial<{
|
|
166
166
|
onSetup(): void;
|
|
167
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
168
|
-
field: import("@formily/core").GeneralField;
|
|
169
|
-
oldValue: unknown;
|
|
170
|
-
}): any;
|
|
171
167
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
172
168
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
173
169
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
174
170
|
}>>;
|
|
175
171
|
};
|
|
176
172
|
requestInstance: {
|
|
177
|
-
type: import("vue").PropType<import("
|
|
173
|
+
type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
|
|
178
174
|
};
|
|
179
175
|
enterToNextWidget: {
|
|
180
176
|
type: import("vue").PropType<boolean | ((fieldItem: FieldItem) => boolean | void)>;
|
|
@@ -313,17 +309,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
313
309
|
lifeCycle: {
|
|
314
310
|
type: import("vue").PropType<Partial<{
|
|
315
311
|
onSetup(): void;
|
|
316
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
317
|
-
field: import("@formily/core").GeneralField;
|
|
318
|
-
oldValue: unknown;
|
|
319
|
-
}): any;
|
|
320
312
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
321
313
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
322
314
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
323
315
|
}>>;
|
|
324
316
|
};
|
|
325
317
|
requestInstance: {
|
|
326
|
-
type: import("vue").PropType<import("
|
|
318
|
+
type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
|
|
327
319
|
};
|
|
328
320
|
enterToNextWidget: {
|
|
329
321
|
type: import("vue").PropType<boolean | ((fieldItem: FieldItem) => boolean | void)>;
|
|
@@ -377,7 +369,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
377
369
|
changeContextCollector: import("../../../../../../es/components/form-render").ContextCollector;
|
|
378
370
|
formUUID: string;
|
|
379
371
|
anchorBarRef: import("vue").Ref<{
|
|
380
|
-
syncBarPosition: import("../../../..").
|
|
372
|
+
syncBarPosition: import("../../../..").Func<any[], any>;
|
|
381
373
|
} | undefined>;
|
|
382
374
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
383
375
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
@@ -386,21 +378,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
386
378
|
title: string;
|
|
387
379
|
}[]>;
|
|
388
380
|
onScroll: (scrollEvent: Event) => void;
|
|
389
|
-
callLifeCycle: <T extends "onSetup" | "
|
|
381
|
+
callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
390
382
|
onSetup(): void;
|
|
391
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
392
|
-
field: import("@formily/core").GeneralField;
|
|
393
|
-
oldValue: unknown;
|
|
394
|
-
}): any;
|
|
395
383
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
396
384
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
397
385
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
398
386
|
}>>[T]> | undefined) => import("../../../..").UndefinedAble<ReturnType<Required<Partial<{
|
|
399
387
|
onSetup(): void;
|
|
400
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
401
|
-
field: import("@formily/core").GeneralField;
|
|
402
|
-
oldValue: unknown;
|
|
403
|
-
}): any;
|
|
404
388
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
405
389
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
406
390
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
@@ -493,16 +477,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
493
477
|
uuid: string;
|
|
494
478
|
lifeCycle: Partial<{
|
|
495
479
|
onSetup(): void;
|
|
496
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
497
|
-
field: import("@formily/core").GeneralField;
|
|
498
|
-
oldValue: unknown;
|
|
499
|
-
}): any;
|
|
500
480
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
501
481
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
502
482
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
503
483
|
}>;
|
|
504
484
|
businessFormatter: import("../../../../../../es/components/form-render").FormBusinessFormatter;
|
|
505
|
-
requestInstance: import("
|
|
485
|
+
requestInstance: import("../../../../../../es/components/form-render").RequestInstance;
|
|
506
486
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
507
487
|
lowCodeReactions: import("../../../..").FormLowCodeReactions.Config[];
|
|
508
488
|
linebarAutoHidden: boolean;
|
|
@@ -904,17 +884,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
904
884
|
lifeCycle: {
|
|
905
885
|
type: import("vue").PropType<Partial<{
|
|
906
886
|
onSetup(): void;
|
|
907
|
-
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
908
|
-
field: import("@formily/core").GeneralField;
|
|
909
|
-
oldValue: unknown;
|
|
910
|
-
}): any;
|
|
911
887
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
912
888
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
913
889
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
914
890
|
}>>;
|
|
915
891
|
};
|
|
916
892
|
requestInstance: {
|
|
917
|
-
type: import("vue").PropType<import("
|
|
893
|
+
type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
|
|
918
894
|
};
|
|
919
895
|
enterToNextWidget: {
|
|
920
896
|
type: import("vue").PropType<boolean | ((fieldItem: FieldItem) => boolean | void)>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as
|
|
1
|
+
import{defineComponent as e,ref as l,provide as t,computed as o,unref as a,openBlock as n,createBlock as u,normalizeStyle as i,withCtx as s,createVNode as r,mergeProps as d,createElementBlock as f,normalizeClass as c,createElementVNode as p,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as g,toDisplayString as h}from"vue";import{NPopover as k,NInputNumber as w,NSpace as V,NIcon as b}from"naive-ui";import{Close as x,GitCompareOutline as O,ArrowUndoSharp as S}from"@vicons/ionicons5";import C from"./components/NumberPanel.vue.js";import{useDraggable as _}from"@vueuse/core";import{useTheme as j}from"../../../shared/hooks/useTheme.js";import"date-fns";import"lodash-es";import{defaultCssVars as I}from"./constants/index.js";const D=p("span",null,"键盘",-1),N={class:"keys"},K=["onClick"];var R=e({__name:"Keyboard",props:{mode:{type:String,default:"english"},drag:{type:Boolean,default:!1},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},defaultValue:{type:Number},value:{type:Number},panel:{type:Boolean,default:!0},moveOffset:{type:Object,default:()=>({x:0,y:0})}},emits:["change","keydown"],setup(e,{expose:R,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],J=E.split("").concat(F),M=E.split(".")[0].split("").sort().concat(["."],F),P=j(I,"Keyboard");let Q=l(Date.now());t("toSelectInputContent",Q);const T=o((()=>"english"===B.mode)),$=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),A=o((()=>`${JSON.stringify(P.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),G=l(J.slice()),H=l(),L=l(),W=l(),X=l(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(T.value&&B.drag){const{x:e,y:l,style:t}=_(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,l)=>{var t,o,a,n;e.x+=null!=(o=null==(t=B.moveOffset)?void 0:t.x)?o:0,e.y+=null!=(n=null==(a=B.moveOffset)?void 0:a.y)?n:0}});return t}}();function Z(e){"Switch"!==e?U("keydown",e):G.value="Q"===G.value[0]?M.slice():J.slice()}function q(e){var l;null==(l=H.value)||l.setShow(!1),X.value=e,U("change",e)}return R({select:function(){Q.value=Date.now()}}),(l,t)=>a(T)||e.panel?!a(T)&&e.panel?(n(),u(C,d({key:1},a($),{style:a(P)}),null,16,["style"])):(n(),f("div",{key:2,class:c(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:i(a(A))},[r(a(V),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:i({cursor:e.drag?"move":"default"})},{default:s((()=>[D,r(a(b),{onClick:t[1]||(t[1]=e=>Z("close")),component:a(x)},null,8,["component"])])),_:1},8,["style"]),p("div",N,[(n(!0),f(m,null,v(G.value,((e,l)=>(n(),f("span",{key:e,class:c(["key"+l]),onClick:l=>Z(e)},["Switch"===e?(n(),u(a(b),{key:0,component:a(O)},null,8,["component"])):y("v-if",!0),"Undo"===e?(n(),u(a(b),{key:1,component:a(S)},null,8,["component"])):y("v-if",!0),g(" "+h(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,K)))),128))])],6)):(n(),u(a(k),{key:0,ref_key:"popoverRef",ref:H,trigger:"click","show-arrow":!1,placement:"bottom-start",style:i([{padding:"0"},a(P)]),"display-directive":"show"},{trigger:s((()=>[r(a(w),{value:X.value,"onUpdate:value":t[0]||(t[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:s((()=>[r(C,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}});export{R as default};
|
|
@@ -28,7 +28,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
28
28
|
default: () => never[];
|
|
29
29
|
};
|
|
30
30
|
search: {
|
|
31
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
31
|
+
type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
|
|
32
32
|
};
|
|
33
33
|
labelKey: {
|
|
34
34
|
type: StringConstructor;
|
|
@@ -50,12 +50,6 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
50
50
|
default: number;
|
|
51
51
|
};
|
|
52
52
|
disabled: BooleanConstructor;
|
|
53
|
-
inputProps: {
|
|
54
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
55
|
-
};
|
|
56
|
-
popperProps: {
|
|
57
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
58
|
-
};
|
|
59
53
|
}, {
|
|
60
54
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
61
55
|
value: {
|
|
@@ -86,7 +80,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
86
80
|
default: () => never[];
|
|
87
81
|
};
|
|
88
82
|
search: {
|
|
89
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
83
|
+
type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
|
|
90
84
|
};
|
|
91
85
|
labelKey: {
|
|
92
86
|
type: StringConstructor;
|
|
@@ -108,12 +102,6 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
108
102
|
default: number;
|
|
109
103
|
};
|
|
110
104
|
disabled: BooleanConstructor;
|
|
111
|
-
inputProps: {
|
|
112
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
113
|
-
};
|
|
114
|
-
popperProps: {
|
|
115
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
116
|
-
};
|
|
117
105
|
}>> & {
|
|
118
106
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
119
107
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -122,7 +110,6 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
122
110
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
123
111
|
emit: (event: "update:show" | "update:value" | "focus", ...args: any[]) => void;
|
|
124
112
|
emitValue: (value: string | import("../../../es/shared/types").AnyObject[]) => void;
|
|
125
|
-
clearableRef: import("vue").ComputedRef<number | boolean>;
|
|
126
113
|
onClear: () => void;
|
|
127
114
|
onClick: (evt: Event) => void;
|
|
128
115
|
onKeydown: (evt: KeyboardEvent) => void;
|
|
@@ -150,7 +137,6 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
150
137
|
changeCursorNode: (node: import("../../../es/shared/types").AnyObject) => void;
|
|
151
138
|
NInput: any;
|
|
152
139
|
NPopover: any;
|
|
153
|
-
ClearIcon: any;
|
|
154
140
|
SearchMenu: import("vue").DefineComponent<{
|
|
155
141
|
childKey: {
|
|
156
142
|
type: StringConstructor;
|
|
@@ -235,7 +221,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
235
221
|
default: () => never[];
|
|
236
222
|
};
|
|
237
223
|
search: {
|
|
238
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
224
|
+
type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
|
|
239
225
|
};
|
|
240
226
|
labelKey: {
|
|
241
227
|
type: StringConstructor;
|
|
@@ -257,12 +243,6 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
257
243
|
default: number;
|
|
258
244
|
};
|
|
259
245
|
disabled: BooleanConstructor;
|
|
260
|
-
inputProps: {
|
|
261
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
262
|
-
};
|
|
263
|
-
popperProps: {
|
|
264
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
265
|
-
};
|
|
266
246
|
}>> & {
|
|
267
247
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
268
248
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject,
|
|
1
|
+
import { AnyObject, Func, Nullable } from '../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
declare type ValueType = string | AnyObject[];
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
default: () => never[];
|
|
31
31
|
};
|
|
32
32
|
search: {
|
|
33
|
-
type: PropType<
|
|
33
|
+
type: PropType<Func<any[], any>>;
|
|
34
34
|
};
|
|
35
35
|
labelKey: {
|
|
36
36
|
type: StringConstructor;
|
|
@@ -52,12 +52,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
default: number;
|
|
53
53
|
};
|
|
54
54
|
disabled: BooleanConstructor;
|
|
55
|
-
inputProps: {
|
|
56
|
-
type: PropType<AnyObject>;
|
|
57
|
-
};
|
|
58
|
-
popperProps: {
|
|
59
|
-
type: PropType<AnyObject>;
|
|
60
|
-
};
|
|
61
55
|
}, {
|
|
62
56
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
63
57
|
value: {
|
|
@@ -88,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
82
|
default: () => never[];
|
|
89
83
|
};
|
|
90
84
|
search: {
|
|
91
|
-
type: PropType<
|
|
85
|
+
type: PropType<Func<any[], any>>;
|
|
92
86
|
};
|
|
93
87
|
labelKey: {
|
|
94
88
|
type: StringConstructor;
|
|
@@ -110,12 +104,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
104
|
default: number;
|
|
111
105
|
};
|
|
112
106
|
disabled: BooleanConstructor;
|
|
113
|
-
inputProps: {
|
|
114
|
-
type: PropType<AnyObject>;
|
|
115
|
-
};
|
|
116
|
-
popperProps: {
|
|
117
|
-
type: PropType<AnyObject>;
|
|
118
|
-
};
|
|
119
107
|
}>> & {
|
|
120
108
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
121
109
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -124,7 +112,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
124
112
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
125
113
|
emit: (event: "update:show" | "update:value" | "focus", ...args: any[]) => void;
|
|
126
114
|
emitValue: (value: ValueType) => void;
|
|
127
|
-
clearableRef: import("vue").ComputedRef<number | boolean>;
|
|
128
115
|
onClear: () => void;
|
|
129
116
|
onClick: (evt: Event) => void;
|
|
130
117
|
onKeydown: (evt: KeyboardEvent) => void;
|
|
@@ -152,7 +139,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
152
139
|
changeCursorNode: (node: AnyObject) => void;
|
|
153
140
|
NInput: any;
|
|
154
141
|
NPopover: any;
|
|
155
|
-
ClearIcon: any;
|
|
156
142
|
SearchMenu: import("vue").DefineComponent<{
|
|
157
143
|
childKey: {
|
|
158
144
|
type: StringConstructor;
|
|
@@ -237,7 +223,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
237
223
|
default: () => never[];
|
|
238
224
|
};
|
|
239
225
|
search: {
|
|
240
|
-
type: PropType<
|
|
226
|
+
type: PropType<Func<any[], any>>;
|
|
241
227
|
};
|
|
242
228
|
labelKey: {
|
|
243
229
|
type: StringConstructor;
|
|
@@ -259,12 +245,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
259
245
|
default: number;
|
|
260
246
|
};
|
|
261
247
|
disabled: BooleanConstructor;
|
|
262
|
-
inputProps: {
|
|
263
|
-
type: PropType<AnyObject>;
|
|
264
|
-
};
|
|
265
|
-
popperProps: {
|
|
266
|
-
type: PropType<AnyObject>;
|
|
267
|
-
};
|
|
268
248
|
}>> & {
|
|
269
249
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
270
250
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as a,provide as
|
|
1
|
+
import{defineComponent as e,computed as a,provide as l,ref as t,nextTick as o,watch as r,openBlock as u,createBlock as n,unref as s,isRef as i,normalizeStyle as d,withCtx as c,createVNode as v,normalizeClass as p,createElementVNode as f,renderSlot as h}from"vue";import{useTheme as y}from"../../../shared/hooks/useTheme.js";import{useEventBus as m,useVModel as b,onClickOutside as g,useDebounceFn as w}from"@vueuse/core";import"date-fns";import{isString as k,isArray as S,isObject as K,isFunction as C}from"lodash-es";import{uuidGenerator as N}from"../../../shared/utils/index.js";import{NOOP as _}from"@vue/shared";import{NPopover as P,NInput as j}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as x,InjectionKeyboardEventBus as A,InjectionSearchCascaderLoadingNode as U,InjectionSearchCascaderValue as W}from"./constants/index.js";import{SearchMenu as B}from"./components/SearchMenu.js";const F=["id"];var L=e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function},menuWidth:{type:[Number,String],default:150},disabled:Boolean},emits:["update:value","focus","update:show"],setup(e,{expose:L,emit:T}){const V=e,E=y();function I(){var e;e=[],Promise.resolve(C(V.beforeSetValue)?V.beforeSetValue(e):e).then((e=>T("update:value",e)),_)}function R(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&Q()}const $=e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||D.value?q.emit(e.key,e):Q()},M=a((()=>({"--menu-width":V.menuWidth}))),q=m("cascaderKeydown"),z=N(),D=b(V,"show",T);l(x,a((()=>V.checkAbleLevel))),l(A,q);const G=t(""),H=a((()=>k(V.value)&&V.value?V.value:S(V.value)&&V.value.length?V.value.map((e=>K(e)?e[V.labelKey]:e)).join(" / "):V.editPlaceholder)),J=a({get:()=>D.value?G.value:k(V.value)?V.value:S(V.value)?V.value.reduce(((e,a,l)=>0===l?a[V.labelKey]:e+" / "+a[V.labelKey]),""):"",set(e){G.value=e,te(void 0,e)}});function O(e){T("focus",e)}function Q(){D.value||V.disabled||(D.value=!0,G.value="",te())}async function X(){var e;D.value=!1,null==(e=Y.value)||e.blur()}const Y=t();g(Y,(e=>{var a;if(!D.value)return;const l=e;if(!l.target)return X();!function(e){let a=!1,l=e;for(;l;){if(l.id===z){a=!0;break}l=l.parentElement}return a}(l.target)?X():null==(a=Y.value)||a.focus()}));const Z=t(),ee=t(),ae=t(),le=t(null);l(U,le),l(W,a((()=>V.value)));const te=w((async(e,a)=>{var l;const{type:t,node:r}=e||{};try{if("update"===t)return void(C(V.search)&&V.search({...r,isLeaf:!0}));le.value=r;const e=await(C(V.search)&&V.search(r,a));ee.value=K(e)||S(e)?e:r}finally{le.value=null,await o(),null==(l=Z.value)||l.syncPosition()}}),400),oe=e=>{ae.value=e};return r((()=>V.show),(e=>{e&&(ae.value={})})),L({getWidth(){var e;if(!Y.value)return 0;const a=null==(e=Y.value)?void 0:e.$el;return a?a.clientWidth:void 0},setCursor(e){ae.value=e}}),(a,l)=>(u(),n(s(P),{class:"search-cascader",trigger:"manual",show:s(D),"onUpdate:show":l[1]||(l[1]=e=>i(D)?D.value=e:null),"show-arrow":!1,placement:"bottom-start",style:d(s(M)),disabled:e.disabled,width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:Z},{trigger:c((()=>[v(s(j),{disabled:e.disabled,class:p({"search-cascader__input":!e.disabled}),placeholder:s(D)?s(H):e.placeholder,clearable:e.clearable,onClear:I,value:s(J),"onUpdate:value":l[0]||(l[0]=e=>i(J)?J.value=e:null),ref_key:"inputRef",ref:Y,onFocus:O,onClick:R,onKeydown:$},null,8,["disabled","class","placeholder","clearable","value"])])),default:c((()=>[f("section",{id:s(z)},[v(s(B),{style:d(s(E)),"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:s(te),onChangeCursor:oe,"current-node":ee.value,"cursor-node":ae.value},{empty:c((()=>[h(a.$slots,"empty")])),_:3},8,["style","label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,F)])),_:3},8,["show","style","disabled","width"]))}});export{L as default};
|