cnhis-design-vue 3.2.9-beta.9 → 3.2.9-release.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/base-search/index.d.ts +2 -0
- package/es/components/base-search/src/index.vue.d.ts +2 -0
- package/es/components/button-print/index.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +6 -5
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +87 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +87 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +87 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +87 -0
- package/es/components/date-picker/index.d.ts +29 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +30 -1
- 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/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/field-set/index.d.ts +8 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +90 -7
- package/es/components/field-set/src/FieldColor.vue2.js +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +32 -7
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +74 -31
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue.d.ts +8 -1
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/TableStyle.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +29 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +58 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +29 -0
- package/es/components/field-set/src/components/table-row.vue.d.ts +29 -2
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +4 -3
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/iho-chat/index.d.ts +316 -6
- package/es/components/iho-chat/src/Index.vue.d.ts +316 -6
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +121 -1
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +160 -2
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +122 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +29 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +6 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +1 -3
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +2 -1
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/hooks/useState.d.ts +6 -0
- package/es/components/iho-chat/src/hooks/useState.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +3 -1
- package/es/components/iho-chat/src/types/index.js +1 -1
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +29 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +29 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/quick-search/index.d.ts +3 -0
- package/es/components/quick-search/src/index.vue.d.ts +3 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +58 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +116 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +116 -0
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +2 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +76 -76
@@ -246,6 +246,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
246
246
|
type: PropType<string | false | HTMLElement>;
|
247
247
|
default: string;
|
248
248
|
};
|
249
|
+
holidays: {
|
250
|
+
type: PropType<Date[]>;
|
251
|
+
default: () => never[];
|
252
|
+
};
|
253
|
+
type: {
|
254
|
+
type: StringConstructor;
|
255
|
+
default: string;
|
256
|
+
};
|
249
257
|
}, {
|
250
258
|
attrs: {
|
251
259
|
[x: string]: unknown;
|
@@ -270,6 +278,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
270
278
|
type: PropType<string | false | HTMLElement>;
|
271
279
|
default: string;
|
272
280
|
};
|
281
|
+
holidays: {
|
282
|
+
type: PropType<Date[]>;
|
283
|
+
default: () => never[];
|
284
|
+
};
|
285
|
+
type: {
|
286
|
+
type: StringConstructor;
|
287
|
+
default: string;
|
288
|
+
};
|
273
289
|
}>> & {
|
274
290
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
275
291
|
}>>;
|
@@ -286,6 +302,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
286
302
|
blur: () => any;
|
287
303
|
handleConfirm: (target: HTMLInputElement) => void;
|
288
304
|
onUpdateShow: (show: boolean) => Promise<void>;
|
305
|
+
watchers: import("../../../../shared/types").AnyFn[];
|
306
|
+
stopWatcher: () => void;
|
307
|
+
setHoliday: (show: boolean) => Promise<void>;
|
289
308
|
onConfirm: (...args: any[]) => Promise<void>;
|
290
309
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
291
310
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -310,11 +329,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
310
329
|
type: PropType<string | false | HTMLElement>;
|
311
330
|
default: string;
|
312
331
|
};
|
332
|
+
holidays: {
|
333
|
+
type: PropType<Date[]>;
|
334
|
+
default: () => never[];
|
335
|
+
};
|
336
|
+
type: {
|
337
|
+
type: StringConstructor;
|
338
|
+
default: string;
|
339
|
+
};
|
313
340
|
}>> & {
|
314
341
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
315
342
|
}, {
|
343
|
+
type: string;
|
316
344
|
updateUnchangedValue: boolean;
|
317
345
|
to: string | false | HTMLElement;
|
346
|
+
holidays: Date[];
|
318
347
|
}>>;
|
319
348
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
320
349
|
data: {
|
@@ -528,6 +557,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
528
557
|
type: PropType<string | false | HTMLElement>;
|
529
558
|
default: string;
|
530
559
|
};
|
560
|
+
holidays: {
|
561
|
+
type: PropType<Date[]>;
|
562
|
+
default: () => never[];
|
563
|
+
};
|
564
|
+
type: {
|
565
|
+
type: StringConstructor;
|
566
|
+
default: string;
|
567
|
+
};
|
531
568
|
}, {
|
532
569
|
attrs: {
|
533
570
|
[x: string]: unknown;
|
@@ -552,6 +589,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
552
589
|
type: PropType<string | false | HTMLElement>;
|
553
590
|
default: string;
|
554
591
|
};
|
592
|
+
holidays: {
|
593
|
+
type: PropType<Date[]>;
|
594
|
+
default: () => never[];
|
595
|
+
};
|
596
|
+
type: {
|
597
|
+
type: StringConstructor;
|
598
|
+
default: string;
|
599
|
+
};
|
555
600
|
}>> & {
|
556
601
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
557
602
|
}>>;
|
@@ -568,6 +613,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
568
613
|
blur: () => any;
|
569
614
|
handleConfirm: (target: HTMLInputElement) => void;
|
570
615
|
onUpdateShow: (show: boolean) => Promise<void>;
|
616
|
+
watchers: import("../../../../shared/types").AnyFn[];
|
617
|
+
stopWatcher: () => void;
|
618
|
+
setHoliday: (show: boolean) => Promise<void>;
|
571
619
|
onConfirm: (...args: any[]) => Promise<void>;
|
572
620
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
573
621
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -592,11 +640,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
592
640
|
type: PropType<string | false | HTMLElement>;
|
593
641
|
default: string;
|
594
642
|
};
|
643
|
+
holidays: {
|
644
|
+
type: PropType<Date[]>;
|
645
|
+
default: () => never[];
|
646
|
+
};
|
647
|
+
type: {
|
648
|
+
type: StringConstructor;
|
649
|
+
default: string;
|
650
|
+
};
|
595
651
|
}>> & {
|
596
652
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
597
653
|
}, {
|
654
|
+
type: string;
|
598
655
|
updateUnchangedValue: boolean;
|
599
656
|
to: string | false | HTMLElement;
|
657
|
+
holidays: Date[];
|
600
658
|
}>>;
|
601
659
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
602
660
|
data: {
|
@@ -204,6 +204,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
204
204
|
type: PropType<string | false | HTMLElement>;
|
205
205
|
default: string;
|
206
206
|
};
|
207
|
+
holidays: {
|
208
|
+
type: PropType<Date[]>;
|
209
|
+
default: () => never[];
|
210
|
+
};
|
211
|
+
type: {
|
212
|
+
type: StringConstructor;
|
213
|
+
default: string;
|
214
|
+
};
|
207
215
|
}, {
|
208
216
|
attrs: {
|
209
217
|
[x: string]: unknown;
|
@@ -228,6 +236,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
228
236
|
type: PropType<string | false | HTMLElement>;
|
229
237
|
default: string;
|
230
238
|
};
|
239
|
+
holidays: {
|
240
|
+
type: PropType<Date[]>;
|
241
|
+
default: () => never[];
|
242
|
+
};
|
243
|
+
type: {
|
244
|
+
type: StringConstructor;
|
245
|
+
default: string;
|
246
|
+
};
|
231
247
|
}>> & {
|
232
248
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
233
249
|
}>>;
|
@@ -244,6 +260,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
244
260
|
blur: () => any;
|
245
261
|
handleConfirm: (target: HTMLInputElement) => void;
|
246
262
|
onUpdateShow: (show: boolean) => Promise<void>;
|
263
|
+
watchers: import("../../../../shared/types").AnyFn[];
|
264
|
+
stopWatcher: () => void;
|
265
|
+
setHoliday: (show: boolean) => Promise<void>;
|
247
266
|
onConfirm: (...args: any[]) => Promise<void>;
|
248
267
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
249
268
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -268,11 +287,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
268
287
|
type: PropType<string | false | HTMLElement>;
|
269
288
|
default: string;
|
270
289
|
};
|
290
|
+
holidays: {
|
291
|
+
type: PropType<Date[]>;
|
292
|
+
default: () => never[];
|
293
|
+
};
|
294
|
+
type: {
|
295
|
+
type: StringConstructor;
|
296
|
+
default: string;
|
297
|
+
};
|
271
298
|
}>> & {
|
272
299
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
273
300
|
}, {
|
301
|
+
type: string;
|
274
302
|
updateUnchangedValue: boolean;
|
275
303
|
to: string | false | HTMLElement;
|
304
|
+
holidays: Date[];
|
276
305
|
}>>;
|
277
306
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
278
307
|
data: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PropType, CSSProperties } from 'vue';
|
1
|
+
import { PropType, CSSProperties, VNodeChild } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
3
|
import { FieldSetColumnItem } from '../../../../components/field-set';
|
4
4
|
import { setStyle, setColorInfo } from '../utils';
|
@@ -86,6 +86,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
86
86
|
type: PropType<AnyObject[]>;
|
87
87
|
default: () => never[];
|
88
88
|
};
|
89
|
+
primaryKey: {
|
90
|
+
type: StringConstructor;
|
91
|
+
default: string;
|
92
|
+
};
|
93
|
+
titleRender: {
|
94
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
95
|
+
};
|
89
96
|
}, {
|
90
97
|
fixedWayOptions: {
|
91
98
|
label: string;
|
@@ -184,6 +191,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
184
191
|
type: PropType<AnyObject[]>;
|
185
192
|
default: () => never[];
|
186
193
|
};
|
194
|
+
primaryKey: {
|
195
|
+
type: StringConstructor;
|
196
|
+
default: string;
|
197
|
+
};
|
198
|
+
titleRender: {
|
199
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
200
|
+
};
|
187
201
|
}>> & {
|
188
202
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
189
203
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -197,10 +211,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
197
211
|
isMultiple: (field: string) => boolean;
|
198
212
|
isRender: (field: string) => boolean;
|
199
213
|
isShow: (field: string) => any;
|
214
|
+
showRelation: (field: string) => boolean;
|
200
215
|
getSortPriorityOptions: () => {
|
201
216
|
label: string;
|
202
217
|
value: number;
|
203
218
|
}[];
|
219
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
204
220
|
selectProps: (field: string) => {
|
205
221
|
valueField: string;
|
206
222
|
labelField: string;
|
@@ -218,12 +234,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
218
234
|
NIcon: any;
|
219
235
|
NColorPicker: any;
|
220
236
|
NPopconfirm: any;
|
237
|
+
NPopover: any;
|
238
|
+
NSpace: any;
|
221
239
|
setStyle: typeof setStyle;
|
222
240
|
setColorInfo: typeof setColorInfo;
|
223
241
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
224
242
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
225
243
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
226
244
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
245
|
+
CaretDownOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
227
246
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
228
247
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
229
248
|
element: {
|
@@ -309,6 +328,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
309
328
|
type: PropType<AnyObject[]>;
|
310
329
|
default: () => never[];
|
311
330
|
};
|
331
|
+
primaryKey: {
|
332
|
+
type: StringConstructor;
|
333
|
+
default: string;
|
334
|
+
};
|
335
|
+
titleRender: {
|
336
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
337
|
+
};
|
312
338
|
}>> & {
|
313
339
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
314
340
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -331,6 +357,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
331
357
|
requiredDisable: boolean;
|
332
358
|
hide: boolean;
|
333
359
|
}>[];
|
360
|
+
primaryKey: string;
|
334
361
|
index: number;
|
335
362
|
columns: FieldSetColumnItem[];
|
336
363
|
element: Partial<{
|
@@ -353,9 +380,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
353
380
|
}>;
|
354
381
|
developMode: boolean;
|
355
382
|
draggable: boolean;
|
383
|
+
isHighlightRow: boolean;
|
356
384
|
idx: number;
|
357
385
|
isHighlight: boolean;
|
358
|
-
isHighlightRow: boolean;
|
359
386
|
isFieldSet: boolean;
|
360
387
|
fieldDescribeMode: "column" | "tooltip";
|
361
388
|
hideExpressionOption: AnyObject[];
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,openBlock as
|
1
|
+
import{defineComponent as e,openBlock as t,createElementBlock as l,Fragment as i,renderList as n,normalizeStyle as r,unref as a,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as c,toDisplayString as f,resolveDynamicComponent as p,normalizeClass as m,withDirectives as v,vShow as y,mergeProps as h,createTextVNode as g}from"vue";import{NTooltip as b,NIcon as k,NCheckbox as x,NPopover as E,NSpace as S,NSelect as D,NColorPicker as w,NInput as T,NInputNumber as O,NPopconfirm as R}from"naive-ui";import{setStyle as M,setColorInfo as N,isShowExplicitRequired as U,isDisable as P}from"../utils/index.js";import{ReorderTwoOutline as _,HelpCircleOutline as j,CaretDownOutline as A,CreateOutline as C,TrashOutline as F}from"@vicons/ionicons5";import{isFunction as L,isArray as H,range as I}from"lodash-es";import{COLOR_MAP as B}from"../constants/index.js";import{WIDGET_TYPE as V,SELECT_MAP as W,WIDGET_MAP as q,SELECT_TYPE as K,SELECT_DEFAULT_MAP as $,DATE_MAP as z,DATETIME_MAP as G}from"../constants/filter.js";const J={class:"row"},Q=["title"],X=c("span",null,"拖拽调整顺序",-1),Y={key:0};var Z=e({__name:"table-row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},isFieldSet:{type:Boolean,default:!1},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionOption:{type:Array,default:()=>[]},primaryKey:{type:String,default:"id"},titleRender:{type:Function}},emits:["updateChecked","edit"],setup(e,{emit:Z}){const ee=e,te=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],le=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],ie=[{label:"字体",value:"font"},{label:"背景",value:"background"}],ne=Object.entries(B).map((([e])=>e));function re(){ee.data.splice(ee.index,1)}function ae(){Z("edit",ee.element)}function oe(){var e;return ee.element.feildDescribe||(null==(e=ee.element.settingObj)?void 0:e.fieldDescDev)}function de(e){return"seq"===e?ee.idx:"optionType"===e?ee.element[e]&&ee.element.type===V.SELECT?W[ee.element[e]]:"":"type"===e?q[ee.element[e]]:ee.element[e]}function ue(e){if("defaultValue"===e){const{optionType:e}=ee.element;return e===K.SELECT_MULTIPLE}return!1}function se(e){if("0001"==ee.element.id&&"fixedWay"!=e)return!1;const{isConfiguredHeaderFilter:t}=ee.element;return"isShowHeaderFilter"===e?!!t:!(["explicitRequired","defaultValue"].includes(e)&&![V.DATE,V.DATETIME,V.SELECT].includes(ee.element.type)||["editable"].includes(e)&&ee.element[`${e}Hide`])}function ce(e){return["explicitRequired","defaultValue"].includes(e)?U(ee.element):!["isSum","isAvg"].includes(e)||"NUMBER"===ee.element.fieldType}function fe(e){const{relation:t}=ee.element;return"isSearch"===e&&H(null==t?void 0:t.fieldList)&&t.fieldList.length>0}function pe(e){if("hideExpression"===e)return"PASSWORD"===ee.element.attrType?"密码无需设置":ee.element.name===ee.primaryKey||ee.element.columnName===ee.primaryKey?"主键不可设置":ee.element.disableDesensitization||ee.element[`${e}Disabled`]?"不支持脱敏设置":void 0}function me(e){const t={valueField:"value",labelField:"label"};return"hideExpression"===e&&(t.valueField="ruleId",t.labelField="name"),t}function ve(e){var t;switch(e.field){case"fixedWay":return te;case"sortDirection":return le;case"sortPriority":return function(){const e=I(1,ee.data.length+1).map((e=>({label:e.toString(),value:e}))),t=ee.data.filter((e=>!!e.sortPriority&&e.uuid!==ee.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!t.includes(e.value)))}();case"colorScope":return ie;case"hideExpression":return null==(t=ee.hideExpressionOption)?void 0:t.map((e=>({...e,ruleId:`ruleId#${e.code}`})));case"defaultValue":{const{type:e,optionInfo:t}=ee.element;return e===V.SELECT?H(null==t?void 0:t.list)&&t.list.length>0?t.list.map((e=>({...e,label:e.name}))):Object.entries($).map((([e,t])=>({value:e,label:t}))):e===V.DATE?Object.entries(z).map((([e,t])=>({value:e,label:t}))):e===V.DATETIME?Object.entries(G).map((([e,t])=>({value:e,label:t}))):[]}default:return[]}}function ye(e){var t;if(1==ee.element.defaultMark||"color"===e.type&&ee.isHighlightRow)return!0;if("checkbox"===e.type){if("show"===e.field&&e.fieldShowMaxValue)return!ee.element[e.field]&&(null==(t=ee.data.filter((t=>t[e.field])))?void 0:t.length)===e.fieldShowMaxValue;if(["isSearch","isSum","isAvg"].includes(e.field)){if(Reflect.has(ee.element,"isMerge"))return 1==ee.element.isMerge;if("isSearch"===e.field&&Reflect.has(ee.element,"notParticipatingSearch"))return 1==ee.element.notParticipatingSearch}return P(ee.element,e.field)}if("sortPriority"===e.field){const{sortDirection:e}=ee.element;return!e||"NONE"===e}return P(ee.element,e.field)}function he(e){return["title","result"].includes(e.field)&&ee.element.style||{}}return(U,P)=>(t(),l("div",J,[(t(!0),l(i,null,n(e.columns,((U,H)=>{return t(),l(i,{key:H},[U.isShow?(t(),l("span",{key:0,class:"table-cell",title:e.element[U.field],style:r(a(M)(U,H,e.columnWidthProps))},["text"===U.type?(t(),l(i,{key:0},[0===H?(t(),l(i,{key:0},[!e.isFieldSet||e.draggable&&e.isFieldSet?(t(),o(a(b),{key:0,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(_)},null,8,["component"])])),default:d((()=>[X])),_:1})):s("v-if",!0),(I=U.field,"title"===I&&("tooltip"===ee.fieldDescribeMode&&ee.element.feildDescribe||ee.developMode&&(null==(B=ee.element.settingObj)?void 0:B.fieldDescDev))?(t(),o(a(b),{key:1,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(j)},null,8,["component"])])),default:d((()=>[c("span",null,f(oe()),1)])),_:1})):s("v-if",!0)),a(L)(e.titleRender)?(t(),o(p((()=>e.titleRender(e.element))),{key:2})):s("v-if",!0)],64)):s("v-if",!0),0===H&&a(L)(e.titleRender)?s("v-if",!0):(t(),l("span",{key:1,class:m([e.isHighlight&&"title"===U.field?"highlight":""]),style:r(he(U))},f(de(U.field)),7))],64)):s("v-if",!0),"checkbox"===U.type&&se(U.field)?(t(),l(i,{key:1},[v(u(a(x),{disabled:ye(U),checked:e.element[U.field],"onUpdate:checked":[t=>e.element[U.field]=t,e=>function(e,t){Z("updateChecked",{checked:e,column:t})}(e,U)]},null,8,["disabled","checked","onUpdate:checked"]),[[y,ce(U.field)]]),fe(U.field)?(t(),o(a(E),{key:0,placement:"right-start","show-arrow":!1},{trigger:d((()=>[u(a(k),{style:{"margin-left":"5px",top:"2px"},component:a(A)},null,8,["component"])])),default:d((()=>[c("div",null,[c("span",null,f(e.element.relation.tableName),1),u(a(S),{"wrap-item":!1,vertical:""},{default:d((()=>[(t(!0),l(i,null,n(e.element.relation.fieldList,(e=>v((t(),o(a(x),{key:e.id,checked:e.checked,"onUpdate:checked":t=>e.checked=t,label:e.title},null,8,["checked","onUpdate:checked","label"])),[[y,"0001"!==e.sid]]))),128))])),_:1})])])),_:1})):s("v-if",!0)],64)):s("v-if",!0),"select"===U.type&&se(U.field)?(t(),l(i,{key:2},[pe(U.field)?(t(),l("span",Y,f(pe(U.field)),1)):v((t(),o(a(D),h({key:1},me(U.field),{clearable:"",multiple:ue(U.field),disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,e=>function(e,t){"sortDirection"!==t.field||"NONE"!==e&&e||(ee.element.sortPriority=null),"colorScope"===t.field&&N(ee.element)}(e,U)],options:ve(U)}),null,16,["multiple","disabled","value","onUpdate:value","options"])),[[y,ce(U.field)]])],64)):s("v-if",!0),"color"===U.type?(t(),o(a(w),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,P[0]||(P[0]=t=>a(N)(e.element))],"show-preview":"",modes:["hex"],swatches:a(ne)},null,8,["disabled","value","onUpdate:value","swatches"])):s("v-if",!0),"input"===U.type?v((t(),o(a(T),{key:4,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===U.type?(t(),o(a(O),{key:5,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t},null,8,["value","onUpdate:value"])):s("v-if",!0),"custom"===U.type&&a(L)(U.contentRender)?(t(),o(p((()=>U.contentRender(U,e.element))),{key:6})):s("v-if",!0),"custom"===U.type&&"opt"===U.field&&1!=e.element.defaultMark?(t(),l(i,{key:7},[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(C),onClick:ae},null,8,["component"])])),default:d((()=>[g(" 编辑 ")])),_:1}),u(a(R),{onPositiveClick:re},{trigger:d((()=>[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(F)},null,8,["component"])])),default:d((()=>[g(" 删除 ")])),_:1})])),default:d((()=>[g(" 是否确认删除? ")])),_:1})],64)):s("v-if",!0)],12,Q)):s("v-if",!0)],64);var I,B})),128))]))}});export{Z as default};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AnyObject } from '../../../../shared/types';
|
2
|
-
import {
|
2
|
+
import { VNodeChild } from 'vue';
|
3
3
|
export type FieldSetItem = Partial<{
|
4
4
|
id: string;
|
5
5
|
name: string;
|
@@ -18,7 +18,7 @@ export type FieldSetItem = Partial<{
|
|
18
18
|
hide: boolean;
|
19
19
|
[key: string]: any;
|
20
20
|
}>;
|
21
|
-
export type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'sortPriority' | 'fixedWay' | 'alias' | 'columnWidth' | 'hideExpression';
|
21
|
+
export type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'sortPriority' | 'fixedWay' | 'alias' | 'columnWidth' | 'hideExpression' | 'isSearch' | 'isSum' | 'isAvg';
|
22
22
|
export type FieldSetColumnItem = {
|
23
23
|
title: string;
|
24
24
|
type: 'text' | 'checkbox' | 'select' | 'input' | 'inputNumber' | 'color' | 'custom';
|
@@ -27,7 +27,8 @@ export type FieldSetColumnItem = {
|
|
27
27
|
disabledAll?: boolean;
|
28
28
|
isHeadCheckHide?: boolean;
|
29
29
|
isShow?: boolean;
|
30
|
-
contentRender?: (column: AnyObject, row: AnyObject) =>
|
30
|
+
contentRender?: (column: AnyObject, row: AnyObject) => VNodeChild;
|
31
|
+
hide?: boolean;
|
31
32
|
[key: string]: any;
|
32
33
|
};
|
33
34
|
export type FieldSetTab = 'field' | 'fieldColor' | 'highlightRow' | 'tableStyle' | 'fieldFilter';
|
@@ -1 +1 @@
|
|
1
|
-
import{isArray as e,isObject as t}from"lodash-es";import{IhoTableRowGroupSequence as
|
1
|
+
import{isArray as e,isObject as t}from"lodash-es";import{IhoTableRowGroupSequence as i}from"../../../iho-table/src/constants/index.js";import{COLOR_MAP as n}from"../constants/index.js";import{WIDGET_TYPE as o}from"../constants/filter.js";function r(e,t,i){let n=90;const o={};switch(e.type){case"text":0===t&&["title","name"].includes(e.field)&&(n=120,Object.assign(o,{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"})),"seq"===e.field&&(n=40);break;case"checkbox":n=60;break;case"select":n=80;break;case"input":n=100}if(i){const t=Object.keys(i);t.length>0&&t.includes(e.field)&&i[e.field]&&(n=i[e.field])}return Object.assign(o,{flex:`1 0 ${n}px`,minWidth:`${n}px`}),o}function s(e,t){return["editable","required","show","sortDirection","fixedWay","isSearch","isSum","isAvg"].includes(t)&&(e[`${t}Disable`]||e[`${t}Disabled`])||["sort"].includes(t)&&(1==e.notParticipatingSort||e.sortDisabled)}function c(n,o,r=(e=>e.name)){const s=o.map((e=>r(e)));return i.some((i=>{const o=n[i];if(!e(o))return!0;o.forEach((i=>{if(!e(i.list)||!i.list.length)return;const n=[];let o=null;i.list.forEach(((e,r)=>{const c=function(e,i,n){return i.findIndex((i=>i!==n&&(t(i)?i.fieldName:i)===e))}(e,s,o);~c&&(n.push(s[c]),0===r?s.splice(c,1,o={fieldName:i.title,children:n}):s.splice(c,1))}))}))})),s}function l(e){return void 0===e.draggable||e.draggable}function a(t){return e(t)?!t.some((e=>!e.draggable)):t.draggable}function f(e){e.style="font"===e.colorScope?{color:e.color}:{background:e.color,color:"#fff"},e.result=n[e.color]}function d(e){const{isShowSearch:t,filterExplicit:i,type:n}=e;return t&&i&&[o.DATE,o.DATETIME,o.SELECT].includes(n)}export{c as getGroupTree,s as isDisable,l as isDraggable,a as isDraggableItem,d as isShowExplicitRequired,f as setColorInfo,r as setStyle};
|
@@ -1 +1 @@
|
|
1
|
-
.c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{display:flex;flex-flow:column nowrap;height:
|
1
|
+
.c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{box-sizing:border-box;display:flex;flex-flow:column nowrap;height:var(--main-height)!important;width:100%}.c-field-set .main-wrapper__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .main-wrapper .item{background:#fff}.c-field-set .main-wrapper .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .main-wrapper .item:focus{background-color:#f2f2f2}.c-field-set .main-wrapper .item.disabled{cursor:not-allowed}.c-field-set .main-wrapper .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:8px 0}.c-field-set .main-wrapper .table-cell{word-wrap:break-word;box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .main-wrapper .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set .main-wrapper .table-cell .c-field-set__color-picker{display:block}.c-field-set .main-wrapper__table{box-sizing:border-box;display:flex;flex:1;flex-flow:column nowrap;min-height:0;overflow:auto;width:100%}.c-field-set .main-wrapper__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;flex:0 0 52px;position:sticky;top:0;z-index:1}.c-field-set .main-wrapper__table-header .n-checkbox.n-checkbox--disabled .n-checkbox__label{color:var(--n-text-color)}.c-field-set .main-wrapper__table-header .table-cell{align-items:center;background:#f2f2f4;display:flex;height:100%}.c-field-set .main-wrapper__table-body{flex:1}.c-field-set .main-wrapper__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}.c-field-set .main-wrapper .set-item{padding:10px 0}.c-field-set .main-wrapper .set-item.table-item{border-top:1px solid #e8e8e8;width:50%}.c-field-set .main-wrapper .set-item.table-item h4{font-size:16px;font-weight:400;margin-bottom:12px}.c-field-set .main-wrapper .set-item.table-item .table-style{background:#e5e5e5;border:2px solid #cfcfcf;border-radius:4px;cursor:pointer;margin-bottom:10px;padding:20px 0 0}.c-field-set .main-wrapper .set-item.table-item .table-style .table-bg{background:#fff;border-radius:5px;margin:0 20px 20px;padding:10px}.c-field-set .main-wrapper .set-item.table-item .table-style .table-bg img{width:100%}.c-field-set .main-wrapper .set-item.table-item .table-style__desc{align-items:center;background:#fff;display:flex;padding:10px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc .n-icon{color:var(--c-primary-color);font-size:20px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc .circle{border:1px solid #d5d5d5;border-radius:50%;display:inline-block;height:18px;width:18px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc span{margin-left:5px}.c-field-set .main-wrapper .set-item.table-item .table-style.active{background:#e2ebfa;border:2px solid var(--c-primary-color)}.c-field-set__color-block{display:inline-block;margin-left:20px;position:relative}.c-field-set__color-block:before{background-color:var(--color);border-radius:2px;content:"";height:14px;left:-20px;position:absolute;top:3px;width:14px}.c-field-set__space{width:100%}.c-field-set__space>div:first-child{width:80%}.c-field-set__space .filter-btn{color:var(--c-primary-color);cursor:pointer}.c-field-set__condition .opt-btn{cursor:pointer;display:inline-flex}.c-field-set__condition .condition-wrapper__item{align-items:center;display:flex;margin-top:10px}.c-field-set__condition .condition-wrapper__item .item-index{margin-right:10px}.c-field-set__condition .condition-wrapper__item>.n-date-picker,.c-field-set__condition .condition-wrapper__item>.n-input,.c-field-set__condition .condition-wrapper__item>.n-input-number,.c-field-set__condition .condition-wrapper__item>.n-select{margin-right:10px;width:20%}.c-field-set__condition .sql-expression-wrapper{margin-top:10px}
|
@@ -113,7 +113,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
113
113
|
type: BooleanConstructor;
|
114
114
|
};
|
115
115
|
wordSplitFilter: {};
|
116
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend")[], "update:value" | "postRecommend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
116
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend" | "patternChange")[], "update:value" | "postRecommend" | "patternChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
117
117
|
value: {
|
118
118
|
type: PropType<ArrayAble<string | number> | null>;
|
119
119
|
};
|
@@ -226,6 +226,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
226
226
|
}>> & {
|
227
227
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
228
228
|
onPostRecommend?: ((...args: any[]) => any) | undefined;
|
229
|
+
onPatternChange?: ((...args: any[]) => any) | undefined;
|
229
230
|
}, {
|
230
231
|
options: AnyObject[];
|
231
232
|
multiple: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as o,
|
1
|
+
import{defineComponent as e,computed as o,watch as t,inject as l,useAttrs as a,ref as r,createVNode as s,mergeProps as n,toRaw as u}from"vue";import{arrayed as i}from"../../../../../shared/utils/index.js";import{NSelect as p}from"naive-ui";import"@vueuse/core";import"date-fns";import{cloneDeep as m,isArray as d,isObject as c,omit as v,xor as y}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as f}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as h}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import"../../../../../shared/hooks/useScrollLoading.js";import{connect as b,mapProps as j}from"@formily/vue";import{useCommonInjection as S,useSelectOptionProps as g}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as C}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as F,InjectionFormUUID as B}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import{assignUpdateValue as w,assignClearBindVisited as A,createVisitedSetter as H}from"../../utils/schema.js";import"../../../index.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"./index.js";import"@vueuse/shared";import{useFormField as O}from"../../hooks/useFormField.js";import"@formily/reactive";import{useUrlConfigOptions as K,useAutographOptions as R,useRecommendOptions as x}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const V=b(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean},searchByValue:{type:Boolean},wordSplitFilter:{}},emits:["update:value","postRecommend","patternChange"],setup(e,{slots:b,emit:j}){const w=o({get:()=>e.value,async set(e){j("update:value",e),G(e)}}),{labelKey:A,valueKey:V,showKey:L,fetchData:P,searchContent:_,fullOptions:N,filterOptions:I,remoteOptions:W,loading:q}=e.urlConfig?K(e,w):R(e,w);t(_,(e=>{j("patternChange",{pattern:e,options:ue.value})}));const{modifyEvent:E,modifyAbleRef:z,getOptionsWithCreated:M}=f(e,{searchContent:_,labelKey:A,valueKey:V,valueRef:w,fullOptions:N}),{renderComplexOption:T,hasComplexOption:U}=k(e,w),{getRecommend:D,postRecommend:G,sortedOptions:J}=x(e,I,j,A,V),{field:Q,fieldKey:X}=O();l(F).setContext(X.value,(e=>({currentOption:m(function(e){const o=M(N.value);return d(e)?function(e){const t=o.reduce(((e,o)=>(e[o[V.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[V.value]===t)));var t}(e)),labelField:A.value,valueField:V.value})));const Y=async e=>(_.value=e,Promise.allSettled([P(e),D(e)])),{injectValueValidate:Z,injectValueWatchFromEmpty:$,injectValueBindKey:ee}=S();$(w,(()=>e.lazyRequest&&Y())),Z(w);const oe=ee(w),{menuProps:te,nodeProps:le}=g(),{renderTag:ae,renderLabel:re,renderSelectAll:se,titleRef:ne}=h(e,{labelKey:A,valueKey:V,valueRef:w,showKey:L,searchContent:_}),ue=o((()=>M(z.value?N.value:J.value))),ie=a(),pe=o((()=>{if(e.allowCreate||e.showCustomValue)return w.value;const o=e.multiple&&d(w.value);return N.value.find((e=>o?w.value.includes(e[V.value]):e[V.value]===w.value))?w.value:null})),me=r(!1);async function de(e){e&&await Y(),me.value=e}async function ce(e,o){await E.updateValue(e,o),W.value&&o&&i(o).forEach((e=>{if(!c(e))return;const o=e;o.created&&o.shouldSave&&W.value.push(v(u(o),["created","shouldSave"]))}))}const ve=l(B),{getSpan:ye}=C(),fe=H(Q,E.focus);function he(o){if(!e.multiple)return;const t=o?ue.value.map((e=>e[V.value])):[];y(t,e.value).length&&(w.value=t)}function be(o){let t=b;return e.multiple&&e.selectAll&&(t={action:()=>se(he),...b}),s(p,n({title:ne.value,key:oe.value,multiple:e.multiple,remote:!0,filterable:!0,loading:q.value,value:pe.value,onUpdateValue:ce,"menu-props":te,"node-props":le,labelField:A.value,valueField:V.value,options:ue.value,onSearch:Y,show:me.value,"onUpdate:show":de,onFocus:fe,onBlur:E.blur,renderLabel:re,renderTag:ae},o,ie),t)}return()=>{var e,o;if(!U.value)return be();const t=null!=(o=null==(e=Q.value.decoratorProps)?void 0:e.span)?o:6,l=ye(ve,Q.value.address);return s("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[be({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),N.value.map((e=>T({option:e,value:w.value,valueKey:V.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),j({dataSource:"options"},w,A));export{V as SELECT};
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as s}from"../utils/index.js";import{useFieldNormalize as l}from"./useFieldNormalize.js";import{traverseSchema as a,fieldKeyEscape as p,createLinebarId as c}from"../utils/schema.js";import{useFormValidator as d}from"./useFormValidator.js";import{transformDateFormat as m}from"../utils/business.js";function u(e,o){Object.assign(e["x-component-props"],{...i(o,["wordbook","autograph"])})}function f(e,o){Object.assign(e["x-component-props"],{...i(o,["urlConfig","wordbook"])})}function x(e){return"1"===e||!0===e}function _(n,_){const{createValidatorSchema:b}=d(),g=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==_?void 0:_.beforeSetValue,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=b(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},v=e=>{var o,t,n,s,l,a,p,c,d,m,_,h,b,v;const y=g(e);e.urlConfig?f(y,e):e.autograph&&u(y,e);const w=!!e.__multiple,C=x(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=x(null!=(s=null==(n=e.componentProps)?void 0:n.selectAll)?s:e.selectAll),A=x(null!=(a=null==(l=e.componentProps)?void 0:l.shouldSave)?a:e.save_free_entry),E=x(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(m=null==(d=e.componentProps)?void 0:d.showField)?m:e.show_key,k=null!=(h=null==(_=e.componentProps)?void 0:_.options)?h:e.option,N=null!=(v=r(e.multi_select_value))?v:null==(b=e.componentProps)?void 0:b.maxTagCount;return Object.assign(y["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:A,showField:j,maxTagCount:N,selectAll:O,...i(e,["lazyRequest","requestCache"])}),w&&(y.type="array"),y},y=e=>{var o,t;const n=g(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?f(n,e):e.autograph&&u(n,e),n},w=e=>{const t=g(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},C=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:"1"===e.is_not_fold,id:c(e.val_key),show:"0"!==e.is_show,remark:e.remark},"x-content":e.slots}),O=new Map([["LINEBAR",C],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=g(e);return Object.assign(o["x-component-props"],{...i(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=g(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=g(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:r(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",v],["REMOTE_SEARCH",v],["DATE",e=>{const o=g(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:m(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=g(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:m(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=g(e);return Object.assign(o["x-component-props"],{...i(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=g(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=g(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,minGroupNum:e.minGroupNum,showLabel:"1"!==e.hide_title,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",y],["CHECKBOX",y],["SWITCH",e=>{const o=g(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=g(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=g(e);Array.isArray(e.properties)&&s("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?N(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],i(e,["wrapperStyle","display"])),o}]]),A=e=>{if(e.suffixConfig||e.prefixConfig)return E(e);return(O.get(e.html_type)||w)(e)},E=o=>{if(!o.suffixConfig&&!o.prefixConfig)return A(o);const t=g(o),n=o.suffixConfig?e(o.suffixConfig):[],i=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"0"===e.is_show?"0":o.is_show}))),{...o,hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...n.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"0"===e.is_show?"0":o.is_show})))],r=i.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(t,{type:"void",name:p(i),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...t["x-decorator-props"],showFeedback:!1,suffixFields:i.map((e=>e.val_key))},properties:N(i)}),t},{FieldNormalizeWaterfallHook:j,FieldListNormalizeWaterfallHook:k}=l();function N(o,i={column:9999}){let r=null;const s=k.call(t(o),i).reduce(((e,o,s)=>{var a;const p=null==(a=(o=j.call(o,i)).validate)?void 0:a.obj_type;return p&&n&&n.collect(p,t(o)),"LINEBAR"===o.html_type?(e[c(o)]=l(C(o),s),r=e[c(o)].properties={}):r?r[c(o)]=l(A(o),s):(r=null,e[c(o)]=l(A(o),s)),e}),{});return i.linebarAutoHidden&&Object.values(s).forEach((e=>{"LINEBAR"===e["x-component"]&&h(e)})),a({properties:s,"x-root":!0},((e,o)=>{"INPUT_GROUP"===e["x-component"]&&h(e,!!o&&!o["x-root"])})),s;function l(e,o){return e["x-index"]=o,e["x-decorator-props"]={_index:o,...e["x-decorator-props"]},e}function c(o){if(o.suffixConfig||o.prefixConfig){const t=[...e(o.prefixConfig),o,...e(o.suffixConfig)].filter(Boolean);return p(t)}return o.val_key}}return{schemaAdaptor:N}}function h(e,o=!1){e["x-reactions"]?e["x-reactions"]=n(e["x-reactions"]):e["x-reactions"]=[];const t=Object.keys(e.properties||{}).map((t=>`${o?"*.":"."}${e.name}.${t}#selfDisplay`));e["x-reactions"].push({dependencies:t,fulfill:{state:{visible:"{{hasVisible($deps)}}"}}})}export{_ as useFieldListAdaptor};
|