cnhis-design-vue 3.1.53-beta.3 → 3.1.53-release.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,552 +0,0 @@
|
|
|
1
|
-
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
2
|
-
import { PropType } from 'vue';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
options: {
|
|
5
|
-
type: PropType<AnyObject[]>;
|
|
6
|
-
default: () => never[];
|
|
7
|
-
};
|
|
8
|
-
labelField: {
|
|
9
|
-
type: StringConstructor;
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
12
|
-
valueField: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
16
|
-
autograph: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
required: true;
|
|
19
|
-
};
|
|
20
|
-
lazyRequest: {
|
|
21
|
-
type: BooleanConstructor;
|
|
22
|
-
default: boolean;
|
|
23
|
-
};
|
|
24
|
-
requestCache: {
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
default: boolean;
|
|
27
|
-
};
|
|
28
|
-
wordbook: {
|
|
29
|
-
type: PropType<Partial<{
|
|
30
|
-
level_num: number;
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
render_key: string[];
|
|
34
|
-
search_key: string[];
|
|
35
|
-
value_key: string;
|
|
36
|
-
queryParams: string[];
|
|
37
|
-
primary_key: string;
|
|
38
|
-
type: string;
|
|
39
|
-
level_key: string;
|
|
40
|
-
link_key: string;
|
|
41
|
-
link_key_split: string;
|
|
42
|
-
show_key: string | string[];
|
|
43
|
-
conObj: AnyObject[];
|
|
44
|
-
conObjFirstLevel: AnyObject[];
|
|
45
|
-
setting: Partial<{
|
|
46
|
-
cascading: {
|
|
47
|
-
'form.name': string;
|
|
48
|
-
value: string;
|
|
49
|
-
}[];
|
|
50
|
-
}>;
|
|
51
|
-
}>>;
|
|
52
|
-
required: true;
|
|
53
|
-
};
|
|
54
|
-
value: {
|
|
55
|
-
type: PropType<string | AnyObject[]>;
|
|
56
|
-
};
|
|
57
|
-
fieldKey: {
|
|
58
|
-
type: StringConstructor;
|
|
59
|
-
required: true;
|
|
60
|
-
};
|
|
61
|
-
payload: {
|
|
62
|
-
type: PropType<AnyObject>;
|
|
63
|
-
required: true;
|
|
64
|
-
};
|
|
65
|
-
}, {
|
|
66
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
67
|
-
options: {
|
|
68
|
-
type: PropType<AnyObject[]>;
|
|
69
|
-
default: () => never[];
|
|
70
|
-
};
|
|
71
|
-
labelField: {
|
|
72
|
-
type: StringConstructor;
|
|
73
|
-
default: string;
|
|
74
|
-
};
|
|
75
|
-
valueField: {
|
|
76
|
-
type: StringConstructor;
|
|
77
|
-
default: string;
|
|
78
|
-
};
|
|
79
|
-
autograph: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
required: true;
|
|
82
|
-
};
|
|
83
|
-
lazyRequest: {
|
|
84
|
-
type: BooleanConstructor;
|
|
85
|
-
default: boolean;
|
|
86
|
-
};
|
|
87
|
-
requestCache: {
|
|
88
|
-
type: BooleanConstructor;
|
|
89
|
-
default: boolean;
|
|
90
|
-
};
|
|
91
|
-
wordbook: {
|
|
92
|
-
type: PropType<Partial<{
|
|
93
|
-
level_num: number;
|
|
94
|
-
id: string;
|
|
95
|
-
name: string;
|
|
96
|
-
render_key: string[];
|
|
97
|
-
search_key: string[];
|
|
98
|
-
value_key: string;
|
|
99
|
-
queryParams: string[];
|
|
100
|
-
primary_key: string;
|
|
101
|
-
type: string;
|
|
102
|
-
level_key: string;
|
|
103
|
-
link_key: string;
|
|
104
|
-
link_key_split: string;
|
|
105
|
-
show_key: string | string[];
|
|
106
|
-
conObj: AnyObject[];
|
|
107
|
-
conObjFirstLevel: AnyObject[];
|
|
108
|
-
setting: Partial<{
|
|
109
|
-
cascading: {
|
|
110
|
-
'form.name': string;
|
|
111
|
-
value: string;
|
|
112
|
-
}[];
|
|
113
|
-
}>;
|
|
114
|
-
}>>;
|
|
115
|
-
required: true;
|
|
116
|
-
};
|
|
117
|
-
value: {
|
|
118
|
-
type: PropType<string | AnyObject[]>;
|
|
119
|
-
};
|
|
120
|
-
fieldKey: {
|
|
121
|
-
type: StringConstructor;
|
|
122
|
-
required: true;
|
|
123
|
-
};
|
|
124
|
-
payload: {
|
|
125
|
-
type: PropType<AnyObject>;
|
|
126
|
-
required: true;
|
|
127
|
-
};
|
|
128
|
-
}>> & {
|
|
129
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
130
|
-
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
131
|
-
}>>;
|
|
132
|
-
emit: (event: "click" | "update:value", ...args: any[]) => void;
|
|
133
|
-
asyncQueue: import("../../../../../../../../es/shared/hooks").FormRequestDefine.FormAsyncQueue;
|
|
134
|
-
valueKey: import("vue").ComputedRef<string>;
|
|
135
|
-
valueRef: import("vue").WritableComputedRef<string | AnyObject[] | undefined>;
|
|
136
|
-
labelKey: import("vue").ComputedRef<string>;
|
|
137
|
-
optionsRef: import("vue").Ref<AnyObject[]>;
|
|
138
|
-
showRef: import("vue").Ref<boolean>;
|
|
139
|
-
fetchData: (node?: AnyObject | undefined, keyword?: string | undefined, updateValueWhenNoChild?: boolean) => Promise<void | AnyObject>;
|
|
140
|
-
menuWidth: import("vue").Ref<number>;
|
|
141
|
-
searchCascaderRef: import("vue").Ref<{
|
|
142
|
-
getWidth: () => number;
|
|
143
|
-
setCursor: (option?: AnyObject | undefined) => void;
|
|
144
|
-
} | undefined>;
|
|
145
|
-
onFocus: () => void;
|
|
146
|
-
onClick: (event: MouseEvent) => void;
|
|
147
|
-
NoData: import("vue").DefineComponent<{
|
|
148
|
-
noDataTip: {
|
|
149
|
-
type: StringConstructor;
|
|
150
|
-
default: string;
|
|
151
|
-
};
|
|
152
|
-
noDataImg: {
|
|
153
|
-
type: StringConstructor;
|
|
154
|
-
default: string;
|
|
155
|
-
};
|
|
156
|
-
showImg: {
|
|
157
|
-
type: BooleanConstructor;
|
|
158
|
-
default: boolean;
|
|
159
|
-
};
|
|
160
|
-
}, {
|
|
161
|
-
wrapperStyle: import("vue").CSSProperties;
|
|
162
|
-
imgStyle: import("vue").CSSProperties;
|
|
163
|
-
paragraphStyle: import("vue").CSSProperties;
|
|
164
|
-
textStyle: import("vue").CSSProperties;
|
|
165
|
-
imgStr: import("vue").ComputedRef<null>;
|
|
166
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
167
|
-
noDataTip: {
|
|
168
|
-
type: StringConstructor;
|
|
169
|
-
default: string;
|
|
170
|
-
};
|
|
171
|
-
noDataImg: {
|
|
172
|
-
type: StringConstructor;
|
|
173
|
-
default: string;
|
|
174
|
-
};
|
|
175
|
-
showImg: {
|
|
176
|
-
type: BooleanConstructor;
|
|
177
|
-
default: boolean;
|
|
178
|
-
};
|
|
179
|
-
}>> & {}>>;
|
|
180
|
-
handleDesc: import("vue").ComputedRef<string>;
|
|
181
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
182
|
-
noDataTip: {
|
|
183
|
-
type: StringConstructor;
|
|
184
|
-
default: string;
|
|
185
|
-
};
|
|
186
|
-
noDataImg: {
|
|
187
|
-
type: StringConstructor;
|
|
188
|
-
default: string;
|
|
189
|
-
};
|
|
190
|
-
showImg: {
|
|
191
|
-
type: BooleanConstructor;
|
|
192
|
-
default: boolean;
|
|
193
|
-
};
|
|
194
|
-
}>>, {
|
|
195
|
-
noDataTip: string;
|
|
196
|
-
noDataImg: string;
|
|
197
|
-
showImg: boolean;
|
|
198
|
-
}>;
|
|
199
|
-
CSearchCascader: import("../../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
200
|
-
value: {
|
|
201
|
-
type: PropType<string | AnyObject[]>;
|
|
202
|
-
};
|
|
203
|
-
show: {
|
|
204
|
-
type: BooleanConstructor;
|
|
205
|
-
default: boolean;
|
|
206
|
-
};
|
|
207
|
-
clearable: {
|
|
208
|
-
type: BooleanConstructor;
|
|
209
|
-
default: boolean;
|
|
210
|
-
};
|
|
211
|
-
childKey: {
|
|
212
|
-
type: StringConstructor;
|
|
213
|
-
default: string;
|
|
214
|
-
};
|
|
215
|
-
placeholder: {
|
|
216
|
-
type: StringConstructor;
|
|
217
|
-
default: string;
|
|
218
|
-
};
|
|
219
|
-
editPlaceholder: {
|
|
220
|
-
type: StringConstructor;
|
|
221
|
-
default: string;
|
|
222
|
-
};
|
|
223
|
-
options: {
|
|
224
|
-
type: PropType<AnyObject[]>;
|
|
225
|
-
default: () => never[];
|
|
226
|
-
};
|
|
227
|
-
search: {
|
|
228
|
-
type: PropType<import("../../../../../../../../es/shared/types").AnyFn<any[], any>>;
|
|
229
|
-
};
|
|
230
|
-
labelKey: {
|
|
231
|
-
type: StringConstructor;
|
|
232
|
-
default: string;
|
|
233
|
-
};
|
|
234
|
-
valueKey: {
|
|
235
|
-
type: StringConstructor;
|
|
236
|
-
default: string;
|
|
237
|
-
};
|
|
238
|
-
checkAbleLevel: {
|
|
239
|
-
type: PropType<number | "last">;
|
|
240
|
-
default: string;
|
|
241
|
-
};
|
|
242
|
-
beforeSetValue: {
|
|
243
|
-
type: PropType<(value: string | AnyObject[]) => void | (string | AnyObject[]) | Promise<string | AnyObject[]>>;
|
|
244
|
-
};
|
|
245
|
-
menuWidth: {
|
|
246
|
-
type: (NumberConstructor | StringConstructor)[];
|
|
247
|
-
default: number;
|
|
248
|
-
};
|
|
249
|
-
disabled: BooleanConstructor;
|
|
250
|
-
inputProps: {
|
|
251
|
-
type: PropType<AnyObject>;
|
|
252
|
-
};
|
|
253
|
-
popperProps: {
|
|
254
|
-
type: PropType<AnyObject>;
|
|
255
|
-
};
|
|
256
|
-
}, {
|
|
257
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
258
|
-
value: {
|
|
259
|
-
type: PropType<string | AnyObject[]>;
|
|
260
|
-
};
|
|
261
|
-
show: {
|
|
262
|
-
type: BooleanConstructor;
|
|
263
|
-
default: boolean;
|
|
264
|
-
};
|
|
265
|
-
clearable: {
|
|
266
|
-
type: BooleanConstructor;
|
|
267
|
-
default: boolean;
|
|
268
|
-
};
|
|
269
|
-
childKey: {
|
|
270
|
-
type: StringConstructor;
|
|
271
|
-
default: string;
|
|
272
|
-
};
|
|
273
|
-
placeholder: {
|
|
274
|
-
type: StringConstructor;
|
|
275
|
-
default: string;
|
|
276
|
-
};
|
|
277
|
-
editPlaceholder: {
|
|
278
|
-
type: StringConstructor;
|
|
279
|
-
default: string;
|
|
280
|
-
};
|
|
281
|
-
options: {
|
|
282
|
-
type: PropType<AnyObject[]>;
|
|
283
|
-
default: () => never[];
|
|
284
|
-
};
|
|
285
|
-
search: {
|
|
286
|
-
type: PropType<import("../../../../../../../../es/shared/types").AnyFn<any[], any>>;
|
|
287
|
-
};
|
|
288
|
-
labelKey: {
|
|
289
|
-
type: StringConstructor;
|
|
290
|
-
default: string;
|
|
291
|
-
};
|
|
292
|
-
valueKey: {
|
|
293
|
-
type: StringConstructor;
|
|
294
|
-
default: string;
|
|
295
|
-
};
|
|
296
|
-
checkAbleLevel: {
|
|
297
|
-
type: PropType<number | "last">;
|
|
298
|
-
default: string;
|
|
299
|
-
};
|
|
300
|
-
beforeSetValue: {
|
|
301
|
-
type: PropType<(value: string | AnyObject[]) => void | (string | AnyObject[]) | Promise<string | AnyObject[]>>;
|
|
302
|
-
};
|
|
303
|
-
menuWidth: {
|
|
304
|
-
type: (NumberConstructor | StringConstructor)[];
|
|
305
|
-
default: number;
|
|
306
|
-
};
|
|
307
|
-
disabled: BooleanConstructor;
|
|
308
|
-
inputProps: {
|
|
309
|
-
type: PropType<AnyObject>;
|
|
310
|
-
};
|
|
311
|
-
popperProps: {
|
|
312
|
-
type: PropType<AnyObject>;
|
|
313
|
-
};
|
|
314
|
-
}>> & {
|
|
315
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
|
316
|
-
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
317
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
318
|
-
}>>;
|
|
319
|
-
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
320
|
-
emit: (event: "update:show" | "update:value" | "focus", ...args: any[]) => void;
|
|
321
|
-
emitValue: (value: string | AnyObject[]) => void;
|
|
322
|
-
clearableRef: import("vue").ComputedRef<number | boolean>;
|
|
323
|
-
onClear: () => void;
|
|
324
|
-
onClick: (evt: Event) => void;
|
|
325
|
-
onKeydown: (evt: KeyboardEvent) => void;
|
|
326
|
-
cssVariable: import("vue").ComputedRef<{
|
|
327
|
-
'--menu-width': string | number;
|
|
328
|
-
}>;
|
|
329
|
-
eventBus: AnyObject;
|
|
330
|
-
uuid: string;
|
|
331
|
-
show: import("vue").Ref<boolean> | import("vue").WritableComputedRef<boolean>;
|
|
332
|
-
patternContent: import("vue").Ref<string>;
|
|
333
|
-
editPlaceholderRef: import("vue").ComputedRef<string>;
|
|
334
|
-
displayValue: import("vue").WritableComputedRef<string>;
|
|
335
|
-
onFocus: (focusEvt: Event) => void;
|
|
336
|
-
openMenu: () => void;
|
|
337
|
-
closeMenu: () => Promise<void>;
|
|
338
|
-
inputRef: import("vue").Ref<any>;
|
|
339
|
-
popoverRef: import("vue").Ref<any>;
|
|
340
|
-
currentNode: import("vue").Ref<AnyObject | undefined>;
|
|
341
|
-
cursorNode: import("vue").Ref<AnyObject | undefined>;
|
|
342
|
-
loadingNode: import("vue").Ref<import("../../../../../../../../es/shared/types").Nullable<AnyObject>>;
|
|
343
|
-
search: (payload?: {
|
|
344
|
-
type: "search" | "update";
|
|
345
|
-
node: AnyObject;
|
|
346
|
-
} | undefined, keyword?: string | undefined) => Promise<void>;
|
|
347
|
-
changeCursorNode: (node: AnyObject) => void;
|
|
348
|
-
NInput: any;
|
|
349
|
-
NPopover: any;
|
|
350
|
-
ClearIcon: any;
|
|
351
|
-
SearchMenu: import("vue").DefineComponent<{
|
|
352
|
-
childKey: {
|
|
353
|
-
type: StringConstructor;
|
|
354
|
-
default: string;
|
|
355
|
-
};
|
|
356
|
-
options: {
|
|
357
|
-
type: PropType<AnyObject[]>;
|
|
358
|
-
default: () => never[];
|
|
359
|
-
};
|
|
360
|
-
labelKey: {
|
|
361
|
-
type: StringConstructor;
|
|
362
|
-
default: string;
|
|
363
|
-
};
|
|
364
|
-
valueKey: {
|
|
365
|
-
type: StringConstructor;
|
|
366
|
-
default: string;
|
|
367
|
-
};
|
|
368
|
-
currentNode: {
|
|
369
|
-
type: PropType<AnyObject>;
|
|
370
|
-
};
|
|
371
|
-
cursorNode: {
|
|
372
|
-
type: PropType<AnyObject>;
|
|
373
|
-
};
|
|
374
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
375
|
-
childKey: {
|
|
376
|
-
type: StringConstructor;
|
|
377
|
-
default: string;
|
|
378
|
-
};
|
|
379
|
-
options: {
|
|
380
|
-
type: PropType<AnyObject[]>;
|
|
381
|
-
default: () => never[];
|
|
382
|
-
};
|
|
383
|
-
labelKey: {
|
|
384
|
-
type: StringConstructor;
|
|
385
|
-
default: string;
|
|
386
|
-
};
|
|
387
|
-
valueKey: {
|
|
388
|
-
type: StringConstructor;
|
|
389
|
-
default: string;
|
|
390
|
-
};
|
|
391
|
-
currentNode: {
|
|
392
|
-
type: PropType<AnyObject>;
|
|
393
|
-
};
|
|
394
|
-
cursorNode: {
|
|
395
|
-
type: PropType<AnyObject>;
|
|
396
|
-
};
|
|
397
|
-
}>> & {
|
|
398
|
-
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
399
|
-
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
400
|
-
}, {
|
|
401
|
-
options: AnyObject[];
|
|
402
|
-
valueKey: string;
|
|
403
|
-
childKey: string;
|
|
404
|
-
labelKey: string;
|
|
405
|
-
}>;
|
|
406
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:show" | "update:value" | "focus")[], "focus" | "update:show" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
407
|
-
value: {
|
|
408
|
-
type: PropType<string | AnyObject[]>;
|
|
409
|
-
};
|
|
410
|
-
show: {
|
|
411
|
-
type: BooleanConstructor;
|
|
412
|
-
default: boolean;
|
|
413
|
-
};
|
|
414
|
-
clearable: {
|
|
415
|
-
type: BooleanConstructor;
|
|
416
|
-
default: boolean;
|
|
417
|
-
};
|
|
418
|
-
childKey: {
|
|
419
|
-
type: StringConstructor;
|
|
420
|
-
default: string;
|
|
421
|
-
};
|
|
422
|
-
placeholder: {
|
|
423
|
-
type: StringConstructor;
|
|
424
|
-
default: string;
|
|
425
|
-
};
|
|
426
|
-
editPlaceholder: {
|
|
427
|
-
type: StringConstructor;
|
|
428
|
-
default: string;
|
|
429
|
-
};
|
|
430
|
-
options: {
|
|
431
|
-
type: PropType<AnyObject[]>;
|
|
432
|
-
default: () => never[];
|
|
433
|
-
};
|
|
434
|
-
search: {
|
|
435
|
-
type: PropType<import("../../../../../../../../es/shared/types").AnyFn<any[], any>>;
|
|
436
|
-
};
|
|
437
|
-
labelKey: {
|
|
438
|
-
type: StringConstructor;
|
|
439
|
-
default: string;
|
|
440
|
-
};
|
|
441
|
-
valueKey: {
|
|
442
|
-
type: StringConstructor;
|
|
443
|
-
default: string;
|
|
444
|
-
};
|
|
445
|
-
checkAbleLevel: {
|
|
446
|
-
type: PropType<number | "last">;
|
|
447
|
-
default: string;
|
|
448
|
-
};
|
|
449
|
-
beforeSetValue: {
|
|
450
|
-
type: PropType<(value: string | AnyObject[]) => void | (string | AnyObject[]) | Promise<string | AnyObject[]>>;
|
|
451
|
-
};
|
|
452
|
-
menuWidth: {
|
|
453
|
-
type: (NumberConstructor | StringConstructor)[];
|
|
454
|
-
default: number;
|
|
455
|
-
};
|
|
456
|
-
disabled: BooleanConstructor;
|
|
457
|
-
inputProps: {
|
|
458
|
-
type: PropType<AnyObject>;
|
|
459
|
-
};
|
|
460
|
-
popperProps: {
|
|
461
|
-
type: PropType<AnyObject>;
|
|
462
|
-
};
|
|
463
|
-
}>> & {
|
|
464
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
|
465
|
-
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
466
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
467
|
-
}, {
|
|
468
|
-
disabled: boolean;
|
|
469
|
-
show: boolean;
|
|
470
|
-
options: AnyObject[];
|
|
471
|
-
placeholder: string;
|
|
472
|
-
valueKey: string;
|
|
473
|
-
clearable: boolean;
|
|
474
|
-
childKey: string;
|
|
475
|
-
editPlaceholder: string;
|
|
476
|
-
labelKey: string;
|
|
477
|
-
checkAbleLevel: number | "last";
|
|
478
|
-
menuWidth: string | number;
|
|
479
|
-
}>>;
|
|
480
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:value")[], "click" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
481
|
-
options: {
|
|
482
|
-
type: PropType<AnyObject[]>;
|
|
483
|
-
default: () => never[];
|
|
484
|
-
};
|
|
485
|
-
labelField: {
|
|
486
|
-
type: StringConstructor;
|
|
487
|
-
default: string;
|
|
488
|
-
};
|
|
489
|
-
valueField: {
|
|
490
|
-
type: StringConstructor;
|
|
491
|
-
default: string;
|
|
492
|
-
};
|
|
493
|
-
autograph: {
|
|
494
|
-
type: StringConstructor;
|
|
495
|
-
required: true;
|
|
496
|
-
};
|
|
497
|
-
lazyRequest: {
|
|
498
|
-
type: BooleanConstructor;
|
|
499
|
-
default: boolean;
|
|
500
|
-
};
|
|
501
|
-
requestCache: {
|
|
502
|
-
type: BooleanConstructor;
|
|
503
|
-
default: boolean;
|
|
504
|
-
};
|
|
505
|
-
wordbook: {
|
|
506
|
-
type: PropType<Partial<{
|
|
507
|
-
level_num: number;
|
|
508
|
-
id: string;
|
|
509
|
-
name: string;
|
|
510
|
-
render_key: string[];
|
|
511
|
-
search_key: string[];
|
|
512
|
-
value_key: string;
|
|
513
|
-
queryParams: string[];
|
|
514
|
-
primary_key: string;
|
|
515
|
-
type: string;
|
|
516
|
-
level_key: string;
|
|
517
|
-
link_key: string;
|
|
518
|
-
link_key_split: string;
|
|
519
|
-
show_key: string | string[];
|
|
520
|
-
conObj: AnyObject[];
|
|
521
|
-
conObjFirstLevel: AnyObject[];
|
|
522
|
-
setting: Partial<{
|
|
523
|
-
cascading: {
|
|
524
|
-
'form.name': string;
|
|
525
|
-
value: string;
|
|
526
|
-
}[];
|
|
527
|
-
}>;
|
|
528
|
-
}>>;
|
|
529
|
-
required: true;
|
|
530
|
-
};
|
|
531
|
-
value: {
|
|
532
|
-
type: PropType<string | AnyObject[]>;
|
|
533
|
-
};
|
|
534
|
-
fieldKey: {
|
|
535
|
-
type: StringConstructor;
|
|
536
|
-
required: true;
|
|
537
|
-
};
|
|
538
|
-
payload: {
|
|
539
|
-
type: PropType<AnyObject>;
|
|
540
|
-
required: true;
|
|
541
|
-
};
|
|
542
|
-
}>> & {
|
|
543
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
544
|
-
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
545
|
-
}, {
|
|
546
|
-
options: AnyObject[];
|
|
547
|
-
labelField: string;
|
|
548
|
-
valueField: string;
|
|
549
|
-
lazyRequest: boolean;
|
|
550
|
-
requestCache: boolean;
|
|
551
|
-
}>;
|
|
552
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"./levelSearchCascade.vue2.js";import r from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var a=r(e,[["__file","levelSearchCascade.vue"]]);export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{defineComponent as e,inject as a,openBlock as t,createBlock as o,unref as r,isRef as s,withCtx as u,createVNode as i}from"vue";import l from"../../../../../../../shared/components/no-data/NoData.vue.js";import"../../../../../../../shared/utils/index.js";import"lodash-es";import"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import{useLevelSearchCascader as p}from"../../../../../../../shared/hooks/useLevelSearchCascader.js";import"@vueuse/shared";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{InjectionTableAsyncQueue as n}from"../../../../constants/index.js";import d from"../../../../../../search-cascader/index.js";var c=e({__name:"levelSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},value:{type:[String,Array]},fieldKey:{type:String,required:!0},payload:{type:Object,required:!0}},emits:["update:value","click"],setup(e,{emit:c}){const y=e,h=a(n),{valueKey:m,valueRef:f,labelKey:v,optionsRef:k,showRef:j,fetchData:S,menuWidth:b,searchCascaderRef:g}=p(y,c,{fieldKey:y.fieldKey,asyncQueue:h,getRequestPayload:()=>y.payload});function q(){b.value=150}function w(e){c("click",e)}return(e,a)=>(t(),o(r(d),{ref_key:"searchCascaderRef",ref:g,value:r(f),"onUpdate:value":a[0]||(a[0]=e=>s(f)?f.value=e:null),show:r(j),"onUpdate:show":a[1]||(a[1]=e=>s(j)?j.value=e:null),options:r(k),"label-key":r(v),"value-key":r(m),search:r(S),"menu-width":r(b),"input-props":{onClick:w},onFocus:q},{empty:u((()=>[i(r(l))])),_:1},8,["value","show","options","label-key","value-key","search","menu-width","input-props"]))}});export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function wordbookSettingPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../index.js";import{isFunction as o}from"lodash-es";import{getLowCodeFieldFromField as n}from"../utils/index.js";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function i(){const i="wordbookSettingPlugin";return t({name:i,apply(t){t.configHooks.config.tap(i,(t=>{const i=t.onFormChange;return t.onFormChange=function(t){var r,e,l;o(i)&&i(t);const{column:s,row:u,$table:a,option:c}=t,d=n(s);c&&(null==(l=null==(e=null==(r=null==d?void 0:d.wordbook)?void 0:r.setting)?void 0:e.cascading)?void 0:l.length)&&d.wordbook.setting.cascading.forEach((o=>{const n=function(o,n){return o.getColumns().find((o=>o.title===n))}(a,o["form.name"]);n&&(u[n.field]=c[o.value])}))},t}))}})}export{i as wordbookSettingPlugin};
|
|
@@ -1 +0,0 @@
|
|
|
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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{useSelectAllowModify}from"./useSelectAllowModify.js";export{useOptionFiltered}from"./useOptionFiltered.js";export{searchContentMatcher,useSearchContent}from"./useSearchContent.js";export{useSelectRenders}from"./useSelectRenders.js";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
export declare function useOptionFiltered(props: {
|
|
4
|
-
options?: AnyObject[] | undefined;
|
|
5
|
-
}, labelKey: Ref<string>, searchKey?: Ref<string[] | undefined>): {
|
|
6
|
-
searchContent: Ref<string | undefined>;
|
|
7
|
-
remoteOptions: Ref<AnyObject[] | null>;
|
|
8
|
-
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
9
|
-
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../utils/index.js";import"lodash-es";import"naive-ui";import{ref as o,computed as e}from"vue";import"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import{useSearchContent as t}from"./useSearchContent.js";import"@vicons/ionicons5";function i(i,r,n){const{searchContent:s,optionSearchFilter:u}=t(),p=o(null),a=e((()=>p.value?u(p.value,r.value,null==n?void 0:n.value):Array.isArray(i.options)?u(i.options,r.value):[])),l=e((()=>p.value||i.options||[]));return{searchContent:s,remoteOptions:p,filterOptions:a,fullOptions:l}}export{i as useOptionFiltered};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
-
export declare const searchContentMatcher: (searchContent: string, label: string) => RegExpMatchArray | null;
|
|
3
|
-
export declare function useSearchContent(): {
|
|
4
|
-
searchContent: import("vue").Ref<string | undefined>;
|
|
5
|
-
optionSearchFilter: (options: AnyObject[], labelKey: string, searchKeys?: string[]) => AnyObject[];
|
|
6
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{keywordMatcher as e}from"../../utils/index.js";import{useMemoize as t}from"@vueuse/core";import{identity as r,isArray as n,isString as o}from"lodash-es";import{ref as u}from"vue";const i=(()=>{const e=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:r});return(t,r)=>r.match(e(t))})();function c(){const t=u();return{searchContent:t,optionSearchFilter:function(r,u,c){if(!t.value)return r;const s=n(c)?c.filter((e=>e&&o(e))):[];return r.filter((r=>function(r,n,u){if(!t.value)return!0;const c=r?r[n]:"";return!!o(c)&&(!!i(t.value,c)||!!e(t.value,r.keyword)||!!u.length&&u.some((e=>o(r[e])&&r[e].includes(t.value))))}(r,u,s)))}}}export{i as searchContentMatcher,c as useSearchContent};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AnyObject, ArrayAble } from '../../../../es/shared/types';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
export declare function useSelectAllowModify(props: Partial<{
|
|
4
|
-
allowCreate: boolean;
|
|
5
|
-
allowModify: boolean;
|
|
6
|
-
multiple: boolean;
|
|
7
|
-
cursorPlacement: 'start' | 'end';
|
|
8
|
-
shouldSave: boolean;
|
|
9
|
-
}>, { searchContent, labelKey, valueKey, valueRef, fullOptions }: {
|
|
10
|
-
searchContent: Ref;
|
|
11
|
-
labelKey: Ref<string>;
|
|
12
|
-
valueKey: Ref<string>;
|
|
13
|
-
valueRef: Ref;
|
|
14
|
-
fullOptions: Ref<AnyObject[]>;
|
|
15
|
-
}): {
|
|
16
|
-
modifyAbleRef: import("vue").ComputedRef<boolean | undefined>;
|
|
17
|
-
modifyEvent: {
|
|
18
|
-
focus: (event: FocusEvent) => Promise<void>;
|
|
19
|
-
blur: (event: Event) => null | undefined;
|
|
20
|
-
updateValue: (value: any, option?: ArrayAble<AnyObject>) => Promise<void>;
|
|
21
|
-
};
|
|
22
|
-
getOptionsWithCreated: (options: AnyObject[]) => AnyObject[];
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{promiseTimeout as e}from"@vueuse/shared";import{isArray as l,isObject as a}from"lodash-es";import{computed as u,nextTick as t}from"vue";function v(v,{searchContent:o,labelKey:n,valueKey:i,valueRef:r,fullOptions:s}){let f=null;const c=u((()=>(v.multiple&&v.allowModify&&console.warn("多选模式下不支持allowModify"),!v.multiple&&v.allowModify)));return{modifyAbleRef:c,modifyEvent:{focus:async l=>{var a,u;c.value&&(f=l.target,f&&r.value&&(await t(),f.value=null!=(u=null==(a=s.value.find((e=>e[i.value]===r.value)))?void 0:a[n.value])?u:r.value,f.dispatchEvent(new CustomEvent("input")),"start"===v.cursorPlacement&&(await e(0),f.setSelectionRange(0,0))))},blur:function(e){if(c.value&&(f=e.target,f)){if(!f.value)return r.value=null;o.value=f.value,r.value=f.value}},updateValue:async function(e,u){!u||l(u)?r.value=e:u&&(r.value=u[v.allowModify?n.value:i.value]),f&&a(u)&&c.value&&(f.focus(),await t(),f.value=u[n.value]||"",f.dispatchEvent(new CustomEvent("input")),"start"===v.cursorPlacement&&f.setSelectionRange(0,0))}},getOptionsWithCreated:function(e){return v.allowCreate&&o.value&&!e.some((e=>e[n.value]===o.value))?[...e,{[n.value]:o.value,[i.value]:o.value,created:!0,shouldSave:v.shouldSave}]:e}}}export{v as useSelectAllowModify};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
-
import { SelectOption } from 'naive-ui';
|
|
3
|
-
import { Ref } from 'vue';
|
|
4
|
-
export declare function useSelectRenders(props: {
|
|
5
|
-
multiple: boolean;
|
|
6
|
-
deletable: boolean;
|
|
7
|
-
}, { labelKey, showKey, searchContent }: {
|
|
8
|
-
searchContent: Ref;
|
|
9
|
-
labelKey: Ref<string>;
|
|
10
|
-
showKey: Ref<string | undefined>;
|
|
11
|
-
}): {
|
|
12
|
-
renderLabel: (option: AnyObject) => string | JSX.Element;
|
|
13
|
-
renderSelectAll: (onSelectAll: (checked: boolean) => void) => JSX.Element[];
|
|
14
|
-
renderTag: ({ option, handleClose }: {
|
|
15
|
-
option: SelectOption;
|
|
16
|
-
handleClose: Function;
|
|
17
|
-
}) => unknown;
|
|
18
|
-
titleRef: Ref<string>;
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ref as e,createVNode as t,createTextVNode as n}from"vue";import"../../utils/index.js";import{isString as l}from"lodash-es";import{NTooltip as o,NIcon as r,NButton as a,NTag as i}from"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import{searchContentMatcher as u}from"./useSearchContent.js";import{HelpCircleSharp as s}from"@vicons/ionicons5";function c(c,{labelKey:p,showKey:m,searchContent:d}){const f=e("");return{renderLabel:function(e){const n=e[p.value];if(!n||!l(n))return"";const a=d.value?u(d.value,n):null,i=a?t("section",null,[a.map(((e,n)=>0!==n&&e?t("span",{style:{color:n%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):n;return e.desc?t("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[i,e.desc?t(o,null,{trigger:()=>t(r,{component:s},null),default:()=>e.desc}):null]):i},renderSelectAll:function(e){return[t(a,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>e(!0)},{default:()=>[n("全选")]}),t(a,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>e(!1)},{default:()=>[n("清空")]})]},renderTag:function({option:e,handleClose:n}){var l;const o=null!=(l=m.value&&e[m.value])?l:e[p.value];return c.multiple?(f.value="",c.deletable?t(i,{closable:!0,onClose:e=>{e.stopPropagation(),n()}},{default:()=>t("span",{title:o},[o])}):`${o} ;`):(f.value=o,o)},titleRef:f}}export{c as useSelectRenders};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cloneDeep as s}from"lodash-es";var e=(s=>(s[s.PENDING=0]="PENDING",s[s.DONE=1]="DONE",s))(e||{});class t{constructor(s,e,t){this.item=s,this.key=e,this.state=0,this.callback=t}}class i{constructor(s){this._list=s?Array.from(s):[]}enqueue(s){this._list.push(s)}dequeue(){return this._list.shift()}}class r{constructor({name:s,processor:e,getKey:t,parallelism:r,uniqueData:a}){this._queued=new i,this._entries=new Map,this._activeTasks=0,this._processingLock=!1,this._stopped=!1,this.uniqueData=!0,this.name=s,this.processor=e,this.getKey=t,this.parallelism=r||100,this.uniqueData=!!a}add(e,i){if(this._stopped)return i(new Error("Queue was stopped"));const r=this.getKey(e);if(this._entries.has(r)){const e=this._entries.get(r);return void(1===e.state?setTimeout((()=>{i&&i(this.uniqueData?s(e.error):e.error,this.uniqueData?s(e.result):e.result)})):e.callbacks?e.callbacks.push(i):e.callbacks=[i])}const a=new t(e,r,i);this._entries.set(r,a),this._queued.enqueue(a),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}addAsync(s){return new Promise(((e,t)=>{this.add(s,((s,i)=>{s&&t(s),e(i)}))}))}_ensureProcessing(){for(;this._activeTasks<this.parallelism;){const s=this._queued.dequeue();if(!s)break;this._activeTasks++,s.state=0,this._startProcess(s)}this._processingLock=!1}_startProcess(s){this.processor(s.item,((e,t)=>{e?this._handlerResult(s,e):this._handlerResult(s,e,t)}),(()=>this._entries.delete(s.key)))}_handlerResult(e,t,i){const r=e.callback;e.state=1,e.callback=void 0,e.result=this.uniqueData?s(i):i,e.error=this.uniqueData?s(t):t,this._activeTasks--,r&&r(t,i),e.callbacks&&e.callbacks.forEach((s=>s(t,i))),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}}export{r as AsyncQueue,e as ENTRY_STATE};
|