yc-pro-components 0.0.24 → 0.0.25
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/check-card/index.d.ts +61 -61
- package/es/components/check-card/src/index.vue.d.ts +4 -4
- package/es/components/check-card-group/index.d.ts +43 -43
- package/es/components/check-card-group/src/index.vue.d.ts +3 -3
- package/es/components/date-picker/index.d.ts +10 -10
- package/es/components/date-picker/src/index.vue.d.ts +2 -2
- package/es/components/dialog/index.d.ts +26 -26
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +31 -31
- package/es/components/dialog-form/src/index.vue.d.ts +9 -9
- package/es/components/display-item/index.d.ts +41 -41
- package/es/components/display-item/src/index.vue.d.ts +22 -22
- package/es/components/drawer-form/index.d.ts +50 -50
- package/es/components/drawer-form/src/index.vue.d.ts +10 -10
- package/es/components/form/index.d.ts +64 -45
- package/es/components/form/src/form-content.vue.d.ts +24 -20
- package/es/components/form/src/form-content.vue2.mjs +106 -96
- package/es/components/form/src/index.vue.d.ts +20 -17
- package/es/components/form/src/index.vue2.mjs +5 -2
- package/es/components/form/src/type.d.ts +4 -0
- package/es/components/form-item/index.d.ts +42 -42
- package/es/components/form-item/src/index.vue.d.ts +12 -12
- package/es/components/form-item/src/index.vue2.mjs +22 -18
- package/es/components/header/index.d.ts +19 -19
- package/es/components/header/src/index.vue.d.ts +1 -1
- package/es/components/input-tag/index.d.ts +20 -20
- package/es/components/input-tag/src/index.vue.d.ts +8 -8
- package/es/components/layout/index.d.ts +30 -30
- package/es/components/layout/src/index.vue.d.ts +10 -10
- package/es/components/page/index.d.ts +587 -452
- package/es/components/page/src/index.vue.d.ts +199 -154
- package/es/components/pagination/index.d.ts +42 -42
- package/es/components/pagination/src/index.vue.d.ts +3 -3
- package/es/components/radio/index.d.ts +35 -35
- package/es/components/radio/src/index.vue.d.ts +27 -27
- package/es/components/render/index.d.ts +3 -3
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +218 -154
- package/es/components/search/src/index.vue.d.ts +68 -50
- package/es/components/search/src/index.vue2.mjs +3 -1
- package/es/components/search/src/type.d.ts +7 -0
- package/es/components/sidebar/index.d.ts +15 -15
- package/es/components/sidebar/src/index.vue.d.ts +5 -5
- package/es/components/steps-form/index.d.ts +23 -23
- package/es/components/steps-form/src/index.vue.d.ts +2 -2
- package/es/components/table/index.d.ts +54 -54
- package/es/components/table/src/index.vue.d.ts +18 -18
- package/es/components/table/src/table-column-drag-sort.vue.d.ts +18 -18
- package/es/components/table/src/table-column.vue.d.ts +37 -37
- package/es/components/utils/index.d.ts +2 -2
- package/es/components/yc-dialog/index.d.ts +24 -24
- package/es/components/yc-download-dialog/index.d.ts +19 -19
- package/es/components/yc-download-dialog/src/index.vue.d.ts +1 -1
- package/es/components/yc-form-container-header/index.d.ts +12 -12
- package/es/components/yc-more-actions/index.d.ts +46 -46
- package/es/components/yc-more-actions/src/index.vue.d.ts +3 -3
- package/es/components/yc-plus-page/src/index.vue.d.ts +450 -360
- package/es/components/yc-plus-page/src/index.vue.mjs +1 -1
- package/es/components/yc-plus-page/src/index.vue2.mjs +2 -15
- package/es/components/yc-segmented/index.d.ts +2 -2
- package/es/components/yc-segmented/src/index.d.ts +2 -2
- package/es/components/yc-select-v2/src/index.vue.d.ts +3 -3
- package/es/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/es/components/yc-tabs-with-filter/index.d.ts +16 -16
- package/es/components/yc-text/src/index.vue.d.ts +2 -2
- package/es/hooks/usePlusFormReset.d.ts +208 -208
- package/es/index.css +1 -1
- package/index.css +6 -6
- package/index.js +140 -134
- package/index.min.css +1 -1
- package/index.min.js +7 -7
- package/index.min.mjs +7 -7
- package/index.mjs +140 -134
- package/lib/components/check-card/index.d.ts +61 -61
- package/lib/components/check-card/src/index.vue.d.ts +4 -4
- package/lib/components/check-card-group/index.d.ts +43 -43
- package/lib/components/check-card-group/src/index.vue.d.ts +3 -3
- package/lib/components/date-picker/index.d.ts +10 -10
- package/lib/components/date-picker/src/index.vue.d.ts +2 -2
- package/lib/components/dialog/index.d.ts +26 -26
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +31 -31
- package/lib/components/dialog-form/src/index.vue.d.ts +9 -9
- package/lib/components/display-item/index.d.ts +41 -41
- package/lib/components/display-item/src/index.vue.d.ts +22 -22
- package/lib/components/drawer-form/index.d.ts +50 -50
- package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
- package/lib/components/form/index.d.ts +64 -45
- package/lib/components/form/src/form-content.vue.d.ts +24 -20
- package/lib/components/form/src/form-content.vue2.js +105 -95
- package/lib/components/form/src/index.vue.d.ts +20 -17
- package/lib/components/form/src/index.vue2.js +5 -2
- package/lib/components/form/src/type.d.ts +4 -0
- package/lib/components/form-item/index.d.ts +42 -42
- package/lib/components/form-item/src/index.vue.d.ts +12 -12
- package/lib/components/form-item/src/index.vue2.js +21 -17
- package/lib/components/header/index.d.ts +19 -19
- package/lib/components/header/src/index.vue.d.ts +1 -1
- package/lib/components/input-tag/index.d.ts +20 -20
- package/lib/components/input-tag/src/index.vue.d.ts +8 -8
- package/lib/components/layout/index.d.ts +30 -30
- package/lib/components/layout/src/index.vue.d.ts +10 -10
- package/lib/components/page/index.d.ts +587 -452
- package/lib/components/page/src/index.vue.d.ts +199 -154
- package/lib/components/pagination/index.d.ts +42 -42
- package/lib/components/pagination/src/index.vue.d.ts +3 -3
- package/lib/components/radio/index.d.ts +35 -35
- package/lib/components/radio/src/index.vue.d.ts +27 -27
- package/lib/components/render/index.d.ts +3 -3
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +218 -154
- package/lib/components/search/src/index.vue.d.ts +68 -50
- package/lib/components/search/src/index.vue2.js +3 -1
- package/lib/components/search/src/type.d.ts +7 -0
- package/lib/components/sidebar/index.d.ts +15 -15
- package/lib/components/sidebar/src/index.vue.d.ts +5 -5
- package/lib/components/steps-form/index.d.ts +23 -23
- package/lib/components/steps-form/src/index.vue.d.ts +2 -2
- package/lib/components/table/index.d.ts +54 -54
- package/lib/components/table/src/index.vue.d.ts +18 -18
- package/lib/components/table/src/table-column-drag-sort.vue.d.ts +18 -18
- package/lib/components/table/src/table-column.vue.d.ts +37 -37
- package/lib/components/utils/index.d.ts +2 -2
- package/lib/components/yc-dialog/index.d.ts +24 -24
- package/lib/components/yc-download-dialog/index.d.ts +19 -19
- package/lib/components/yc-download-dialog/src/index.vue.d.ts +1 -1
- package/lib/components/yc-form-container-header/index.d.ts +12 -12
- package/lib/components/yc-more-actions/index.d.ts +46 -46
- package/lib/components/yc-more-actions/src/index.vue.d.ts +3 -3
- package/lib/components/yc-plus-page/src/index.vue.d.ts +450 -360
- package/lib/components/yc-plus-page/src/index.vue.js +1 -1
- package/lib/components/yc-plus-page/src/index.vue2.js +2 -15
- package/lib/components/yc-segmented/index.d.ts +2 -2
- package/lib/components/yc-segmented/src/index.d.ts +2 -2
- package/lib/components/yc-select-v2/src/index.vue.d.ts +3 -3
- package/lib/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/lib/components/yc-tabs-with-filter/index.d.ts +16 -16
- package/lib/components/yc-text/src/index.vue.d.ts +2 -2
- package/lib/hooks/usePlusFormReset.d.ts +208 -208
- package/lib/index.css +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-form.css +1 -1
- package/theme-chalk/plus-search.css +1 -1
- package/theme-chalk/src/form.scss +20 -0
- package/theme-chalk/src/search.scss +125 -0
|
@@ -10,6 +10,7 @@ import { Ref, ComputedRef, DefineComponent, ComponentOptionsMixin, PublicProps,
|
|
|
10
10
|
export interface PlusFormContentProps {
|
|
11
11
|
modelValue?: FieldValues;
|
|
12
12
|
hasLabel?: boolean;
|
|
13
|
+
layout?: 'grid' | 'flex';
|
|
13
14
|
columns?: PlusColumn[];
|
|
14
15
|
rowProps?: PlusRowProps;
|
|
15
16
|
colProps?: PlusColProps;
|
|
@@ -35,6 +36,7 @@ export interface PlusFormContentEmits {
|
|
|
35
36
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlusFormContentProps>, {
|
|
36
37
|
modelValue: () => {};
|
|
37
38
|
hasLabel: boolean;
|
|
39
|
+
layout: string;
|
|
38
40
|
rowProps: () => {};
|
|
39
41
|
colProps: () => {};
|
|
40
42
|
columns: () => never[];
|
|
@@ -47,6 +49,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
47
49
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlusFormContentProps>, {
|
|
48
50
|
modelValue: () => {};
|
|
49
51
|
hasLabel: boolean;
|
|
52
|
+
layout: string;
|
|
50
53
|
rowProps: () => {};
|
|
51
54
|
colProps: () => {};
|
|
52
55
|
columns: () => never[];
|
|
@@ -54,13 +57,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
54
57
|
collapseTransition: undefined;
|
|
55
58
|
clearable: boolean;
|
|
56
59
|
}>>> & {
|
|
57
|
-
"onUpdate:modelValue"?: ((values: FieldValues) => any) | undefined;
|
|
58
60
|
onChange?: ((values: FieldValues, column: PlusColumn) => any) | undefined;
|
|
61
|
+
"onUpdate:modelValue"?: ((values: FieldValues) => any) | undefined;
|
|
59
62
|
}, {
|
|
60
|
-
modelValue: FieldValues;
|
|
61
63
|
collapseDuration: number;
|
|
62
64
|
collapseTransition: boolean;
|
|
63
65
|
columns: PlusColumn[];
|
|
66
|
+
layout: "grid" | "flex";
|
|
67
|
+
modelValue: FieldValues;
|
|
64
68
|
hasLabel: boolean;
|
|
65
69
|
rowProps: Partial< Mutable<RowProps> & {
|
|
66
70
|
style?: CSSProperties | undefined;
|
|
@@ -94,10 +98,10 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
94
98
|
value: string | number;
|
|
95
99
|
row: RecordType;
|
|
96
100
|
}) => OptionsRow<undefined>) | undefined;
|
|
97
|
-
tooltip?: string |
|
|
101
|
+
tooltip?: string | Partial< Mutable<ElTooltipProps> & {
|
|
98
102
|
style?: CSSProperties | undefined;
|
|
99
103
|
class?: any;
|
|
100
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
104
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
101
105
|
style?: CSSProperties | undefined;
|
|
102
106
|
class?: any;
|
|
103
107
|
} & RecordType>> | undefined;
|
|
@@ -198,14 +202,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
198
202
|
label?: string | undefined;
|
|
199
203
|
}) => RenderTypes) | undefined;
|
|
200
204
|
}) => any>> & Partial<Record<string, (_: {
|
|
201
|
-
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "
|
|
205
|
+
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "label" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "modelValue" | "fieldSlots" | "fieldChildrenSlot" | "hasLabel" | "clearable" | "valueType" | "renderField" | "renderLabel" | "renderErrorMessage" | "optionsMap" | "autoDict">> & {
|
|
202
206
|
readonly label: string | ComputedRef<string>;
|
|
203
|
-
readonly modelValue: string | number | boolean | string[] | [string, string] |
|
|
207
|
+
readonly modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
204
208
|
readonly hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
205
|
-
readonly tooltip: string |
|
|
209
|
+
readonly tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
206
210
|
style?: CSSProperties | undefined;
|
|
207
211
|
class?: any;
|
|
208
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
212
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
209
213
|
style?: CSSProperties | undefined;
|
|
210
214
|
class?: any;
|
|
211
215
|
} & RecordType>>;
|
|
@@ -272,12 +276,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
272
276
|
fieldInstance?: any;
|
|
273
277
|
valueIsReady?: Ref<boolean> | undefined;
|
|
274
278
|
prop: string;
|
|
275
|
-
modelValue: string | number | boolean | string[] | [string, string] |
|
|
279
|
+
modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
276
280
|
hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
277
|
-
tooltip: string |
|
|
281
|
+
tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
278
282
|
style?: CSSProperties | undefined;
|
|
279
283
|
class?: any;
|
|
280
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
284
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
281
285
|
style?: CSSProperties | undefined;
|
|
282
286
|
class?: any;
|
|
283
287
|
} & RecordType>>;
|
|
@@ -306,14 +310,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
306
310
|
clearable: boolean;
|
|
307
311
|
index: number;
|
|
308
312
|
}) => any>> & Partial<Record<string, (_: {
|
|
309
|
-
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "
|
|
313
|
+
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "label" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "modelValue" | "fieldSlots" | "fieldChildrenSlot" | "hasLabel" | "clearable" | "valueType" | "renderField" | "renderLabel" | "renderErrorMessage" | "optionsMap" | "autoDict">> & {
|
|
310
314
|
readonly label: string | ComputedRef<string>;
|
|
311
|
-
readonly modelValue: string | number | boolean | string[] | [string, string] |
|
|
315
|
+
readonly modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
312
316
|
readonly hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
313
|
-
readonly tooltip: string |
|
|
317
|
+
readonly tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
314
318
|
style?: CSSProperties | undefined;
|
|
315
319
|
class?: any;
|
|
316
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
320
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
317
321
|
style?: CSSProperties | undefined;
|
|
318
322
|
class?: any;
|
|
319
323
|
} & RecordType>>;
|
|
@@ -380,12 +384,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
380
384
|
fieldInstance?: any;
|
|
381
385
|
valueIsReady?: Ref<boolean> | undefined;
|
|
382
386
|
prop: string;
|
|
383
|
-
modelValue: string | number | boolean | string[] | [string, string] |
|
|
387
|
+
modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
384
388
|
hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
385
|
-
tooltip: string |
|
|
389
|
+
tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
386
390
|
style?: CSSProperties | undefined;
|
|
387
391
|
class?: any;
|
|
388
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
392
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
389
393
|
style?: CSSProperties | undefined;
|
|
390
394
|
class?: any;
|
|
391
395
|
} & RecordType>>;
|
|
@@ -436,10 +440,10 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
436
440
|
value: string | number;
|
|
437
441
|
row: RecordType;
|
|
438
442
|
}) => OptionsRow<undefined>) | undefined;
|
|
439
|
-
tooltip?: string |
|
|
443
|
+
tooltip?: string | Partial< Mutable<ElTooltipProps> & {
|
|
440
444
|
style?: CSSProperties | undefined;
|
|
441
445
|
class?: any;
|
|
442
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
446
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
443
447
|
style?: CSSProperties | undefined;
|
|
444
448
|
class?: any;
|
|
445
449
|
} & RecordType>> | undefined;
|
|
@@ -25,6 +25,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
props: {
|
|
26
26
|
modelValue: { default: () => ({}) },
|
|
27
27
|
hasLabel: { type: Boolean, default: true },
|
|
28
|
+
layout: { default: "grid" },
|
|
28
29
|
columns: { default: () => [] },
|
|
29
30
|
rowProps: { default: () => ({}) },
|
|
30
31
|
colProps: { default: () => ({}) },
|
|
@@ -37,6 +38,19 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
38
|
const props = __props;
|
|
38
39
|
const emit = __emit;
|
|
39
40
|
const values = vue.ref({});
|
|
41
|
+
const isNativeLayout = vue.computed(() => props.layout === "flex" || props.layout === "grid");
|
|
42
|
+
const isFlexLayout = vue.computed(() => props.layout === "flex");
|
|
43
|
+
const isGridLayout = vue.computed(() => props.layout === "grid");
|
|
44
|
+
const layoutRowClass = vue.computed(() => ({
|
|
45
|
+
"plus-form__row--flex": isFlexLayout.value,
|
|
46
|
+
"plus-form__row--grid": isGridLayout.value
|
|
47
|
+
}));
|
|
48
|
+
const layoutItemClass = vue.computed(() => ({
|
|
49
|
+
"plus-form__item-wrapper--flex": isFlexLayout.value,
|
|
50
|
+
"plus-form__item-wrapper--grid": isGridLayout.value
|
|
51
|
+
}));
|
|
52
|
+
const rowComponent = vue.computed(() => isNativeLayout.value ? "div" : elementPlus.ElRow);
|
|
53
|
+
const colComponent = vue.computed(() => isNativeLayout.value ? "div" : elementPlus.ElCol);
|
|
40
54
|
const getHasLabel = (hasLabel) => {
|
|
41
55
|
const has = vue.unref(hasLabel);
|
|
42
56
|
if (is.isBoolean(has)) {
|
|
@@ -59,104 +73,100 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
59
73
|
emit("update:modelValue", values.value);
|
|
60
74
|
emit("change", values.value, column);
|
|
61
75
|
};
|
|
76
|
+
const getColBinding = (item) => {
|
|
77
|
+
if (isNativeLayout.value) return void 0;
|
|
78
|
+
return vue.unref(item.colProps) || props.colProps;
|
|
79
|
+
};
|
|
62
80
|
return (_ctx, _cache) => {
|
|
63
|
-
return vue.openBlock(), vue.createBlock(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
vue.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
onChange: (value) => handleChange(value, item)
|
|
100
|
-
}), vue.createSlots({
|
|
101
|
-
_: 2
|
|
102
|
-
/* DYNAMIC */
|
|
103
|
-
}, [
|
|
104
|
-
_ctx.$slots[vue.unref(index.getLabelSlotName)(item.prop)] ? {
|
|
105
|
-
name: vue.unref(index.getLabelSlotName)(item.prop),
|
|
106
|
-
fn: vue.withCtx((data) => [
|
|
107
|
-
vue.renderSlot(_ctx.$slots, vue.unref(index.getLabelSlotName)(item.prop), vue.normalizeProps(vue.guardReactiveProps(data)))
|
|
108
|
-
]),
|
|
109
|
-
key: "0"
|
|
110
|
-
} : void 0,
|
|
111
|
-
_ctx.$slots[vue.unref(index.getFieldSlotName)(item.prop)] ? {
|
|
112
|
-
name: vue.unref(index.getFieldSlotName)(item.prop),
|
|
113
|
-
fn: vue.withCtx((data) => [
|
|
114
|
-
vue.renderSlot(_ctx.$slots, vue.unref(index.getFieldSlotName)(item.prop), vue.normalizeProps(vue.guardReactiveProps(data)))
|
|
115
|
-
]),
|
|
116
|
-
key: "1"
|
|
117
|
-
} : void 0,
|
|
118
|
-
_ctx.$slots["tooltip-icon"] ? {
|
|
119
|
-
name: "tooltip-icon",
|
|
120
|
-
fn: vue.withCtx(() => [
|
|
121
|
-
vue.renderSlot(_ctx.$slots, "tooltip-icon")
|
|
122
|
-
]),
|
|
123
|
-
key: "2"
|
|
124
|
-
} : void 0
|
|
125
|
-
]), 1040, ["model-value", "clearable", "has-label", "onChange"]),
|
|
126
|
-
vue.createCommentVNode(" el-form-item \u4E0B\u4E00\u884C\u989D\u5916\u7684\u5185\u5BB9 "),
|
|
127
|
-
item.renderExtra || _ctx.$slots[vue.unref(index.getExtraSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
128
|
-
item.renderExtra && vue.unref(is.isFunction)(item.renderExtra) ? (vue.openBlock(), vue.createBlock(
|
|
129
|
-
vue.resolveDynamicComponent(item.renderExtra),
|
|
130
|
-
vue.normalizeProps(vue.mergeProps({ key: 0 }, item)),
|
|
131
|
-
null,
|
|
132
|
-
16
|
|
133
|
-
/* FULL_PROPS */
|
|
134
|
-
)) : _ctx.$slots[vue.unref(index.getExtraSlotName)(item.prop)] ? vue.renderSlot(_ctx.$slots, vue.unref(index.getExtraSlotName)(item.prop), vue.normalizeProps(vue.mergeProps({ key: 1 }, item))) : vue.createCommentVNode("v-if", true)
|
|
135
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
136
|
-
]),
|
|
81
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(rowComponent.value), vue.mergeProps(isNativeLayout.value ? void 0 : _ctx.rowProps, {
|
|
82
|
+
class: ["plus-form__row", layoutRowClass.value]
|
|
83
|
+
}), {
|
|
84
|
+
default: vue.withCtx(() => [
|
|
85
|
+
vue.createVNode(collapseTransition.default, {
|
|
86
|
+
"collapse-duration": _ctx.collapseDuration,
|
|
87
|
+
"collapse-transition": _ctx.collapseTransition
|
|
88
|
+
}, {
|
|
89
|
+
default: vue.withCtx(() => [
|
|
90
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
91
|
+
vue.Fragment,
|
|
92
|
+
null,
|
|
93
|
+
vue.renderList(_ctx.columns, (item) => {
|
|
94
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(colComponent.value), vue.mergeProps({
|
|
95
|
+
key: item.prop
|
|
96
|
+
}, getColBinding(item), {
|
|
97
|
+
class: ["plus-form__item-wrapper", layoutItemClass.value]
|
|
98
|
+
}), {
|
|
99
|
+
default: vue.withCtx(() => [
|
|
100
|
+
vue.createCommentVNode(" el-form-item\u4E0A\u4E00\u884C\u7684\u5185\u5BB9 "),
|
|
101
|
+
item.renderPrevious || _ctx.$slots[vue.unref(index.getPreviousSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
102
|
+
vue.unref(is.isFunction)(item.renderPrevious) ? (vue.openBlock(), vue.createBlock(
|
|
103
|
+
vue.resolveDynamicComponent(item.renderPrevious),
|
|
104
|
+
vue.normalizeProps(vue.mergeProps({ key: 0 }, item)),
|
|
105
|
+
null,
|
|
106
|
+
16
|
|
107
|
+
/* FULL_PROPS */
|
|
108
|
+
)) : _ctx.$slots[vue.unref(index.getPreviousSlotName)(item.prop)] ? vue.renderSlot(_ctx.$slots, vue.unref(index.getPreviousSlotName)(item.prop), vue.normalizeProps(vue.mergeProps({ key: 1 }, item))) : vue.createCommentVNode("v-if", true)
|
|
109
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
110
|
+
vue.createVNode(vue.unref(index$1.PlusFormItem), vue.mergeProps({
|
|
111
|
+
"model-value": getModelValue(item.prop)
|
|
112
|
+
}, item, {
|
|
113
|
+
clearable: _ctx.clearable,
|
|
114
|
+
"has-label": getHasLabel(item.hasLabel),
|
|
115
|
+
onChange: (value) => handleChange(value, item)
|
|
116
|
+
}), vue.createSlots({
|
|
137
117
|
_: 2
|
|
138
118
|
/* DYNAMIC */
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
119
|
+
}, [
|
|
120
|
+
_ctx.$slots[vue.unref(index.getLabelSlotName)(item.prop)] ? {
|
|
121
|
+
name: vue.unref(index.getLabelSlotName)(item.prop),
|
|
122
|
+
fn: vue.withCtx((data) => [
|
|
123
|
+
vue.renderSlot(_ctx.$slots, vue.unref(index.getLabelSlotName)(item.prop), vue.normalizeProps(vue.guardReactiveProps(data)))
|
|
124
|
+
]),
|
|
125
|
+
key: "0"
|
|
126
|
+
} : void 0,
|
|
127
|
+
_ctx.$slots[vue.unref(index.getFieldSlotName)(item.prop)] ? {
|
|
128
|
+
name: vue.unref(index.getFieldSlotName)(item.prop),
|
|
129
|
+
fn: vue.withCtx((data) => [
|
|
130
|
+
vue.renderSlot(_ctx.$slots, vue.unref(index.getFieldSlotName)(item.prop), vue.normalizeProps(vue.guardReactiveProps(data)))
|
|
131
|
+
]),
|
|
132
|
+
key: "1"
|
|
133
|
+
} : void 0,
|
|
134
|
+
_ctx.$slots["tooltip-icon"] ? {
|
|
135
|
+
name: "tooltip-icon",
|
|
136
|
+
fn: vue.withCtx(() => [
|
|
137
|
+
vue.renderSlot(_ctx.$slots, "tooltip-icon")
|
|
138
|
+
]),
|
|
139
|
+
key: "2"
|
|
140
|
+
} : void 0
|
|
141
|
+
]), 1040, ["model-value", "clearable", "has-label", "onChange"]),
|
|
142
|
+
vue.createCommentVNode(" el-form-item \u4E0B\u4E00\u884C\u989D\u5916\u7684\u5185\u5BB9 "),
|
|
143
|
+
item.renderExtra || _ctx.$slots[vue.unref(index.getExtraSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
144
|
+
item.renderExtra && vue.unref(is.isFunction)(item.renderExtra) ? (vue.openBlock(), vue.createBlock(
|
|
145
|
+
vue.resolveDynamicComponent(item.renderExtra),
|
|
146
|
+
vue.normalizeProps(vue.mergeProps({ key: 0 }, item)),
|
|
147
|
+
null,
|
|
148
|
+
16
|
|
149
|
+
/* FULL_PROPS */
|
|
150
|
+
)) : _ctx.$slots[vue.unref(index.getExtraSlotName)(item.prop)] ? vue.renderSlot(_ctx.$slots, vue.unref(index.getExtraSlotName)(item.prop), vue.normalizeProps(vue.mergeProps({ key: 1 }, item))) : vue.createCommentVNode("v-if", true)
|
|
151
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
152
|
+
]),
|
|
153
|
+
_: 2
|
|
154
|
+
/* DYNAMIC */
|
|
155
|
+
}, 1040, ["class"]);
|
|
156
|
+
}),
|
|
157
|
+
128
|
|
158
|
+
/* KEYED_FRAGMENT */
|
|
159
|
+
))
|
|
160
|
+
]),
|
|
161
|
+
_: 3
|
|
162
|
+
/* FORWARDED */
|
|
163
|
+
}, 8, ["collapse-duration", "collapse-transition"]),
|
|
164
|
+
vue.createCommentVNode(" \u641C\u7D22\u7684footer\u63D2\u69FD "),
|
|
165
|
+
vue.renderSlot(_ctx.$slots, "search-footer")
|
|
166
|
+
]),
|
|
167
|
+
_: 3
|
|
168
|
+
/* FORWARDED */
|
|
169
|
+
}, 16, ["class"]);
|
|
160
170
|
};
|
|
161
171
|
}
|
|
162
172
|
});
|
|
@@ -12,6 +12,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
12
12
|
defaultValues: () => {};
|
|
13
13
|
labelWidth: string;
|
|
14
14
|
labelPosition: string;
|
|
15
|
+
layout: string;
|
|
15
16
|
rowProps: () => {};
|
|
16
17
|
colProps: () => {};
|
|
17
18
|
labelSuffix: string;
|
|
@@ -328,6 +329,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
328
329
|
defaultValues: () => {};
|
|
329
330
|
labelWidth: string;
|
|
330
331
|
labelPosition: string;
|
|
332
|
+
layout: string;
|
|
331
333
|
rowProps: () => {};
|
|
332
334
|
colProps: () => {};
|
|
333
335
|
labelSuffix: string;
|
|
@@ -348,18 +350,19 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
348
350
|
collapseTransition: undefined;
|
|
349
351
|
clearable: boolean;
|
|
350
352
|
}>>> & {
|
|
351
|
-
"onUpdate:modelValue"?: ((values: FieldValues) => any) | undefined;
|
|
352
353
|
onChange?: ((values: FieldValues, column: PlusColumn) => any) | undefined;
|
|
353
354
|
onReset?: ((values: FieldValues) => any) | undefined;
|
|
354
355
|
onSubmit?: ((values: FieldValues) => any) | undefined;
|
|
356
|
+
"onUpdate:modelValue"?: ((values: FieldValues) => any) | undefined;
|
|
355
357
|
onValidate?: ((...args: any[]) => any) | undefined;
|
|
356
358
|
onSubmitError?: ((errors: unknown) => any) | undefined;
|
|
357
359
|
}, {
|
|
358
|
-
modelValue: FieldValues;
|
|
359
360
|
collapseDuration: number;
|
|
360
361
|
collapseTransition: boolean;
|
|
361
362
|
columns: PlusColumn[];
|
|
362
363
|
group: false | PlusFormGroupRow[];
|
|
364
|
+
layout: "grid" | "flex";
|
|
365
|
+
modelValue: FieldValues;
|
|
363
366
|
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
364
367
|
labelPosition: "top" | "right" | "left";
|
|
365
368
|
labelWidth: string | number;
|
|
@@ -380,7 +383,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
380
383
|
submitText: string;
|
|
381
384
|
resetText: string;
|
|
382
385
|
submitLoading: boolean;
|
|
383
|
-
footerAlign: "
|
|
386
|
+
footerAlign: "right" | "left" | "center";
|
|
384
387
|
cardProps: Partial< Mutable<CardProps> & {
|
|
385
388
|
style?: CSSProperties | undefined;
|
|
386
389
|
class?: any;
|
|
@@ -399,14 +402,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
399
402
|
hideInGroup?: boolean | ComputedRef<boolean> | undefined;
|
|
400
403
|
columns?: PlusColumn[] | undefined;
|
|
401
404
|
}) => any>> & Partial<Record<NonNullable<string | number>, (_: {
|
|
402
|
-
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "
|
|
405
|
+
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "label" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "modelValue" | "fieldSlots" | "fieldChildrenSlot" | "hasLabel" | "clearable" | "valueType" | "renderField" | "renderLabel" | "renderErrorMessage" | "optionsMap" | "autoDict">> & {
|
|
403
406
|
readonly label: string | ComputedRef<string>;
|
|
404
|
-
readonly modelValue: string | number | boolean | string[] | [string, string] |
|
|
407
|
+
readonly modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
405
408
|
readonly hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
406
|
-
readonly tooltip: string |
|
|
409
|
+
readonly tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
407
410
|
style?: CSSProperties | undefined;
|
|
408
411
|
class?: any;
|
|
409
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
412
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
410
413
|
style?: CSSProperties | undefined;
|
|
411
414
|
class?: any;
|
|
412
415
|
} & RecordType>>;
|
|
@@ -473,12 +476,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
473
476
|
fieldInstance?: any;
|
|
474
477
|
valueIsReady?: Ref<boolean> | undefined;
|
|
475
478
|
prop: string;
|
|
476
|
-
modelValue: string | number | boolean | string[] | [string, string] |
|
|
479
|
+
modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
477
480
|
hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
478
|
-
tooltip: string |
|
|
481
|
+
tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
479
482
|
style?: CSSProperties | undefined;
|
|
480
483
|
class?: any;
|
|
481
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
484
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
482
485
|
style?: CSSProperties | undefined;
|
|
483
486
|
class?: any;
|
|
484
487
|
} & RecordType>>;
|
|
@@ -507,14 +510,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
507
510
|
clearable: boolean;
|
|
508
511
|
index: number;
|
|
509
512
|
}) => any>> & Partial<Record<NonNullable<string | number>, (_: {
|
|
510
|
-
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "
|
|
513
|
+
column: Readonly<Omit< LooseRequired<PlusFormItemProps>, "index" | "label" | "tooltip" | "formItemProps" | "fieldProps" | "options" | "modelValue" | "fieldSlots" | "fieldChildrenSlot" | "hasLabel" | "clearable" | "valueType" | "renderField" | "renderLabel" | "renderErrorMessage" | "optionsMap" | "autoDict">> & {
|
|
511
514
|
readonly label: string | ComputedRef<string>;
|
|
512
|
-
readonly modelValue: string | number | boolean | string[] | [string, string] |
|
|
515
|
+
readonly modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
513
516
|
readonly hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
514
|
-
readonly tooltip: string |
|
|
517
|
+
readonly tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
515
518
|
style?: CSSProperties | undefined;
|
|
516
519
|
class?: any;
|
|
517
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
520
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
518
521
|
style?: CSSProperties | undefined;
|
|
519
522
|
class?: any;
|
|
520
523
|
} & RecordType>>;
|
|
@@ -581,12 +584,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
581
584
|
fieldInstance?: any;
|
|
582
585
|
valueIsReady?: Ref<boolean> | undefined;
|
|
583
586
|
prop: string;
|
|
584
|
-
modelValue: string | number | boolean | string[] | [string, string] |
|
|
587
|
+
modelValue: string | number | boolean | string[] | [string, string] | number[] | Date | RecordType | boolean[] | Date[] | [Date, Date] | [number, number] | string[][] | number[][] | null;
|
|
585
588
|
hasLabel: boolean | Ref<boolean> | ComputedRef<boolean>;
|
|
586
|
-
tooltip: string |
|
|
589
|
+
tooltip: string | Partial< Mutable<ElTooltipProps> & {
|
|
587
590
|
style?: CSSProperties | undefined;
|
|
588
591
|
class?: any;
|
|
589
|
-
} & RecordType> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
592
|
+
} & RecordType> | ComputedRef<string> | ComputedRef<Partial< Mutable<ElTooltipProps> & {
|
|
590
593
|
style?: CSSProperties | undefined;
|
|
591
594
|
class?: any;
|
|
592
595
|
} & RecordType>>;
|
|
@@ -24,6 +24,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
24
24
|
columns: { default: () => [] },
|
|
25
25
|
labelWidth: { default: "80px" },
|
|
26
26
|
labelPosition: { default: "left" },
|
|
27
|
+
layout: { default: "grid" },
|
|
27
28
|
rowProps: { default: () => ({}) },
|
|
28
29
|
colProps: { default: () => ({}) },
|
|
29
30
|
labelSuffix: { default: ":" },
|
|
@@ -205,6 +206,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
205
206
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => values.value = $event),
|
|
206
207
|
"row-props": _ctx.rowProps,
|
|
207
208
|
"col-props": _ctx.colProps,
|
|
209
|
+
layout: _ctx.layout,
|
|
208
210
|
columns: filterHide(groupItem.columns),
|
|
209
211
|
"has-label": _ctx.hasLabel,
|
|
210
212
|
"collapse-transition": _ctx.collapseTransition,
|
|
@@ -223,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
223
225
|
])
|
|
224
226
|
};
|
|
225
227
|
})
|
|
226
|
-
]), 1032, ["modelValue", "row-props", "col-props", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"]))
|
|
228
|
+
]), 1032, ["modelValue", "row-props", "col-props", "layout", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"]))
|
|
227
229
|
]),
|
|
228
230
|
_: 2
|
|
229
231
|
/* DYNAMIC */
|
|
@@ -244,6 +246,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
244
246
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => values.value = $event),
|
|
245
247
|
"row-props": _ctx.rowProps,
|
|
246
248
|
"col-props": _ctx.colProps,
|
|
249
|
+
layout: _ctx.layout,
|
|
247
250
|
columns: subColumns.value,
|
|
248
251
|
"has-label": _ctx.hasLabel,
|
|
249
252
|
"collapse-transition": _ctx.collapseTransition,
|
|
@@ -262,7 +265,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
262
265
|
])
|
|
263
266
|
};
|
|
264
267
|
})
|
|
265
|
-
]), 1032, ["modelValue", "row-props", "col-props", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"])
|
|
268
|
+
]), 1032, ["modelValue", "row-props", "col-props", "layout", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"])
|
|
266
269
|
],
|
|
267
270
|
64
|
|
268
271
|
/* STABLE_FRAGMENT */
|
|
@@ -103,6 +103,10 @@ export type PlusFormSelfProps = {
|
|
|
103
103
|
columns?: PlusColumn[];
|
|
104
104
|
labelWidth?: ElementPlusFormProps['labelWidth'];
|
|
105
105
|
labelPosition?: ElementPlusFormProps['labelPosition'];
|
|
106
|
+
/**
|
|
107
|
+
* @desc 控制表单项排列方式,默认为栅格布局
|
|
108
|
+
*/
|
|
109
|
+
layout?: 'grid' | 'flex';
|
|
106
110
|
/**
|
|
107
111
|
* @version v0.1.27 类型修改为 PlusRowProps
|
|
108
112
|
*/
|