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