cnhis-design-vue 3.1.53-release.0 → 3.1.53-release.2

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.
Files changed (158) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
  3. package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
  4. package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
  5. package/es/components/body-select/index.d.ts +9 -4
  6. package/es/components/body-select/src/config/index.js +1 -1
  7. package/es/components/body-select/src/hooks/renderCanvas.d.ts +1 -1
  8. package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
  9. package/es/components/body-select/src/index.vue.d.ts +9 -4
  10. package/es/components/body-select/src/index.vue2.js +1 -1
  11. package/es/components/button-print/index.d.ts +9 -0
  12. package/es/components/button-print/src/ButtonPrint.vue.d.ts +9 -0
  13. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  14. package/es/components/button-print/src/utils/dialog.d.ts +2 -2
  15. package/es/components/button-print/src/utils/print.d.ts +14 -13
  16. package/es/components/button-print/src/utils/print.js +1 -1
  17. package/es/components/callback/src/components/render/popupMaps.d.ts +69 -6
  18. package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
  19. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  20. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  21. package/es/components/form-config/index.d.ts +105 -26
  22. package/es/components/form-config/src/FormConfig.vue.d.ts +106 -27
  23. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  24. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +30 -6
  25. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +51 -12
  26. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  27. package/es/components/form-render/index.d.ts +30 -6
  28. package/es/components/form-render/index.js +1 -1
  29. package/es/components/form-render/src/FormRender.vue.d.ts +31 -7
  30. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  31. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -7
  32. package/es/components/form-render/src/components/renderer/{combination.d.ts → combination/combination.d.ts} +1 -1
  33. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -0
  34. package/es/components/form-render/src/components/renderer/combination/hooks/index.d.ts +2 -0
  35. package/es/components/form-render/src/components/renderer/combination/hooks/index.js +1 -0
  36. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +8 -0
  37. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -0
  38. package/es/components/form-render/src/components/renderer/combination/index.d.ts +3 -0
  39. package/es/components/form-render/src/components/renderer/combination/index.js +1 -0
  40. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -0
  41. package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +61 -0
  42. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -0
  43. package/es/components/form-render/src/components/renderer/index.js +1 -1
  44. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
  45. package/es/components/form-render/src/components/renderer/{levelSearchCascader.d.ts → levelSearchCascader/index.d.ts} +3 -5
  46. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -0
  47. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
  48. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  49. package/es/components/form-render/src/components/renderer/select.d.ts +5 -5
  50. package/es/components/form-render/src/components/renderer/select.js +1 -1
  51. package/es/components/form-render/src/constants/index.d.ts +3 -2
  52. package/es/components/form-render/src/hooks/index.d.ts +0 -2
  53. package/es/components/form-render/src/hooks/index.js +1 -1
  54. package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
  55. package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
  56. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
  57. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  58. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
  59. package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
  60. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  61. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
  62. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +9 -1
  63. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
  64. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  65. package/es/components/form-render/src/types/fieldItem.d.ts +5 -26
  66. package/es/components/form-render/src/types/index.d.ts +7 -14
  67. package/es/components/form-render/src/utils/index.d.ts +1 -2
  68. package/es/components/form-render/src/utils/index.js +1 -1
  69. package/es/components/form-render/src/utils/schema.d.ts +2 -2
  70. package/es/components/form-render/src/utils/schema.js +1 -1
  71. package/es/components/guide/src/renderer.js +1 -1
  72. package/es/components/iho-table/index.d.ts +39 -0
  73. package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
  74. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  75. package/es/components/iho-table/src/constants/index.d.ts +4 -1
  76. package/es/components/iho-table/src/constants/index.js +1 -1
  77. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
  78. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
  79. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  80. package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
  81. package/es/components/iho-table/src/plugins/index.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  84. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
  85. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
  86. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
  87. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
  88. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
  89. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +5 -2
  90. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  91. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  92. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
  93. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  94. package/es/components/iho-table/src/plugins/wordbookSettingPlugin.d.ts +1 -0
  95. package/es/components/iho-table/src/plugins/wordbookSettingPlugin.js +1 -0
  96. package/es/components/iho-table/src/types/index.d.ts +7 -2
  97. package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
  98. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  99. package/es/components/iho-table/src/utils/index.js +1 -1
  100. package/es/components/iho-table/style/index.css +1 -1
  101. package/es/components/index.css +1 -1
  102. package/es/components/index.d.ts +1 -0
  103. package/es/components/index.js +1 -1
  104. package/es/components/info-header/index.d.ts +97 -29
  105. package/es/components/info-header/src/InfoHeader.vue.d.ts +98 -30
  106. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +9 -5
  107. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +10 -6
  108. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +41 -13
  109. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +30 -6
  110. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  111. package/es/components/search-cascader/index.d.ts +23 -3
  112. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
  113. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  114. package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
  115. package/es/components/shortcut-setter/index.d.ts +34 -9
  116. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +35 -10
  117. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  118. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  119. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
  120. package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
  121. package/es/shared/hooks/index.d.ts +3 -0
  122. package/es/shared/hooks/index.js +1 -1
  123. package/es/shared/hooks/selectHooks/index.d.ts +4 -0
  124. package/es/shared/hooks/selectHooks/index.js +1 -0
  125. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +10 -0
  126. package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -0
  127. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +6 -0
  128. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -0
  129. package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +23 -0
  130. package/es/shared/hooks/selectHooks/useSelectAllowModify.js +1 -0
  131. package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +21 -0
  132. package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -0
  133. package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
  134. package/es/shared/hooks/useAsyncQueue/index.js +1 -0
  135. package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
  136. package/es/shared/hooks/useAsyncQueue/types.js +1 -0
  137. package/es/shared/hooks/useDateTime.d.ts +2 -2
  138. package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
  139. package/es/shared/hooks/useFormRequest/index.js +1 -0
  140. package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
  141. package/es/shared/hooks/useFormRequest/types.js +1 -0
  142. package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
  143. package/es/shared/hooks/useLevelSearchCascader.js +1 -0
  144. package/es/shared/package.json.js +1 -1
  145. package/es/shared/types/business.d.ts +24 -0
  146. package/es/shared/types/index.d.ts +1 -1
  147. package/package.json +2 -2
  148. package/es/components/form-render/src/components/renderer/combination.js +0 -1
  149. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +0 -1
  150. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +0 -1
  151. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
  152. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
  153. package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
  154. package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
  155. package/es/shared/hooks/useAsyncQueue.js +0 -1
  156. /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.d.ts +0 -0
  157. /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.js +0 -0
  158. /package/es/components/form-render/src/components/renderer/{jsonCombination/index.d.ts → combination/jsonCombination.d.ts} +0 -0
@@ -0,0 +1,552 @@
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;
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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,6 +1,6 @@
1
+ import { AnyObject } from '../../../../../../../../es/shared/types';
1
2
  import { PropType } from 'vue';
2
3
  import { VxeTableDefines } from 'vxe-table';
3
- import { AnyObject } from '../../../../../../../../es/shared/types';
4
4
  import { IhoTableLowCodeField } from '../../../../../../../../es/components/iho-table';
5
5
  declare const _default: import("vue").DefineComponent<{
6
6
  value: {
@@ -29,6 +29,7 @@ declare const _default: import("vue").DefineComponent<{
29
29
  type: StringConstructor;
30
30
  default: string;
31
31
  };
32
+ allowModify: BooleanConstructor;
32
33
  allowCreate: {
33
34
  type: BooleanConstructor;
34
35
  default: boolean;
@@ -94,6 +95,7 @@ declare const _default: import("vue").DefineComponent<{
94
95
  type: StringConstructor;
95
96
  default: string;
96
97
  };
98
+ allowModify: BooleanConstructor;
97
99
  allowCreate: {
98
100
  type: BooleanConstructor;
99
101
  default: boolean;
@@ -140,10 +142,11 @@ declare const _default: import("vue").DefineComponent<{
140
142
  labelField: string;
141
143
  valueField: string;
142
144
  placeholder: string;
145
+ allowModify: boolean;
143
146
  deletable: boolean;
144
147
  selectAll: boolean;
145
148
  shouldSave: boolean;
146
- consistentMenuWidth: boolean;
147
149
  allowCreate: boolean;
150
+ consistentMenuWidth: boolean;
148
151
  }>;
149
152
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,ref as t,computed as o,onBeforeUnmount as n,watch as a,nextTick as u,createVNode as i,toRaw as r,Fragment as d,createTextVNode as s}from"vue";import{keywordMatcher as c,arrayed as p}from"../../../../../../../shared/utils/index.js";import{NSelect as v,NTooltip as f,NIcon as m,NTag as y,NButton as h}from"naive-ui";import{HelpCircleSharp as b}from"@vicons/ionicons5";import{InjectionIhoTableUUID as w}from"../../../../constants/index.js";import{getSelectOptions as F,selectOptionsMap as g}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as S}from"../../../../utils/index.js";import{useDebounceFn as q}from"@vueuse/core";import{isEmpty as O,isFunction as $,isArray as x,isObject as C,omit as B,cloneDeep as _,xor as j,uniq as k}from"lodash-es";var P=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowCreate:{type:Boolean,default:!1},shouldSave:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean,default:!1},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:P}){const M=l("$xetable"),W=t(null);function A(e){W.value=e}const D=t(!1),{emitFormChangeWithParams:E}=S({...e,$table:M}),R=t("");function T(){return z()}const I=t([]),U=o((()=>{let l=O(I.value)?e.options:I.value;return R.value?(l=l.filter((l=>l[e.labelField]&&l[e.labelField].includes(R.value)||c(R.value,l.keyword))),!e.allowCreate||l.some((l=>l[e.labelField]===R.value))?l:[...l,{[e.labelField]:R.value,[e.valueField]:R.value,created:!0,shouldSave:e.shouldSave}]):l})),V=t(!1),z=q((async function(l=""){R.value=l;try{if(V.value=!0,!$(e.queryOptions)||!O(e.options))return;I.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{V.value=!1}}),400),K=l(w);function N(l=!1){e.multiple&&u((()=>{var t,o,n;const{refTableLeftBody:a,refTableBody:u}=M.getRefMaps(),i=null==(t=null==a?void 0:a.value)?void 0:t.$el;if(!i)return;const r=null==(o=null==u?void 0:u.value)?void 0:o.$el,d=M.getRowid(e.row),s=null==(n=r.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:n.clientHeight,c=i.querySelector(`.vxe-body--row[rowid="${d}"]`),p=l?"unset":s+"px";c.style.height=p}))}function H(l,t){var o,n;const a=e.value;P("update:value",l);const u=F(K,e.column.field,e.row,M);K&&x(u)&&p(t).forEach((e=>{if(!C(e))return;const l=e;l.created&&l.shouldSave&&u.push(B(r(l),["created","shouldSave"]))}));const i=null==(o=e.column.editRender)?void 0:o.props;if(K&&(null==i?void 0:i.connectField)){const t=null==(n=i.connectField)?void 0:n.split(","),o=g.get(K);t.forEach((async t=>{var n;const{tableColumn:a}=M.reactData,u=a.find((e=>e.field===t)),i=null==(n=null==u?void 0:u.editRender)?void 0:n.props;if(null==i?void 0:i.queryOptions){const n=l?`${t}__${e.column.field}-${l}`:t;if(o[n])return;const a=await i.queryOptions({row:e.row,column:u,isFullData:!0,connectColumn:e.column});o[n]=a}}))}E({oldValue:a,option:_(t)}),N()}function L(e){var l,t;"Tab"===e.key&&W.value&&(null==(t=(l=W.value).handleKeydown)||t.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}function G(l){const t=l?U.value.map((l=>l[e.valueField])):[],o=x(e.value)?e.value:[],n=j(t,o),a=l?k(o.concat(n)):[];if(o.length===a.length)return;P("update:value",a);const u=F(K,e.column.field,e.row,M);E({oldValue:o,option:l?u.filter((l=>a.includes(l[e.valueField]))):[]})}function J({node:e,option:l}){return l.desc?i("div",{class:"iho-table__selectOptionWrapper"},[[e,i(f,null,{trigger:()=>i(m,{component:b},null),default:()=>l.desc})]]):e}function Q({option:l,handleClose:t}){var o;const n=null!=(o=e.aliasField&&l[e.aliasField])?o:l[e.labelField];return x(e.value)?e.deletable?i(y,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>n}):`${n} ;`:i(d,null,[n])}function X(){return i(d,null,[i(h,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>G(!0)},{default:()=>[s("全选")]}),i(h,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>G(!1)},{default:()=>[s("清空")]})])}n((()=>{N(!0)})),a((()=>D.value),(e=>{N()}),{immediate:!0});const Y=()=>({class:"iho-table__selectOption"}),Z=o((()=>{var l,t;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(t=null==(l=e.menuProps)?void 0:l.class)?t:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=X),i(v,{ref:A,show:D.value,"onUpdate:show":e=>D.value=e,consistentMenuWidth:e.consistentMenuWidth,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:V.value,options:U.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:z,clearable:!0,filterable:!0,nodeProps:Y,menuProps:Z.value,renderTag:Q,renderOption:J,onUpdateShow:T,onUpdateValue:H,onKeydown:L},l)}}});export{P as default};
1
+ import{defineComponent as e,inject as l,ref as o,computed as t,onBeforeUnmount as n,nextTick as a,createVNode as r,toRaw as u}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import{isFunction as s,isEmpty as d,isArray as c,isObject as p,omit as v,cloneDeep as f,xor as m}from"lodash-es";import{NSelect as y}from"naive-ui";import{useVModel as h,useDebounceFn as b}from"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as w}from"../../../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import{useOptionFiltered as S}from"../../../../../../../shared/hooks/selectHooks/useOptionFiltered.js";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as g}from"../../../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{InjectionIhoTableUUID as F}from"../../../../constants/index.js";import{useIhoTableFormEvent as O}from"../../../../utils/index.js";import{getSelectOptions as k,selectOptionsMap as j}from"../hooks/useSelectOption.js";var x=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowModify:Boolean,allowCreate:{type:Boolean,default:!1},shouldSave:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean,default:!1},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:x}){const $=l("$xetable"),q=h(e,"value",x),B=o(null),{emitFormChangeWithParams:C}=O({...e,$table:$}),R=t((()=>e.labelField)),A=t((()=>e.valueField)),K=t((()=>e.aliasField)),{fullOptions:M,filterOptions:P,searchContent:_,remoteOptions:E}=S(e,R),{modifyEvent:H,modifyAbleRef:T,getOptionsWithCreated:W}=w(e,{searchContent:_,labelKey:R,valueKey:A,valueRef:q,fullOptions:M}),D=t((()=>W(T.value?M.value:P.value))),V=o(!1),I=b((async function(l=""){_.value=l;try{if(V.value=!0,!s(e.queryOptions)||!d(e.options))return;E.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{V.value=!1}}),400),L=l(F);function N(){U(),I()}async function U(l=!1){var o,t,n;if(!e.multiple)return;await a();const{refTableLeftBody:r,refTableBody:u}=$.getRefMaps(),i=null==(o=null==r?void 0:r.value)?void 0:o.$el;if(!i)return;const s=null==(t=null==u?void 0:u.value)?void 0:t.$el,d=$.getRowid(e.row),c=null==(n=s.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:n.clientHeight;i.querySelector(`.vxe-body--row[rowid="${d}"]`).style.height=l?"unset":c+"px"}async function z(l,o){var t,n;const a=e.value;await H.updateValue(l,o);const r=k(L,e.column.field,e.row,$);L&&c(r)&&i(o).forEach((e=>{if(!p(e))return;const l=e;l.created&&l.shouldSave&&r.push(v(u(l),["created","shouldSave"]))}));const s=null==(t=e.column.editRender)?void 0:t.props;if(L&&(null==s?void 0:s.connectField)){const o=null==(n=s.connectField)?void 0:n.split(","),t=j.get(L);o.forEach((async o=>{var n;const{tableColumn:a}=$.reactData,r=a.find((e=>e.field===o)),u=null==(n=null==r?void 0:r.editRender)?void 0:n.props;if(null==u?void 0:u.queryOptions){const n=l?`${o}__${e.column.field}-${l}`:o;if(t[n])return;t[n]=await u.queryOptions({row:e.row,column:r,isFullData:!0,connectColumn:e.column})}}))}return C({oldValue:a,option:f(o)}),U()}function G(e){var l,o;"Tab"===e.key&&B.value&&(null==(o=(l=B.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}n((()=>U(!0)));const{renderTag:J,renderLabel:Q,renderSelectAll:X}=g(e,{labelKey:R,valueKey:A,valueRef:q,showKey:K,searchContent:_});function Y(l){if(!e.multiple)return;const o=l?D.value.map((e=>e[A.value])):[];if(!m(o,q.value).length)return;const t=q.value;q.value=o,C({oldValue:t,option:l?D.value:[]})}const Z=()=>({class:"iho-table__selectOption"}),ee=t((()=>{var l,o;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(o=null==(l=e.menuProps)?void 0:l.class)?o:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=()=>X(Y)),r(y,{ref:B.value,consistentMenuWidth:e.consistentMenuWidth,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:V.value,options:D.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:I,clearable:!0,filterable:!0,nodeProps:Z,menuProps:ee.value,renderTag:J,renderLabel:Q,onUpdateShow:N,onUpdateValue:z,onKeydown:G,onFocus:H.focus,onBlur:H.blur},l)}}});export{x as default};
@@ -1 +1 @@
1
- import{reactive as e,inject as o,createVNode as t,mergeProps as n,onBeforeUnmount as l}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as s}from"../../../../constants/index.js";import{useAutoFocus as d}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as u,getTitle as c,IhoTableRenderHelper as a,IhoTableUtils as p}from"../../../../utils/index.js";import f from"./editSelect.js";import{getDefaultValue as m,isConnectField as v,getArray as E}from"./selectUtils.js";import{getSelectOptions as g,selectOptionsMap as C}from"../hooks/useSelectOption.js";import{cloneDeep as h,isEqual as b}from"lodash-es";import{defineTablePlugin as w}from"../../../../hooks/useTablePlugin.js";function y(){const y="selectRendererPlugin",x=e(new Map);return w({name:y,vxe(e){e.interceptor.add("event.clearActived",u(r.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:l,$table:r}){var d;const u=o(s),a=g(u,l.field,n,r),p=m(n,e,a),f=i(p).join(","),v=e&&(!0===(E=e.variableHeight)||"1"===E||(null==(d=e.componentProps)?void 0:d.indexedText));var E;return[t("span",{title:c(l,f)},[v?i(p).reduce(((e,o)=>(null!=o&&e.push([o,";",t("br",null,null)]),e)),[]):f])]},renderEdit:a.createRenderEdit((({fieldItem:e,emitFormClick:l,row:i,column:r,$rowIndex:d,$table:u})=>{const c=o(s),a=g(c,r.field,i,u);return[t(f,n({queryOptions:e.queryOptions},e.componentProps,{options:a,column:r,row:i,"row-index":d,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,onClick:l}),null)]}))})},apply(e){async function o(e,o={}){var t,n,l;const i=null==(t=e.editRender)?void 0:t.props;if(!i)return[];let r=E(i.options)||E(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const t={column:e,isFullData:!0,...o};r=await(null==(l=i.queryOptions)?void 0:l.call(i,t))}catch(e){console.log(`获取${i.field}_options错误`)}return r}d(e).bindAutoFocusConfig(y,r.SELECT,".n-base-selection-input .n-base-selection-tags"),e.fieldHooks.fieldList.tap(y,((e,{uuid:t})=>{if(t){C.get(t)||C.set(t,{}),x.set(t,h(e));const n=C.get(t);e.forEach((async t=>{var l;const i=null==(l=t.editRender)?void 0:l.props;t.field&&i&&"SELECT"===p.getCellType(i)&&(n[t.field]||v(e,t.field)||(n[t.field]=[],n[t.field]=await o(t)))}))}return e})),e.dataHooks.data.tap(y,((e,{uuid:t},n)=>{if(!t)return;const l=x.get(t);if(!l||!l.length)return;const i=C.get(t);l.forEach((async t=>{var n;const r=null==(n=t.editRender)?void 0:n.props;if(t.field&&r&&"SELECT"===p.getCellType(r)&&(null==r?void 0:r.connectField)){const n=r.connectField.split(","),s=e[r.columnName];n.forEach((async n=>{const d=null==l?void 0:l.find((e=>e.field===n));if(!d)return;const u=s?`${n}__${r.columnName}-${s}`:n;i[u]||(i[u]=[],i[u]=await o(d,{row:e,connectColumn:t}))}))}}))})),e.setupHooks.setup.tap(y,(e=>{l((()=>{var o;const t=null==(o=e.value)?void 0:o.uuid;t&&(C.delete(t),x.delete(t))}))})),e.eventHooks.onCellDblclick.tap(y,(({$table:e},o,{emits:t})=>{var n;const{column:l,row:i}=e.reactData.editStore.actived;if(!l||!i)return;const s=null==(n=l.editRender)?void 0:n.props,{cellDblclickSelectable:d=!1,multiple:u=!1,valueField:c="value"}=s.componentProps||{};if(!d||!function(e){return e&&p.getCellType(e)===r.SELECT}(s))return;const a=o.uuid&&g(o.uuid,l.field,i,e);if(1!==(null==a?void 0:a.length))return;const f=u?[a[0][c]]:a[0][c],m=i[l.field];e.clearEdit(),b(f,m)||(i[l.field]=f,t("formChange",{column:l,row:i,oldValue:m,value:f,index:e.getRowIndex(i),$table:e,option:a[0]}))}))}})}export{y as selectRendererPlugin};
1
+ import{reactive as e,inject as o,createVNode as t,mergeProps as l,onBeforeUnmount as n}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as s}from"../../../../constants/index.js";import{useAutoFocus as d}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as u,getTitle as a,IhoTableRenderHelper as c,IhoTableUtils as p}from"../../../../utils/index.js";import f from"./editSelect.js";import{getDefaultValue as m,isConnectField as v,getArray as w}from"./selectUtils.js";import{getSelectOptions as C,selectOptionsMap as E}from"../hooks/useSelectOption.js";import{cloneDeep as g,isEqual as y}from"lodash-es";import{defineTablePlugin as h}from"../../../../hooks/useTablePlugin.js";function b(){const b="selectRendererPlugin",x=e(new Map);function k(e){return!0===e||"1"===e}return h({name:b,vxe(e){e.interceptor.add("event.clearActived",u(r.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(r.SELECT,{renderCell({props:e},{row:l,column:n,$table:r}){var d;const u=o(s),c=C(u,n.field,l,r),p=m(l,e,c),f=i(p).join(","),v=e&&(k(e.variableHeight)||(null==(d=e.componentProps)?void 0:d.indexedText));return[t("span",{title:a(n,f)},[v?i(p).reduce(((e,o)=>(null!=o&&e.push([o,";",t("br",null,null)]),e)),[]):f])]},renderEdit:c.createRenderEdit((({fieldItem:e,emitFormClick:n,row:i,column:r,$rowIndex:d,$table:u})=>{var a,c,p,m;const v=o(s),w=C(v,r.field,i,u),E=k(null!=(c=null==(a=e.componentProps)?void 0:a.allowModify)?c:e.allowModify),g=k(null!=(m=null==(p=e.componentProps)?void 0:p.allowCreate)?m:e.allowCreate)||E;return[t(f,l({queryOptions:e.queryOptions},e.componentProps,{options:w,column:r,row:i,"row-index":d,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,allowModify:E,allowCreate:g,onClick:n}),null)]}))})},apply(e){async function o(e,o={}){var t,l,n;const i=null==(t=e.editRender)?void 0:t.props;if(!i)return[];let r=w(i.options)||w(null==(l=i.componentProps)?void 0:l.options)||[];if(i.queryOptions)try{const t={column:e,isFullData:!0,...o};r=await(null==(n=i.queryOptions)?void 0:n.call(i,t))}catch(e){console.log(`获取${i.field}_options错误`)}return r}d(e).bindAutoFocusConfig(b,r.SELECT,".n-base-selection-input,.n-base-selection-tags"),e.fieldHooks.fieldList.tap(b,((e,{uuid:t})=>{if(t){E.get(t)||E.set(t,{}),x.set(t,g(e));const l=E.get(t);e.forEach((async t=>{var n;const i=null==(n=t.editRender)?void 0:n.props;t.field&&i&&"SELECT"===p.getCellType(i)&&(l[t.field]||v(e,t.field)||(l[t.field]=[],l[t.field]=await o(t)))}))}return e})),e.dataHooks.data.tap(b,((e,{uuid:t},l)=>{if(!t)return;const n=x.get(t);if(!n||!n.length)return;const i=E.get(t);n.forEach((async t=>{var l;const r=null==(l=t.editRender)?void 0:l.props;if(t.field&&r&&"SELECT"===p.getCellType(r)&&(null==r?void 0:r.connectField)){const l=r.connectField.split(","),s=e[r.columnName];l.forEach((async l=>{const d=null==n?void 0:n.find((e=>e.field===l));if(!d)return;const u=s?`${l}__${r.columnName}-${s}`:l;i[u]||(i[u]=[],i[u]=await o(d,{row:e,connectColumn:t}))}))}}))})),e.setupHooks.setup.tap(b,(e=>{n((()=>{var o;const t=null==(o=e.value)?void 0:o.uuid;t&&(E.delete(t),x.delete(t))}))})),e.eventHooks.onCellDblclick.tap(b,(({$table:e},o,{emits:t})=>{var l;const{column:n,row:i}=e.reactData.editStore.actived;if(!n||!i)return;const s=null==(l=n.editRender)?void 0:l.props,{cellDblclickSelectable:d=!1,multiple:u=!1,valueField:a="value"}=s.componentProps||{};if(!d||!function(e){return e&&p.getCellType(e)===r.SELECT}(s))return;const c=o.uuid&&C(o.uuid,n.field,i,e);if(1!==(null==c?void 0:c.length))return;const f=u?[c[0][a]]:c[0][a],m=i[n.field];e.clearEdit(),y(f,m)||(i[n.field]=f,t("formChange",{column:n,row:i,oldValue:m,value:f,index:e.getRowIndex(i),$table:e,option:c[0]}))}))}})}export{b as selectRendererPlugin};
@@ -1,4 +1,4 @@
1
- import { AnyObject, Func } from '../../../../../../../../es/shared/types';
1
+ import { AnyObject, AnyFn } from '../../../../../../../../es/shared/types';
2
2
  import { CSSProperties, PropType } from 'vue';
3
3
  import { VxeTableConstructor, VxeTableDefines, VxeTableMethods, VxeTablePrivateMethods } from 'vxe-table';
4
4
  declare const _default: import("vue").DefineComponent<{
@@ -54,7 +54,7 @@ declare const _default: import("vue").DefineComponent<{
54
54
  tableHandler: import("../../../../types").IhoTableHandler;
55
55
  $table: VxeTableConstructor & VxeTablePrivateMethods & VxeTableMethods;
56
56
  popoverRef: import("vue").Ref<{
57
- syncPosition: Func;
57
+ syncPosition: AnyFn;
58
58
  } | undefined>;
59
59
  editContent: import("vue").Ref<unknown>;
60
60
  setEditContent: (value: unknown) => void;