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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, openBlock, createBlock,
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, createVNode, createElementBlock, Fragment, renderList, createCommentVNode, unref, normalizeProps, renderSlot, createSlots, guardReactiveProps } from 'vue';
|
|
2
2
|
import { ElRow, ElCol } from 'element-plus';
|
|
3
3
|
import { PlusFormItem } from '../../form-item/index.mjs';
|
|
4
4
|
import { getPreviousSlotName, getLabelSlotName, getFieldSlotName, getExtraSlotName, getValue, setValue } from '../../utils/index.mjs';
|
|
@@ -21,6 +21,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
props: {
|
|
22
22
|
modelValue: { default: () => ({}) },
|
|
23
23
|
hasLabel: { type: Boolean, default: true },
|
|
24
|
+
layout: { default: "grid" },
|
|
24
25
|
columns: { default: () => [] },
|
|
25
26
|
rowProps: { default: () => ({}) },
|
|
26
27
|
colProps: { default: () => ({}) },
|
|
@@ -33,6 +34,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
34
|
const props = __props;
|
|
34
35
|
const emit = __emit;
|
|
35
36
|
const values = ref({});
|
|
37
|
+
const isNativeLayout = computed(() => props.layout === "flex" || props.layout === "grid");
|
|
38
|
+
const isFlexLayout = computed(() => props.layout === "flex");
|
|
39
|
+
const isGridLayout = computed(() => props.layout === "grid");
|
|
40
|
+
const layoutRowClass = computed(() => ({
|
|
41
|
+
"plus-form__row--flex": isFlexLayout.value,
|
|
42
|
+
"plus-form__row--grid": isGridLayout.value
|
|
43
|
+
}));
|
|
44
|
+
const layoutItemClass = computed(() => ({
|
|
45
|
+
"plus-form__item-wrapper--flex": isFlexLayout.value,
|
|
46
|
+
"plus-form__item-wrapper--grid": isGridLayout.value
|
|
47
|
+
}));
|
|
48
|
+
const rowComponent = computed(() => isNativeLayout.value ? "div" : ElRow);
|
|
49
|
+
const colComponent = computed(() => isNativeLayout.value ? "div" : ElCol);
|
|
36
50
|
const getHasLabel = (hasLabel) => {
|
|
37
51
|
const has = unref(hasLabel);
|
|
38
52
|
if (isBoolean(has)) {
|
|
@@ -55,104 +69,100 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
69
|
emit("update:modelValue", values.value);
|
|
56
70
|
emit("change", values.value, column);
|
|
57
71
|
};
|
|
72
|
+
const getColBinding = (item) => {
|
|
73
|
+
if (isNativeLayout.value) return void 0;
|
|
74
|
+
return unref(item.colProps) || props.colProps;
|
|
75
|
+
};
|
|
58
76
|
return (_ctx, _cache) => {
|
|
59
|
-
return openBlock(), createBlock(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
item.renderPrevious
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
onChange: (value) => handleChange(value, item)
|
|
96
|
-
}), createSlots({
|
|
97
|
-
_: 2
|
|
98
|
-
/* DYNAMIC */
|
|
99
|
-
}, [
|
|
100
|
-
_ctx.$slots[unref(getLabelSlotName)(item.prop)] ? {
|
|
101
|
-
name: unref(getLabelSlotName)(item.prop),
|
|
102
|
-
fn: withCtx((data) => [
|
|
103
|
-
renderSlot(_ctx.$slots, unref(getLabelSlotName)(item.prop), normalizeProps(guardReactiveProps(data)))
|
|
104
|
-
]),
|
|
105
|
-
key: "0"
|
|
106
|
-
} : void 0,
|
|
107
|
-
_ctx.$slots[unref(getFieldSlotName)(item.prop)] ? {
|
|
108
|
-
name: unref(getFieldSlotName)(item.prop),
|
|
109
|
-
fn: withCtx((data) => [
|
|
110
|
-
renderSlot(_ctx.$slots, unref(getFieldSlotName)(item.prop), normalizeProps(guardReactiveProps(data)))
|
|
111
|
-
]),
|
|
112
|
-
key: "1"
|
|
113
|
-
} : void 0,
|
|
114
|
-
_ctx.$slots["tooltip-icon"] ? {
|
|
115
|
-
name: "tooltip-icon",
|
|
116
|
-
fn: withCtx(() => [
|
|
117
|
-
renderSlot(_ctx.$slots, "tooltip-icon")
|
|
118
|
-
]),
|
|
119
|
-
key: "2"
|
|
120
|
-
} : void 0
|
|
121
|
-
]), 1040, ["model-value", "clearable", "has-label", "onChange"]),
|
|
122
|
-
createCommentVNode(" el-form-item \u4E0B\u4E00\u884C\u989D\u5916\u7684\u5185\u5BB9 "),
|
|
123
|
-
item.renderExtra || _ctx.$slots[unref(getExtraSlotName)(item.prop)] ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
124
|
-
item.renderExtra && unref(isFunction)(item.renderExtra) ? (openBlock(), createBlock(
|
|
125
|
-
resolveDynamicComponent(item.renderExtra),
|
|
126
|
-
normalizeProps(mergeProps({ key: 0 }, item)),
|
|
127
|
-
null,
|
|
128
|
-
16
|
|
129
|
-
/* FULL_PROPS */
|
|
130
|
-
)) : _ctx.$slots[unref(getExtraSlotName)(item.prop)] ? renderSlot(_ctx.$slots, unref(getExtraSlotName)(item.prop), normalizeProps(mergeProps({ key: 1 }, item))) : createCommentVNode("v-if", true)
|
|
131
|
-
])) : createCommentVNode("v-if", true)
|
|
132
|
-
]),
|
|
77
|
+
return openBlock(), createBlock(resolveDynamicComponent(rowComponent.value), mergeProps(isNativeLayout.value ? void 0 : _ctx.rowProps, {
|
|
78
|
+
class: ["plus-form__row", layoutRowClass.value]
|
|
79
|
+
}), {
|
|
80
|
+
default: withCtx(() => [
|
|
81
|
+
createVNode(PlusCollapseTransition, {
|
|
82
|
+
"collapse-duration": _ctx.collapseDuration,
|
|
83
|
+
"collapse-transition": _ctx.collapseTransition
|
|
84
|
+
}, {
|
|
85
|
+
default: withCtx(() => [
|
|
86
|
+
(openBlock(true), createElementBlock(
|
|
87
|
+
Fragment,
|
|
88
|
+
null,
|
|
89
|
+
renderList(_ctx.columns, (item) => {
|
|
90
|
+
return openBlock(), createBlock(resolveDynamicComponent(colComponent.value), mergeProps({
|
|
91
|
+
key: item.prop
|
|
92
|
+
}, getColBinding(item), {
|
|
93
|
+
class: ["plus-form__item-wrapper", layoutItemClass.value]
|
|
94
|
+
}), {
|
|
95
|
+
default: withCtx(() => [
|
|
96
|
+
createCommentVNode(" el-form-item\u4E0A\u4E00\u884C\u7684\u5185\u5BB9 "),
|
|
97
|
+
item.renderPrevious || _ctx.$slots[unref(getPreviousSlotName)(item.prop)] ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
98
|
+
unref(isFunction)(item.renderPrevious) ? (openBlock(), createBlock(
|
|
99
|
+
resolveDynamicComponent(item.renderPrevious),
|
|
100
|
+
normalizeProps(mergeProps({ key: 0 }, item)),
|
|
101
|
+
null,
|
|
102
|
+
16
|
|
103
|
+
/* FULL_PROPS */
|
|
104
|
+
)) : _ctx.$slots[unref(getPreviousSlotName)(item.prop)] ? renderSlot(_ctx.$slots, unref(getPreviousSlotName)(item.prop), normalizeProps(mergeProps({ key: 1 }, item))) : createCommentVNode("v-if", true)
|
|
105
|
+
])) : createCommentVNode("v-if", true),
|
|
106
|
+
createVNode(unref(PlusFormItem), mergeProps({
|
|
107
|
+
"model-value": getModelValue(item.prop)
|
|
108
|
+
}, item, {
|
|
109
|
+
clearable: _ctx.clearable,
|
|
110
|
+
"has-label": getHasLabel(item.hasLabel),
|
|
111
|
+
onChange: (value) => handleChange(value, item)
|
|
112
|
+
}), createSlots({
|
|
133
113
|
_: 2
|
|
134
114
|
/* DYNAMIC */
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
115
|
+
}, [
|
|
116
|
+
_ctx.$slots[unref(getLabelSlotName)(item.prop)] ? {
|
|
117
|
+
name: unref(getLabelSlotName)(item.prop),
|
|
118
|
+
fn: withCtx((data) => [
|
|
119
|
+
renderSlot(_ctx.$slots, unref(getLabelSlotName)(item.prop), normalizeProps(guardReactiveProps(data)))
|
|
120
|
+
]),
|
|
121
|
+
key: "0"
|
|
122
|
+
} : void 0,
|
|
123
|
+
_ctx.$slots[unref(getFieldSlotName)(item.prop)] ? {
|
|
124
|
+
name: unref(getFieldSlotName)(item.prop),
|
|
125
|
+
fn: withCtx((data) => [
|
|
126
|
+
renderSlot(_ctx.$slots, unref(getFieldSlotName)(item.prop), normalizeProps(guardReactiveProps(data)))
|
|
127
|
+
]),
|
|
128
|
+
key: "1"
|
|
129
|
+
} : void 0,
|
|
130
|
+
_ctx.$slots["tooltip-icon"] ? {
|
|
131
|
+
name: "tooltip-icon",
|
|
132
|
+
fn: withCtx(() => [
|
|
133
|
+
renderSlot(_ctx.$slots, "tooltip-icon")
|
|
134
|
+
]),
|
|
135
|
+
key: "2"
|
|
136
|
+
} : void 0
|
|
137
|
+
]), 1040, ["model-value", "clearable", "has-label", "onChange"]),
|
|
138
|
+
createCommentVNode(" el-form-item \u4E0B\u4E00\u884C\u989D\u5916\u7684\u5185\u5BB9 "),
|
|
139
|
+
item.renderExtra || _ctx.$slots[unref(getExtraSlotName)(item.prop)] ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
140
|
+
item.renderExtra && unref(isFunction)(item.renderExtra) ? (openBlock(), createBlock(
|
|
141
|
+
resolveDynamicComponent(item.renderExtra),
|
|
142
|
+
normalizeProps(mergeProps({ key: 0 }, item)),
|
|
143
|
+
null,
|
|
144
|
+
16
|
|
145
|
+
/* FULL_PROPS */
|
|
146
|
+
)) : _ctx.$slots[unref(getExtraSlotName)(item.prop)] ? renderSlot(_ctx.$slots, unref(getExtraSlotName)(item.prop), normalizeProps(mergeProps({ key: 1 }, item))) : createCommentVNode("v-if", true)
|
|
147
|
+
])) : createCommentVNode("v-if", true)
|
|
148
|
+
]),
|
|
149
|
+
_: 2
|
|
150
|
+
/* DYNAMIC */
|
|
151
|
+
}, 1040, ["class"]);
|
|
152
|
+
}),
|
|
153
|
+
128
|
|
154
|
+
/* KEYED_FRAGMENT */
|
|
155
|
+
))
|
|
156
|
+
]),
|
|
157
|
+
_: 3
|
|
158
|
+
/* FORWARDED */
|
|
159
|
+
}, 8, ["collapse-duration", "collapse-transition"]),
|
|
160
|
+
createCommentVNode(" \u641C\u7D22\u7684footer\u63D2\u69FD "),
|
|
161
|
+
renderSlot(_ctx.$slots, "search-footer")
|
|
162
|
+
]),
|
|
163
|
+
_: 3
|
|
164
|
+
/* FORWARDED */
|
|
165
|
+
}, 16, ["class"]);
|
|
156
166
|
};
|
|
157
167
|
}
|
|
158
168
|
});
|
|
@@ -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>>;
|
|
@@ -20,6 +20,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
columns: { default: () => [] },
|
|
21
21
|
labelWidth: { default: "80px" },
|
|
22
22
|
labelPosition: { default: "left" },
|
|
23
|
+
layout: { default: "grid" },
|
|
23
24
|
rowProps: { default: () => ({}) },
|
|
24
25
|
colProps: { default: () => ({}) },
|
|
25
26
|
labelSuffix: { default: ":" },
|
|
@@ -201,6 +202,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
201
202
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => values.value = $event),
|
|
202
203
|
"row-props": _ctx.rowProps,
|
|
203
204
|
"col-props": _ctx.colProps,
|
|
205
|
+
layout: _ctx.layout,
|
|
204
206
|
columns: filterHide(groupItem.columns),
|
|
205
207
|
"has-label": _ctx.hasLabel,
|
|
206
208
|
"collapse-transition": _ctx.collapseTransition,
|
|
@@ -219,7 +221,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
219
221
|
])
|
|
220
222
|
};
|
|
221
223
|
})
|
|
222
|
-
]), 1032, ["modelValue", "row-props", "col-props", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"]))
|
|
224
|
+
]), 1032, ["modelValue", "row-props", "col-props", "layout", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"]))
|
|
223
225
|
]),
|
|
224
226
|
_: 2
|
|
225
227
|
/* DYNAMIC */
|
|
@@ -240,6 +242,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
240
242
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => values.value = $event),
|
|
241
243
|
"row-props": _ctx.rowProps,
|
|
242
244
|
"col-props": _ctx.colProps,
|
|
245
|
+
layout: _ctx.layout,
|
|
243
246
|
columns: subColumns.value,
|
|
244
247
|
"has-label": _ctx.hasLabel,
|
|
245
248
|
"collapse-transition": _ctx.collapseTransition,
|
|
@@ -258,7 +261,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
258
261
|
])
|
|
259
262
|
};
|
|
260
263
|
})
|
|
261
|
-
]), 1032, ["modelValue", "row-props", "col-props", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"])
|
|
264
|
+
]), 1032, ["modelValue", "row-props", "col-props", "layout", "columns", "has-label", "collapse-transition", "collapse-duration", "clearable"])
|
|
262
265
|
],
|
|
263
266
|
64
|
|
264
267
|
/* 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
|
*/
|