vft 0.0.317 → 0.0.320
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/dist/index.css +1 -1
- package/es/component.js +157 -155
- package/es/components/avatar-stack/avatar-stack.vue.d.ts +12 -0
- package/es/components/avatar-stack/avatar-stack.vue.js +4 -0
- package/es/components/avatar-stack/avatar-stack.vue2.js +69 -0
- package/es/components/avatar-stack/index.d.ts +43 -0
- package/es/components/avatar-stack/index.js +12 -0
- package/es/components/avatar-stack/style/css.d.ts +4 -0
- package/es/components/avatar-stack/style/css.js +6 -0
- package/es/components/avatar-stack/style/index.d.ts +4 -0
- package/es/components/avatar-stack/style/index.js +6 -0
- package/es/components/avatar-stack/types.d.ts +14 -0
- package/es/components/avatar-stack/types.js +1 -0
- package/es/components/button/index.d.ts +9 -9
- package/es/components/color-picker/color-picker.vue2.js +1 -1
- package/es/components/form/form-item.vue.d.ts +1 -1
- package/es/components/form/index.d.ts +30 -30
- package/es/components/index.d.ts +13 -12
- package/es/components/index.js +421 -419
- package/es/components/list-cell/list-cell.vue2.js +36 -36
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/super-form/component-map.d.ts +6 -0
- package/es/components/super-form/component-map.js +42 -30
- package/es/components/super-form/style/css.d.ts +6 -0
- package/es/components/super-form/style/css.js +15 -6
- package/es/components/super-form/style/index.d.ts +6 -0
- package/es/components/super-form/style/index.js +16 -7
- package/es/components/super-form/super-form-item.vue2.js +217 -199
- package/es/components/super-form/use/helper.js +137 -23
- package/es/components/table/style/css.js +15 -6
- package/es/components/table/style/index.js +16 -7
- package/es/components/tree/index.d.ts +5 -5
- package/es/components/tree/tree.vue.d.ts +2 -2
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload-content.vue2.js +51 -47
- package/es/components/upload/upload-list.vue2.js +70 -66
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/components/upload/upload.vue2.js +30 -30
- package/es/index.js +562 -560
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/component.cjs +1 -1
- package/lib/components/avatar-stack/avatar-stack.vue.cjs +1 -0
- package/lib/components/avatar-stack/avatar-stack.vue.d.ts +12 -0
- package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -0
- package/lib/components/avatar-stack/index.cjs +1 -0
- package/lib/components/avatar-stack/index.d.ts +43 -0
- package/lib/components/avatar-stack/style/css.cjs +1 -0
- package/lib/components/avatar-stack/style/css.d.ts +4 -0
- package/lib/components/avatar-stack/style/index.cjs +1 -0
- package/lib/components/avatar-stack/style/index.d.ts +4 -0
- package/lib/components/avatar-stack/types.cjs +1 -0
- package/lib/components/avatar-stack/types.d.ts +14 -0
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue.d.ts +1 -1
- package/lib/components/form/index.d.ts +30 -30
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +13 -12
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/component-map.d.ts +6 -0
- package/lib/components/super-form/style/css.cjs +1 -1
- package/lib/components/super-form/style/css.d.ts +6 -0
- package/lib/components/super-form/style/index.cjs +1 -1
- package/lib/components/super-form/style/index.d.ts +6 -0
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/table/style/css.cjs +1 -1
- package/lib/components/table/style/index.cjs +1 -1
- package/lib/components/tree/index.d.ts +5 -5
- package/lib/components/tree/tree.vue.d.ts +2 -2
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/avatar-stack.scss +38 -0
- package/theme-style/src/common/var.scss +16 -2
- package/theme-style/src/index.scss +1 -0
- package/theme-style/src/super-form.scss +6 -1
- package/theme-style/vft-avatar-stack.css +1 -0
- package/theme-style/vft-super-form.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftCol as
|
|
3
|
-
import { VftDivider as
|
|
4
|
-
import { VftFormItem as
|
|
1
|
+
import { defineComponent as W, computed as L, unref as u, useSlots as _, createVNode as d, mergeProps as F, withDirectives as ee, vShow as te, createTextVNode as H, isVNode as re, resolveComponent as U } from "vue";
|
|
2
|
+
import { VftCol as G } from "../col/index.js";
|
|
3
|
+
import { VftDivider as ne } from "../divider/index.js";
|
|
4
|
+
import { VftFormItem as oe } from "../form/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
|
-
import { isFunction as
|
|
6
|
+
import { isFunction as C, isBoolean as v, cloneDeep as le, isArray as J, isNull as se, upperFirst as ie, isString as ae } from "@vft/utils";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import "lodash-es";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as ce } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
import { FormCompEnum as
|
|
14
|
-
import { createPlaceholderMessage as
|
|
15
|
-
function
|
|
16
|
-
return typeof
|
|
13
|
+
import { FormCompEnum as e, componentMap as X, isInput as ue, isDatePicker as de, isRangePicker as fe } from "./component-map.js";
|
|
14
|
+
import { createPlaceholderMessage as z } from "./use/helper.js";
|
|
15
|
+
function q(n) {
|
|
16
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !re(n);
|
|
17
17
|
}
|
|
18
|
-
const me =
|
|
18
|
+
const me = W({
|
|
19
19
|
inheritAttrs: !1
|
|
20
|
-
}),
|
|
20
|
+
}), Se = /* @__PURE__ */ W({
|
|
21
21
|
...me,
|
|
22
22
|
__name: "super-form-item",
|
|
23
23
|
props: {
|
|
@@ -29,318 +29,336 @@ const me = z({
|
|
|
29
29
|
updateSchema: {},
|
|
30
30
|
formActionType: {}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
32
|
+
setup(n) {
|
|
33
|
+
const D = ce("super-form"), P = L(() => {
|
|
34
34
|
const {
|
|
35
|
-
mergeDynamicData:
|
|
36
|
-
} =
|
|
35
|
+
mergeDynamicData: t
|
|
36
|
+
} = n.formProps;
|
|
37
37
|
return {
|
|
38
|
-
field:
|
|
39
|
-
model:
|
|
38
|
+
field: n.schema.field,
|
|
39
|
+
model: n.formModel,
|
|
40
40
|
values: {
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
...
|
|
41
|
+
...t,
|
|
42
|
+
...n.allDefaultValues,
|
|
43
|
+
...n.formModel
|
|
44
44
|
},
|
|
45
|
-
schema:
|
|
45
|
+
schema: n.schema
|
|
46
46
|
};
|
|
47
47
|
}), K = L(() => {
|
|
48
48
|
let {
|
|
49
|
-
componentProps:
|
|
50
|
-
} =
|
|
51
|
-
|
|
52
|
-
schema:
|
|
53
|
-
formModel:
|
|
54
|
-
formActionType:
|
|
49
|
+
componentProps: t = {}
|
|
50
|
+
} = n.schema;
|
|
51
|
+
C(t) && (t = t({
|
|
52
|
+
schema: n.schema,
|
|
53
|
+
formModel: n.formModel,
|
|
54
|
+
formActionType: n.formActionType
|
|
55
55
|
}) ?? {});
|
|
56
|
-
const
|
|
56
|
+
const r = /* @__PURE__ */ new Map([[e.DIVIDER, {
|
|
57
57
|
type: "horizontal"
|
|
58
|
-
}], [
|
|
58
|
+
}], [e.TEXTAREA, {
|
|
59
59
|
type: "textarea"
|
|
60
|
-
}], [
|
|
60
|
+
}], [e.PASSWORD, {
|
|
61
61
|
type: "password",
|
|
62
62
|
"show-password": !0
|
|
63
|
-
}], [
|
|
63
|
+
}], [e.INPUT_NUMBER, {
|
|
64
64
|
type: "number"
|
|
65
|
-
}], [
|
|
65
|
+
}], [e.CHECKBOX_BUTTON, {
|
|
66
66
|
useButton: !0
|
|
67
|
-
}], [
|
|
67
|
+
}], [e.RADIO_BUTTON, {
|
|
68
68
|
useButton: !0
|
|
69
|
-
}], [
|
|
70
|
-
type:
|
|
71
|
-
}], [
|
|
72
|
-
type:
|
|
73
|
-
}], [
|
|
74
|
-
type:
|
|
75
|
-
}], [
|
|
76
|
-
type:
|
|
77
|
-
}], [
|
|
78
|
-
type:
|
|
79
|
-
}], [
|
|
80
|
-
type:
|
|
81
|
-
}], [
|
|
82
|
-
type:
|
|
69
|
+
}], [e.YEAR_PICKER, {
|
|
70
|
+
type: e.YEAR_PICKER
|
|
71
|
+
}], [e.MONTH_PICKER, {
|
|
72
|
+
type: e.MONTH_PICKER
|
|
73
|
+
}], [e.DATE_PICKER, {
|
|
74
|
+
type: e.DATE_PICKER
|
|
75
|
+
}], [e.DATES_PICKER, {
|
|
76
|
+
type: e.DATES_PICKER
|
|
77
|
+
}], [e.DATETIME_PICKER, {
|
|
78
|
+
type: e.DATETIME_PICKER
|
|
79
|
+
}], [e.WEEK_PICKER, {
|
|
80
|
+
type: e.WEEK_PICKER
|
|
81
|
+
}], [e.TIMERANGE_PICKER, {
|
|
82
|
+
type: e.TIME_PICKER,
|
|
83
83
|
"is-range": !0,
|
|
84
84
|
"start-placeholder": "开始时间",
|
|
85
85
|
"end-placeholder": "结束时间"
|
|
86
|
-
}], [
|
|
87
|
-
type:
|
|
86
|
+
}], [e.DATETIMERANGE_PICKER, {
|
|
87
|
+
type: e.DATETIMERANGE_PICKER,
|
|
88
88
|
"start-placeholder": "开始日期",
|
|
89
89
|
"end-placeholder": "结束日期"
|
|
90
|
-
}], [
|
|
91
|
-
type:
|
|
90
|
+
}], [e.DATERANGE_PICKER, {
|
|
91
|
+
type: e.DATERANGE_PICKER,
|
|
92
92
|
"start-placeholder": "开始日期",
|
|
93
93
|
"end-placeholder": "结束日期"
|
|
94
|
-
}], [
|
|
95
|
-
type:
|
|
94
|
+
}], [e.MONTHRANGE_PICKER, {
|
|
95
|
+
type: e.MONTHRANGE_PICKER,
|
|
96
96
|
"start-placeholder": "开始月份",
|
|
97
97
|
"end-placeholder": "结束月份"
|
|
98
98
|
}]]);
|
|
99
|
-
return
|
|
100
|
-
}),
|
|
99
|
+
return r.has(n.schema.type) && (t = Object.assign(r.get(n.schema.type) || {}, t)), n.formProps.inputMaxLength && [e.INPUT].includes(n.schema.type) && !t?.maxlength && (t.maxlength = n.formProps.inputMaxLength), t;
|
|
100
|
+
}), $ = L(() => {
|
|
101
101
|
const {
|
|
102
|
-
disabled:
|
|
103
|
-
} =
|
|
104
|
-
dynamicDisabled:
|
|
105
|
-
} =
|
|
102
|
+
disabled: t
|
|
103
|
+
} = n.formProps, {
|
|
104
|
+
dynamicDisabled: r
|
|
105
|
+
} = n.schema, {
|
|
106
106
|
disabled: a = !1
|
|
107
107
|
} = u(K);
|
|
108
|
-
let i = !!
|
|
109
|
-
return
|
|
108
|
+
let i = !!t || a;
|
|
109
|
+
return v(r) && (i = r), C(r) && (i = r(u(P))), i;
|
|
110
110
|
});
|
|
111
|
-
function
|
|
111
|
+
function j() {
|
|
112
112
|
const {
|
|
113
|
-
show:
|
|
114
|
-
ifShow:
|
|
115
|
-
} =
|
|
113
|
+
show: t,
|
|
114
|
+
ifShow: r
|
|
115
|
+
} = n.schema;
|
|
116
116
|
let a = !0, i = !0;
|
|
117
|
-
return
|
|
117
|
+
return v(t) && (a = t), v(r) && (i = r), C(t) && (a = t(u(P))), C(r) && (i = r(u(P))), {
|
|
118
118
|
isShow: a,
|
|
119
119
|
isIfShow: i
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Y() {
|
|
123
123
|
const {
|
|
124
|
-
rules:
|
|
125
|
-
type:
|
|
124
|
+
rules: t = [],
|
|
125
|
+
type: r = e.INPUT,
|
|
126
126
|
rulesMessageJoinLabel: a,
|
|
127
127
|
label: i,
|
|
128
|
-
title:
|
|
128
|
+
title: p,
|
|
129
129
|
dynamicRule: c,
|
|
130
|
-
required:
|
|
131
|
-
dynamicRuleAdd:
|
|
132
|
-
} =
|
|
133
|
-
if (
|
|
134
|
-
return c(u(
|
|
135
|
-
let o =
|
|
130
|
+
required: I,
|
|
131
|
+
dynamicRuleAdd: R = !0
|
|
132
|
+
} = n.schema, m = i || p;
|
|
133
|
+
if (C(c) && !R)
|
|
134
|
+
return c(u(P));
|
|
135
|
+
let o = le(J(t) ? t : [t]);
|
|
136
136
|
const {
|
|
137
|
-
rulesMessageJoinLabel:
|
|
138
|
-
} =
|
|
137
|
+
rulesMessageJoinLabel: b
|
|
138
|
+
} = n.formProps, y = Reflect.has(n.schema, "rulesMessageJoinLabel") ? a : b, A = z(r, `${y ? m : ""}`);
|
|
139
139
|
function M(l, s) {
|
|
140
|
-
const
|
|
141
|
-
return s === void 0 ||
|
|
140
|
+
const N = l.message || A;
|
|
141
|
+
return s === void 0 || se(s) || Array.isArray(s) && s.length === 0 || typeof s == "string" && s.trim() === "" || typeof s == "object" && Reflect.has(s, "checked") && Reflect.has(s, "halfChecked") && Array.isArray(s.checked) && Array.isArray(s.halfChecked) && s.checked.length === 0 && s.halfChecked.length === 0 ? Promise.reject(N) : Promise.resolve();
|
|
142
142
|
}
|
|
143
|
-
const f =
|
|
143
|
+
const f = C(I) ? I(u(P)) : I, T = [e.RADIO, e.SELECT, e.RADIO, e.RADIO_SINGLE, e.RADIO_BUTTON, e.CHECKBOX, e.CHECKBOX_SINGLE, e.CHECKBOX_BUTTON, e.AUTOCOMPLETE, e.Cascader, e.ColorPicker, e.Upload, e.Slider].includes(r);
|
|
144
144
|
f && (!o || o.length === 0 ? o = [{
|
|
145
145
|
required: f,
|
|
146
146
|
validator: M,
|
|
147
|
-
trigger:
|
|
147
|
+
trigger: T ? "change" : "blur"
|
|
148
148
|
}] : o.findIndex((s) => Reflect.has(s, "required")) === -1 && o.unshift({
|
|
149
149
|
required: f,
|
|
150
150
|
validator: M,
|
|
151
|
-
trigger:
|
|
151
|
+
trigger: T ? "change" : "blur"
|
|
152
152
|
}));
|
|
153
153
|
const x = o.findIndex((l) => Reflect.has(l, "required") && !Reflect.has(l, "validator"));
|
|
154
154
|
if (x !== -1) {
|
|
155
155
|
const l = o[x], {
|
|
156
156
|
isShow: s
|
|
157
|
-
} =
|
|
158
|
-
s || (l.required = !1),
|
|
157
|
+
} = j();
|
|
158
|
+
s || (l.required = !1), r && (l.message = l.message || A);
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
function
|
|
162
|
-
const O = o[s],
|
|
163
|
-
return ["min", "all"].includes(
|
|
160
|
+
const h = o.findIndex((l) => l.min), E = o.findIndex((l) => l.max);
|
|
161
|
+
function g(l, s, N = "all") {
|
|
162
|
+
const O = o[s], B = O.isNumber ? isNaN(l) ? l?.length || 0 : Number(l) : l?.length || 0;
|
|
163
|
+
return ["min", "all"].includes(N) && B < O.min ? Promise.reject(m + "至少为" + O.min + "位") : ["max", "all"].includes(N) && B > O.max ? Promise.reject(m + "最多" + O.max + "位") : Promise.resolve();
|
|
164
164
|
}
|
|
165
|
-
(
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
let l = c(u(
|
|
169
|
-
l =
|
|
165
|
+
(h !== -1 || E !== -1) && (h !== -1 && E !== -1 && !o[h].validator && !o[h].message ? o[h].validator = (l, s) => g(s, h) : h !== -1 && !o[h].validator && !o[h].message ? o[h].validator = (l, s) => g(s, h, "min") : E !== -1 && !o[E].validator && !o[E].message && (o[E].validator = (l, s) => g(s, E, "max")));
|
|
166
|
+
const S = o.findIndex((l) => l.len);
|
|
167
|
+
if (S !== -1 && (o[S].validator = (l, s) => s.length !== o[S].len ? Promise.reject(m + "必须是" + o[S].len + "位") : Promise.resolve()), C(c) && R) {
|
|
168
|
+
let l = c(u(P));
|
|
169
|
+
l = J(l) ? l : [l], o = o.concat(l);
|
|
170
170
|
}
|
|
171
171
|
return o;
|
|
172
172
|
}
|
|
173
|
-
const
|
|
173
|
+
const Q = () => {
|
|
174
174
|
const {
|
|
175
|
-
renderComponentContent:
|
|
176
|
-
type:
|
|
175
|
+
renderComponentContent: t,
|
|
176
|
+
type: r = e.INPUT,
|
|
177
177
|
field: a,
|
|
178
178
|
changeEvent: i = "change",
|
|
179
|
-
valueField:
|
|
179
|
+
valueField: p,
|
|
180
180
|
label: c,
|
|
181
|
-
title:
|
|
182
|
-
placeholderJoinLabel:
|
|
183
|
-
} =
|
|
184
|
-
let
|
|
185
|
-
|
|
186
|
-
const o = `on${
|
|
187
|
-
[o]: (...
|
|
188
|
-
const [
|
|
189
|
-
f[o] && f[o](...
|
|
190
|
-
const l =
|
|
191
|
-
|
|
181
|
+
title: I,
|
|
182
|
+
placeholderJoinLabel: R = !0
|
|
183
|
+
} = n.schema;
|
|
184
|
+
let m = i;
|
|
185
|
+
ue(r) ? m = "input" : de(r) || r === e.TIME_PICKER || [e.INPUT_TAG, e.AUTOCOMPLETE, e.Cascader, e.ColorPicker, e.Slider].includes(r) ? m = "update:modelValue" : r === e.Upload && (m = "update:fileList");
|
|
186
|
+
const o = `on${ie(m)}`, b = {
|
|
187
|
+
[o]: (...g) => {
|
|
188
|
+
const [S] = g;
|
|
189
|
+
f[o] && f[o](...g);
|
|
190
|
+
const l = S ? S.target : null, s = l ? l.value : S;
|
|
191
|
+
n.setFormModel(a, s, n.schema);
|
|
192
192
|
}
|
|
193
|
-
},
|
|
194
|
-
autoSetPlaceHolder:
|
|
193
|
+
}, y = X.get(r), {
|
|
194
|
+
autoSetPlaceHolder: A,
|
|
195
195
|
size: M
|
|
196
|
-
} =
|
|
196
|
+
} = n.formProps, f = {
|
|
197
197
|
clearable: !0,
|
|
198
198
|
...u(K)
|
|
199
199
|
};
|
|
200
|
-
if ([
|
|
201
|
-
const
|
|
202
|
-
f.placeholder = u(K)?.placeholder ||
|
|
200
|
+
if ([e.SEARCH].includes(r) || (f.size = u(K)?.size || M, f.disabled = u($)), !f.disabled && A && !fe(r) && r) {
|
|
201
|
+
const g = c || I;
|
|
202
|
+
f.placeholder = u(K)?.placeholder || z(r, R && ae(g) ? g : "");
|
|
203
203
|
}
|
|
204
204
|
const x = {
|
|
205
|
-
[
|
|
206
|
-
},
|
|
207
|
-
...
|
|
205
|
+
[p || "model-value"]: n.formModel[a]
|
|
206
|
+
}, h = {
|
|
207
|
+
...b,
|
|
208
208
|
...f,
|
|
209
209
|
...x
|
|
210
210
|
};
|
|
211
|
-
if (!e)
|
|
212
|
-
return
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
if (!t && r !== e.Upload)
|
|
212
|
+
return d(y, h, null);
|
|
213
|
+
let E;
|
|
214
|
+
if (E = C(t) ? {
|
|
215
|
+
...t(u(P))
|
|
215
216
|
} : {
|
|
216
|
-
default: () =>
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
default: () => t
|
|
218
|
+
}, r === e.Upload && !t) {
|
|
219
|
+
const {
|
|
220
|
+
drag: g
|
|
221
|
+
} = u(K);
|
|
222
|
+
E = g ? {
|
|
223
|
+
default: () => d(U("vft-icon"), {
|
|
224
|
+
icon: "icon-arrow-upload"
|
|
225
|
+
}, null)
|
|
226
|
+
} : {
|
|
227
|
+
default: () => d(U("vft-button"), {
|
|
228
|
+
type: "primary"
|
|
229
|
+
}, {
|
|
230
|
+
default: () => [d(U("vft-icon"), {
|
|
231
|
+
icon: "icon-arrow-upload"
|
|
232
|
+
}, null)]
|
|
233
|
+
})
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
return d(y, h, q(E) ? E : {
|
|
237
|
+
default: () => [E]
|
|
220
238
|
});
|
|
221
239
|
};
|
|
222
240
|
function w() {
|
|
223
241
|
const {
|
|
224
|
-
showLabel:
|
|
225
|
-
label:
|
|
242
|
+
showLabel: t = !0,
|
|
243
|
+
label: r,
|
|
226
244
|
title: a,
|
|
227
245
|
subLabel: i,
|
|
228
|
-
labelRequired:
|
|
229
|
-
} =
|
|
230
|
-
let c =
|
|
231
|
-
return c =
|
|
246
|
+
labelRequired: p
|
|
247
|
+
} = n.schema;
|
|
248
|
+
let c = r || a;
|
|
249
|
+
return c = p ? d("span", null, [d("span", {
|
|
232
250
|
class: "label-required"
|
|
233
|
-
}, [
|
|
251
|
+
}, [H("*")]), d("span", null, [c])]) : c, t && c ? i ? d("span", null, [c, H(" "), d("span", {
|
|
234
252
|
class: "sub-label"
|
|
235
253
|
}, [i])]) : c : void 0;
|
|
236
254
|
}
|
|
237
|
-
const
|
|
238
|
-
function
|
|
239
|
-
if (!
|
|
255
|
+
const k = _();
|
|
256
|
+
function V(t, r = "default", a) {
|
|
257
|
+
if (!t || !Reflect.has(t, r))
|
|
240
258
|
return null;
|
|
241
|
-
if (!
|
|
242
|
-
return console.error(`${
|
|
243
|
-
const i =
|
|
259
|
+
if (!C(t[r]))
|
|
260
|
+
return console.error(`${r} is not a function!`), null;
|
|
261
|
+
const i = t[r];
|
|
244
262
|
return i ? i(a) : null;
|
|
245
263
|
}
|
|
246
|
-
function
|
|
264
|
+
function Z() {
|
|
247
265
|
const {
|
|
248
|
-
itemProps:
|
|
249
|
-
slot:
|
|
266
|
+
itemProps: t,
|
|
267
|
+
slot: r,
|
|
250
268
|
render: a,
|
|
251
269
|
field: i,
|
|
252
|
-
suffix:
|
|
270
|
+
suffix: p,
|
|
253
271
|
prefix: c,
|
|
254
|
-
prefixParentStyle:
|
|
255
|
-
} =
|
|
256
|
-
autoCleanErrorMessage:
|
|
257
|
-
compFullWidth:
|
|
258
|
-
} =
|
|
259
|
-
|
|
272
|
+
prefixParentStyle: I
|
|
273
|
+
} = n.schema, {
|
|
274
|
+
autoCleanErrorMessage: R,
|
|
275
|
+
compFullWidth: m
|
|
276
|
+
} = n.formProps, o = () => r ? V(k, r, u(P)) : a ? a(u(P)) : Q(), b = !!p, y = !!c, A = C(p) ? p(u(P)) : p, M = C(c) ? c(u(P)) : c, f = () => {
|
|
277
|
+
n.updateSchema([{
|
|
260
278
|
field: i,
|
|
261
279
|
itemProps: {
|
|
262
280
|
error: ""
|
|
263
281
|
}
|
|
264
282
|
}]);
|
|
265
|
-
},
|
|
283
|
+
}, T = () => d(oe, F({
|
|
266
284
|
style: {
|
|
267
|
-
marginRight:
|
|
285
|
+
marginRight: n.formProps.customLayout ? "10px" : 0
|
|
268
286
|
},
|
|
269
287
|
prop: i,
|
|
270
288
|
class: [{
|
|
271
|
-
[
|
|
289
|
+
[D.is("suffix")]: b
|
|
272
290
|
}, {
|
|
273
|
-
[
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
label:
|
|
277
|
-
"onUpdate:error":
|
|
291
|
+
[D.is("comp-full-width")]: m
|
|
292
|
+
}, D.e("item")]
|
|
293
|
+
}, t, {
|
|
294
|
+
label: t?.label || t?.title,
|
|
295
|
+
"onUpdate:error": R ? f : () => {
|
|
278
296
|
},
|
|
279
|
-
rules:
|
|
297
|
+
rules: Y()
|
|
280
298
|
}), {
|
|
281
|
-
default: () => [
|
|
282
|
-
class:
|
|
283
|
-
}, [
|
|
284
|
-
class:
|
|
285
|
-
}, [o(),
|
|
286
|
-
class:
|
|
287
|
-
}, [
|
|
299
|
+
default: () => [d("div", {
|
|
300
|
+
class: D.e("container")
|
|
301
|
+
}, [d("div", {
|
|
302
|
+
class: D.e("content")
|
|
303
|
+
}, [o(), b && d("span", {
|
|
304
|
+
class: D.m("suffix")
|
|
305
|
+
}, [A])])])],
|
|
288
306
|
label: w() ? () => w() : void 0
|
|
289
307
|
});
|
|
290
|
-
return
|
|
291
|
-
style:
|
|
292
|
-
}, [
|
|
293
|
-
class:
|
|
294
|
-
}, [M]),
|
|
308
|
+
return y ? d("div", {
|
|
309
|
+
style: I
|
|
310
|
+
}, [d("span", {
|
|
311
|
+
class: D.m("prefix")
|
|
312
|
+
}, [M]), T()]) : T();
|
|
295
313
|
}
|
|
296
314
|
return () => {
|
|
297
|
-
let
|
|
315
|
+
let t;
|
|
298
316
|
const {
|
|
299
|
-
colProps:
|
|
317
|
+
colProps: r = {},
|
|
300
318
|
colSlot: a,
|
|
301
319
|
renderColContent: i,
|
|
302
|
-
type:
|
|
320
|
+
type: p = e.INPUT,
|
|
303
321
|
render: c,
|
|
304
|
-
quickColSpan:
|
|
305
|
-
} =
|
|
306
|
-
if (!
|
|
322
|
+
quickColSpan: I
|
|
323
|
+
} = n.schema;
|
|
324
|
+
if (!X.has(p) && !i && !c)
|
|
307
325
|
return null;
|
|
308
326
|
const {
|
|
309
|
-
baseColProps:
|
|
310
|
-
quickColSpan:
|
|
311
|
-
} =
|
|
312
|
-
span: Math.ceil(24 /
|
|
313
|
-
...
|
|
327
|
+
baseColProps: R = {},
|
|
328
|
+
quickColSpan: m
|
|
329
|
+
} = n.formProps, o = m ? {
|
|
330
|
+
span: Math.ceil(24 / m),
|
|
331
|
+
...R
|
|
314
332
|
} : {
|
|
315
|
-
...
|
|
316
|
-
},
|
|
317
|
-
span: Math.ceil(24 /
|
|
318
|
-
...
|
|
333
|
+
...R
|
|
334
|
+
}, b = I ? {
|
|
335
|
+
span: Math.ceil(24 / I),
|
|
336
|
+
...r
|
|
319
337
|
} : {
|
|
320
|
-
...
|
|
321
|
-
},
|
|
338
|
+
...r
|
|
339
|
+
}, y = {
|
|
322
340
|
...o,
|
|
323
|
-
...
|
|
341
|
+
...b
|
|
324
342
|
}, {
|
|
325
|
-
isIfShow:
|
|
343
|
+
isIfShow: A,
|
|
326
344
|
isShow: M
|
|
327
|
-
} =
|
|
328
|
-
if (
|
|
345
|
+
} = j(), f = u(P), T = () => a ? V(k, a, f) : i ? i(f) : Z();
|
|
346
|
+
if (p === e.DIVIDER) {
|
|
329
347
|
let x;
|
|
330
|
-
return
|
|
348
|
+
return d(G, F({
|
|
331
349
|
span: 24
|
|
332
|
-
},
|
|
333
|
-
default: () => [
|
|
350
|
+
}, b), {
|
|
351
|
+
default: () => [d(ne, u(K), q(x = w()) ? x : {
|
|
334
352
|
default: () => [x]
|
|
335
353
|
})]
|
|
336
354
|
});
|
|
337
355
|
}
|
|
338
|
-
return
|
|
339
|
-
default: () => [
|
|
340
|
-
}), [[
|
|
356
|
+
return A && (n.formProps.customLayout ? T() : ee(d(G, y, q(t = T()) ? t : {
|
|
357
|
+
default: () => [t]
|
|
358
|
+
}), [[te, M]]));
|
|
341
359
|
};
|
|
342
360
|
}
|
|
343
361
|
});
|
|
344
362
|
export {
|
|
345
|
-
|
|
363
|
+
Se as default
|
|
346
364
|
};
|