vft 0.0.485 → 0.0.493
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/button/index.d.ts +9 -9
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/dialog/use-dialog.js +11 -11
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/message/message.vue2.js +45 -42
- package/es/components/message/types.d.ts +8 -2
- package/es/components/message/types.js +2 -1
- package/es/components/modal/index.d.ts +72 -3
- package/es/components/modal/modal-footer-action.vue.d.ts +1 -1
- package/es/components/modal/modal-footer-action.vue2.js +13 -15
- package/es/components/modal/modal.vue.d.ts +27 -3
- package/es/components/modal/modal.vue2.js +59 -59
- package/es/components/modal/types.d.ts +2 -0
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/router-view-content/index.d.ts +6 -0
- package/es/components/router-view-content/router-view-content.vue.d.ts +1 -0
- package/es/components/router-view-content/router-view-content.vue2.js +19 -18
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/select.vue.d.ts +4 -4
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/components/super-form/index.d.ts +30 -24
- package/es/components/super-form/super-form-item.vue2.js +263 -231
- package/es/components/super-form/super-form.vue.d.ts +3 -1
- package/es/components/super-form/super-form.vue2.js +153 -132
- package/es/components/super-form/types.d.ts +4 -2
- package/es/components/super-form/use/helper.d.ts +34 -0
- package/es/components/super-form/use/helper.js +81 -34
- package/es/components/switch/index.d.ts +1 -0
- package/es/components/switch/switch.vue.d.ts +1 -25
- package/es/components/switch/types.d.ts +25 -0
- package/es/components/switch/types.js +1 -0
- package/es/components/table/index.d.ts +6 -0
- package/es/components/table/table.vue.d.ts +4 -0
- package/es/components/table/table.vue2.js +164 -149
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +1 -1
- package/es/utils/form-register.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/dialog/use-dialog.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/message/types.cjs +1 -1
- package/lib/components/message/types.d.ts +8 -2
- package/lib/components/modal/index.d.ts +72 -3
- package/lib/components/modal/modal-footer-action.vue.d.ts +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +27 -3
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/modal/types.d.ts +2 -0
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/router-view-content/index.d.ts +6 -0
- package/lib/components/router-view-content/router-view-content.vue.d.ts +1 -0
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.vue.d.ts +4 -4
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/components/super-form/index.d.ts +30 -24
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue.d.ts +3 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +4 -2
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +34 -0
- package/lib/components/switch/index.d.ts +1 -0
- package/lib/components/switch/switch.vue.d.ts +1 -25
- package/lib/components/switch/types.cjs +1 -0
- package/lib/components/switch/types.d.ts +25 -0
- package/lib/components/table/index.d.ts +6 -0
- package/lib/components/table/table.vue.d.ts +4 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/dialog.scss +1 -1
- package/theme-style/src/message.scss +8 -4
- package/theme-style/src/super-form.scss +6 -0
- package/theme-style/src/table.scss +25 -6
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-message.css +1 -1
- package/theme-style/vft-super-form.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as te, computed as F, ref as Y, watch as se, unref as c, useSlots as me, createVNode as m, mergeProps as V, withDirectives as ce, vShow as pe, isVNode as ue, createTextVNode as K, resolveComponent as O } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
|
@@ -13,24 +13,24 @@ import "../clamp/index.js";
|
|
|
13
13
|
import "../client-only/index.js";
|
|
14
14
|
import "../clamp-toggle/index.js";
|
|
15
15
|
import "../clamp-tooltip/index.js";
|
|
16
|
-
import { VftCol as
|
|
16
|
+
import { VftCol as Q } from "../col/index.js";
|
|
17
17
|
import "../collapse-transition/index.js";
|
|
18
18
|
import "../color-picker/index.js";
|
|
19
19
|
import "../config-provider/index.js";
|
|
20
20
|
import "../container/index.js";
|
|
21
|
-
import {
|
|
21
|
+
import { isBoolean as U, isFunction as x, singleAttrToObj as G, cloneDeep as de, isArray as X, isNull as fe, upperFirst as he, isString as ge } from "@vft/utils";
|
|
22
22
|
import "../context-menu/context-menu.vue2.js";
|
|
23
|
-
import { VftIcon as
|
|
23
|
+
import { VftIcon as Z } from "../icon/index.js";
|
|
24
24
|
import "../date-picker/index.js";
|
|
25
25
|
import "../date-time-select/index.js";
|
|
26
26
|
import "../descriptions/index.js";
|
|
27
27
|
import "../dialog/index.js";
|
|
28
|
-
import { VftDivider as
|
|
28
|
+
import { VftDivider as Pe } from "../divider/index.js";
|
|
29
29
|
import "../drawer/index.js";
|
|
30
30
|
import "../dropdown/index.js";
|
|
31
31
|
import "../empty/index.js";
|
|
32
32
|
import "../footer-layout/index.js";
|
|
33
|
-
import { VftFormItem as
|
|
33
|
+
import { VftFormItem as be } from "../form/index.js";
|
|
34
34
|
import "../full-screen/index.js";
|
|
35
35
|
import "../header-layout/index.js";
|
|
36
36
|
import "../horizontal-menu/index.js";
|
|
@@ -70,7 +70,7 @@ import "../table/index.js";
|
|
|
70
70
|
import "../tabs/index.js";
|
|
71
71
|
import "../tag/index.js";
|
|
72
72
|
import "../time-picker/index.js";
|
|
73
|
-
import { VftTooltip as
|
|
73
|
+
import { VftTooltip as ye } from "../tooltip/index.js";
|
|
74
74
|
import "../tree/index.js";
|
|
75
75
|
import "../verify-code/index.js";
|
|
76
76
|
import "../virtual-list/components/fixed-size-list.js";
|
|
@@ -99,26 +99,26 @@ import "../md-container/index.js";
|
|
|
99
99
|
import "../md-tabs/index.js";
|
|
100
100
|
import "../md-vue-playground/index.js";
|
|
101
101
|
import "../infinite-scroll/index.js";
|
|
102
|
-
import { FormCompEnum as e, getComponent as
|
|
102
|
+
import { FormCompEnum as e, getComponent as _ } from "../../utils/form-register.js";
|
|
103
103
|
import "@vueuse/core";
|
|
104
104
|
import "../config-provider/hooks/use-global-config.js";
|
|
105
105
|
import "lodash-es";
|
|
106
|
-
import { useNamespace as
|
|
106
|
+
import { useNamespace as ke } from "../../hooks/use-namespace/index.js";
|
|
107
107
|
import "../../hooks/use-model-toggle/index.js";
|
|
108
108
|
import "@popperjs/core";
|
|
109
109
|
import "../../hooks/use-z-index/index.js";
|
|
110
110
|
import "../message/index.js";
|
|
111
111
|
import "../progress-i/index.js";
|
|
112
112
|
import "./index.js";
|
|
113
|
-
import { isRangePicker as
|
|
114
|
-
import { createPlaceholderMessage as
|
|
115
|
-
function
|
|
116
|
-
return typeof
|
|
113
|
+
import { isRangePicker as xe, isInput as Ce, isDatePicker as Re } from "./component-map.js";
|
|
114
|
+
import { createPlaceholderMessage as ee } from "./use/helper.js";
|
|
115
|
+
function z(r) {
|
|
116
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !ue(r);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const Se = te({
|
|
119
119
|
inheritAttrs: !1
|
|
120
|
-
}),
|
|
121
|
-
...
|
|
120
|
+
}), jo = /* @__PURE__ */ te({
|
|
121
|
+
...Se,
|
|
122
122
|
__name: "super-form-item",
|
|
123
123
|
props: {
|
|
124
124
|
schema: {},
|
|
@@ -129,31 +129,55 @@ const be = X({
|
|
|
129
129
|
updateSchema: {},
|
|
130
130
|
formActionType: {}
|
|
131
131
|
},
|
|
132
|
-
setup(
|
|
133
|
-
const
|
|
132
|
+
setup(r) {
|
|
133
|
+
const v = ke("super-form"), k = F(() => {
|
|
134
134
|
const {
|
|
135
|
-
mergeDynamicData:
|
|
136
|
-
} =
|
|
135
|
+
mergeDynamicData: o
|
|
136
|
+
} = r.formProps;
|
|
137
137
|
return {
|
|
138
|
-
field:
|
|
139
|
-
model:
|
|
138
|
+
field: r.schema.field,
|
|
139
|
+
model: r.formModel,
|
|
140
140
|
values: {
|
|
141
|
-
...
|
|
142
|
-
...
|
|
143
|
-
...
|
|
141
|
+
...o,
|
|
142
|
+
...r.allDefaultValues,
|
|
143
|
+
...r.formModel
|
|
144
144
|
},
|
|
145
|
-
schema:
|
|
146
|
-
elRef:
|
|
145
|
+
schema: r.schema,
|
|
146
|
+
elRef: N
|
|
147
|
+
};
|
|
148
|
+
}), oe = /* @__PURE__ */ new Set([e.Select, e.Radio, e.Checkbox, e.RadioButton, e.CheckboxButton, e.Cascader, e.AutoComplete]), B = () => r.schema.type && oe.has(r.schema.type) ? {
|
|
149
|
+
options: []
|
|
150
|
+
} : {}, j = Y(B());
|
|
151
|
+
async function re() {
|
|
152
|
+
const {
|
|
153
|
+
componentProps: o = {}
|
|
154
|
+
} = r.schema;
|
|
155
|
+
if (x(o)) {
|
|
156
|
+
const t = B();
|
|
157
|
+
j.value = t;
|
|
158
|
+
try {
|
|
159
|
+
const l = o({
|
|
160
|
+
schema: r.schema,
|
|
161
|
+
formModel: r.formModel,
|
|
162
|
+
formActionType: r.formActionType
|
|
163
|
+
}), s = l instanceof Promise ? await l : l;
|
|
164
|
+
j.value = {
|
|
165
|
+
...t,
|
|
166
|
+
...s ?? {}
|
|
167
|
+
};
|
|
168
|
+
} catch (l) {
|
|
169
|
+
console.error("componentProps 执行错误:", l), j.value = B();
|
|
170
|
+
}
|
|
171
|
+
} else
|
|
172
|
+
j.value = o;
|
|
173
|
+
}
|
|
174
|
+
se(() => r.schema.componentProps, (o, t) => (o || t) && re(), {
|
|
175
|
+
immediate: !0
|
|
176
|
+
});
|
|
177
|
+
const A = F(() => {
|
|
178
|
+
let o = {
|
|
179
|
+
...j.value
|
|
147
180
|
};
|
|
148
|
-
}), T = j(() => {
|
|
149
|
-
let {
|
|
150
|
-
componentProps: r = {}
|
|
151
|
-
} = o.schema;
|
|
152
|
-
C(r) && (r = r({
|
|
153
|
-
schema: o.schema,
|
|
154
|
-
formModel: o.formModel,
|
|
155
|
-
formActionType: o.formActionType
|
|
156
|
-
}) ?? {});
|
|
157
181
|
const t = /* @__PURE__ */ new Map([[e.Divider, {
|
|
158
182
|
type: "horizontal"
|
|
159
183
|
}], [e.Textarea, {
|
|
@@ -197,302 +221,310 @@ const be = X({
|
|
|
197
221
|
"start-placeholder": "开始月份",
|
|
198
222
|
"end-placeholder": "结束月份"
|
|
199
223
|
}]]);
|
|
200
|
-
|
|
201
|
-
|
|
224
|
+
r.schema.type && t.has(r.schema.type) && (o = Object.assign(t.get(r.schema.type) || {}, o));
|
|
225
|
+
const l = o;
|
|
226
|
+
return r.formProps.inputMaxLength && r.schema.type === e.Input && !l?.maxlength && (l.maxlength = r.formProps.inputMaxLength), l;
|
|
227
|
+
}), ie = F(() => {
|
|
202
228
|
const {
|
|
203
|
-
disabled:
|
|
204
|
-
} =
|
|
229
|
+
disabled: o
|
|
230
|
+
} = r.formProps, {
|
|
205
231
|
dynamicDisabled: t
|
|
206
|
-
} =
|
|
207
|
-
disabled:
|
|
208
|
-
} = c(
|
|
209
|
-
let s = !!
|
|
210
|
-
return
|
|
232
|
+
} = r.schema, {
|
|
233
|
+
disabled: l = !1
|
|
234
|
+
} = c(A);
|
|
235
|
+
let s = !!o || l;
|
|
236
|
+
return U(t) && (s = t), x(t) && (s = t(c(k))), s;
|
|
211
237
|
});
|
|
212
|
-
function
|
|
238
|
+
function J() {
|
|
213
239
|
const {
|
|
214
|
-
show:
|
|
240
|
+
show: o,
|
|
215
241
|
ifShow: t
|
|
216
|
-
} =
|
|
217
|
-
let
|
|
218
|
-
return
|
|
219
|
-
isShow:
|
|
242
|
+
} = r.schema;
|
|
243
|
+
let l = !0, s = !0;
|
|
244
|
+
return U(o) && (l = o), U(t) && (s = t), x(o) && (l = o(c(k))), x(t) && (s = t(c(k))), {
|
|
245
|
+
isShow: l,
|
|
220
246
|
isIfShow: s
|
|
221
247
|
};
|
|
222
248
|
}
|
|
223
|
-
function
|
|
249
|
+
function ne() {
|
|
224
250
|
const {
|
|
225
|
-
rules:
|
|
251
|
+
rules: o = [],
|
|
226
252
|
type: t = e.Input,
|
|
227
|
-
rulesMessageJoinLabel:
|
|
253
|
+
rulesMessageJoinLabel: l,
|
|
228
254
|
label: s,
|
|
229
|
-
title:
|
|
230
|
-
dynamicRule:
|
|
231
|
-
required:
|
|
232
|
-
dynamicRuleAdd:
|
|
233
|
-
} =
|
|
234
|
-
if (
|
|
235
|
-
return
|
|
236
|
-
|
|
255
|
+
title: y,
|
|
256
|
+
dynamicRule: d,
|
|
257
|
+
required: b,
|
|
258
|
+
dynamicRuleAdd: f = !0
|
|
259
|
+
} = r.schema, p = x(b) ? b(c(k)) : b;
|
|
260
|
+
if (!p)
|
|
261
|
+
return [];
|
|
262
|
+
const h = s || y;
|
|
263
|
+
if (x(d) && !f)
|
|
264
|
+
return d(c(k));
|
|
265
|
+
let i = de(X(o) ? o : [o]);
|
|
237
266
|
const {
|
|
238
|
-
rulesMessageJoinLabel:
|
|
239
|
-
} =
|
|
240
|
-
function
|
|
241
|
-
const
|
|
242
|
-
return
|
|
267
|
+
rulesMessageJoinLabel: C
|
|
268
|
+
} = r.formProps, D = Reflect.has(r.schema, "rulesMessageJoinLabel") ? l : C, R = ee(t, `${D ? h : ""}`);
|
|
269
|
+
function g(n, a) {
|
|
270
|
+
const T = n.message || R;
|
|
271
|
+
return a === void 0 || fe(a) || t === e.CheckboxSingle && !a || Array.isArray(a) && a.length === 0 || typeof a == "string" && a.trim() === "" || typeof a == "object" && Reflect.has(a, "checked") && Reflect.has(a, "halfChecked") && Array.isArray(a.checked) && Array.isArray(a.halfChecked) && a.checked.length === 0 && a.halfChecked.length === 0 ? Promise.reject(T) : Promise.resolve();
|
|
243
272
|
}
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
273
|
+
const S = [e.Radio, e.Select, e.RadioSingle, e.RadioButton, e.Checkbox, e.CheckboxSingle, e.CheckboxButton, e.AutoComplete, e.Cascader, e.ColorPicker, e.Upload, e.Slider].includes(t);
|
|
274
|
+
if (p)
|
|
275
|
+
!i || i.length === 0 ? i = [{
|
|
276
|
+
required: p,
|
|
277
|
+
validator: g,
|
|
278
|
+
trigger: S ? "change" : "blur"
|
|
279
|
+
}] : i.findIndex((a) => Reflect.has(a, "required")) === -1 && i.unshift({
|
|
280
|
+
required: p,
|
|
281
|
+
validator: g,
|
|
282
|
+
trigger: S ? "change" : "blur"
|
|
283
|
+
});
|
|
284
|
+
else
|
|
285
|
+
return i;
|
|
286
|
+
const L = i.findIndex((n) => Reflect.has(n, "required") && !Reflect.has(n, "validator"));
|
|
287
|
+
if (L !== -1) {
|
|
288
|
+
const n = i[L], {
|
|
289
|
+
isShow: a
|
|
290
|
+
} = J();
|
|
291
|
+
a || (n.required = !1), t && (n.message = n.message || R);
|
|
260
292
|
}
|
|
261
|
-
const
|
|
262
|
-
function
|
|
263
|
-
const
|
|
264
|
-
return ["min", "all"].includes(
|
|
293
|
+
const u = i.findIndex((n) => n.min), P = i.findIndex((n) => n.max);
|
|
294
|
+
function M(n, a, T = "all") {
|
|
295
|
+
const q = i[a], W = q.isNumber ? isNaN(n) ? n?.length || 0 : Number(n) : n?.length || 0;
|
|
296
|
+
return ["min", "all"].includes(T) && W < q.min ? Promise.reject(`${h}至少为${q.min}位`) : ["max", "all"].includes(T) && W > q.max ? Promise.reject(`${h}最多${q.max}位`) : Promise.resolve();
|
|
265
297
|
}
|
|
266
|
-
(
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
let n =
|
|
270
|
-
n =
|
|
298
|
+
(u !== -1 || P !== -1) && (u !== -1 && P !== -1 && !i[u].validator && !i[u].message ? i[u].validator = (n, a) => M(a, u) : u !== -1 && !i[u].validator && !i[u].message ? i[u].validator = (n, a) => M(a, u, "min") : P !== -1 && !i[P].validator && !i[P].message && (i[P].validator = (n, a) => M(a, P, "max")));
|
|
299
|
+
const w = i.findIndex((n) => n.len);
|
|
300
|
+
if (w !== -1 && (i[w].validator = (n, a) => a.length !== i[w].len ? Promise.reject(`${h}必须是${i[w].len}位`) : Promise.resolve()), x(d) && f) {
|
|
301
|
+
let n = d(c(k));
|
|
302
|
+
n = X(n) ? n : [n], i = i.concat(n);
|
|
271
303
|
}
|
|
272
304
|
return i;
|
|
273
305
|
}
|
|
274
|
-
const
|
|
306
|
+
const N = Y(), le = () => {
|
|
275
307
|
const {
|
|
276
|
-
renderComponentContent:
|
|
308
|
+
renderComponentContent: o,
|
|
277
309
|
type: t = e.Input,
|
|
278
|
-
field:
|
|
310
|
+
field: l,
|
|
279
311
|
changeEvent: s = "change",
|
|
280
|
-
valueField:
|
|
281
|
-
label:
|
|
282
|
-
title:
|
|
283
|
-
placeholderJoinLabel:
|
|
284
|
-
} =
|
|
312
|
+
valueField: y,
|
|
313
|
+
label: d,
|
|
314
|
+
title: b,
|
|
315
|
+
placeholderJoinLabel: f = !0
|
|
316
|
+
} = r.schema;
|
|
285
317
|
let p = s;
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
[
|
|
289
|
-
const [
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
|
|
318
|
+
Ce(t) ? p = "input" : Re(t) || t === e.TimePicker || t === e.InputTag || t === e.AutoComplete || t === e.Cascader || t === e.ColorPicker || t === e.Slider ? p = "update:modelValue" : t === e.Upload && (p = "update:fileList");
|
|
319
|
+
const h = `on${he(p)}`, i = {
|
|
320
|
+
[h]: (...P) => {
|
|
321
|
+
const [M] = P;
|
|
322
|
+
g[h] && g[h](...P);
|
|
323
|
+
const w = M ? M.target : null, n = w ? w.value : M;
|
|
324
|
+
r.setFormModel(l, n, r.schema);
|
|
293
325
|
}
|
|
294
|
-
},
|
|
295
|
-
autoSetPlaceHolder:
|
|
296
|
-
size:
|
|
297
|
-
} =
|
|
326
|
+
}, C = _(t), {
|
|
327
|
+
autoSetPlaceHolder: D,
|
|
328
|
+
size: R
|
|
329
|
+
} = r.formProps, g = {
|
|
298
330
|
clearable: !0,
|
|
299
|
-
...c(
|
|
331
|
+
...c(A)
|
|
300
332
|
};
|
|
301
|
-
if (
|
|
302
|
-
const
|
|
303
|
-
|
|
333
|
+
if (t !== e.Search && (g.size = c(A)?.size || R, g.disabled = c(ie)), !g.disabled && D && !xe(t) && t) {
|
|
334
|
+
const P = d || b;
|
|
335
|
+
g.placeholder = c(A)?.placeholder || ee(t, f && ge(P) ? P : "");
|
|
304
336
|
}
|
|
305
|
-
const
|
|
306
|
-
[
|
|
307
|
-
},
|
|
308
|
-
...
|
|
309
|
-
...
|
|
310
|
-
...
|
|
337
|
+
const S = {
|
|
338
|
+
[y || "model-value"]: r.formModel[l]
|
|
339
|
+
}, L = {
|
|
340
|
+
...i,
|
|
341
|
+
...g,
|
|
342
|
+
...S
|
|
311
343
|
};
|
|
312
|
-
if (!
|
|
313
|
-
return
|
|
314
|
-
ref:
|
|
315
|
-
},
|
|
316
|
-
let
|
|
317
|
-
if (
|
|
318
|
-
...
|
|
319
|
-
...c(
|
|
320
|
-
elRef:
|
|
344
|
+
if (!o && t !== e.Upload)
|
|
345
|
+
return m(C, V({
|
|
346
|
+
ref: N
|
|
347
|
+
}, L), null);
|
|
348
|
+
let u;
|
|
349
|
+
if (u = x(o) ? {
|
|
350
|
+
...o({
|
|
351
|
+
...c(k),
|
|
352
|
+
elRef: N
|
|
321
353
|
})
|
|
322
354
|
} : {
|
|
323
|
-
default: () =>
|
|
324
|
-
}, t === e.Upload && !
|
|
355
|
+
default: () => o
|
|
356
|
+
}, t === e.Upload && !o) {
|
|
325
357
|
const {
|
|
326
|
-
drag:
|
|
327
|
-
} = c(
|
|
328
|
-
|
|
329
|
-
default: () =>
|
|
358
|
+
drag: P
|
|
359
|
+
} = c(A);
|
|
360
|
+
u = P ? {
|
|
361
|
+
default: () => m(O("vft-icon"), {
|
|
330
362
|
icon: "icon-arrow-upload"
|
|
331
363
|
}, null)
|
|
332
364
|
} : {
|
|
333
|
-
default: () =>
|
|
365
|
+
default: () => m(O("vft-button"), {
|
|
334
366
|
type: "primary"
|
|
335
367
|
}, {
|
|
336
|
-
default: () => [
|
|
368
|
+
default: () => [m(O("vft-icon"), {
|
|
337
369
|
icon: "icon-arrow-upload"
|
|
338
370
|
}, null)]
|
|
339
371
|
})
|
|
340
372
|
};
|
|
341
373
|
}
|
|
342
|
-
return
|
|
343
|
-
ref:
|
|
344
|
-
},
|
|
345
|
-
default: () => [
|
|
374
|
+
return m(C, V({
|
|
375
|
+
ref: N
|
|
376
|
+
}, L), z(u) ? u : {
|
|
377
|
+
default: () => [u]
|
|
346
378
|
});
|
|
347
379
|
};
|
|
348
|
-
function
|
|
380
|
+
function $() {
|
|
349
381
|
const {
|
|
350
|
-
showLabel:
|
|
382
|
+
showLabel: o = !0,
|
|
351
383
|
label: t,
|
|
352
|
-
title:
|
|
384
|
+
title: l,
|
|
353
385
|
subLabel: s,
|
|
354
|
-
labelRequired:
|
|
355
|
-
helpIcon:
|
|
356
|
-
helpTooltip:
|
|
357
|
-
} =
|
|
358
|
-
let
|
|
359
|
-
|
|
386
|
+
labelRequired: y,
|
|
387
|
+
helpIcon: d,
|
|
388
|
+
helpTooltip: b
|
|
389
|
+
} = r.schema;
|
|
390
|
+
let f = t || l;
|
|
391
|
+
f = y ? m("span", null, [m("span", {
|
|
360
392
|
class: "label-required"
|
|
361
|
-
}, [
|
|
393
|
+
}, [K("*")]), m("span", null, [f])]) : f;
|
|
362
394
|
const p = () => {
|
|
363
|
-
if (!
|
|
364
|
-
const
|
|
395
|
+
if (!d && !b) return null;
|
|
396
|
+
const h = F(() => G(d, "icon", {
|
|
365
397
|
size: 20,
|
|
366
398
|
pointer: !0,
|
|
367
399
|
icon: "icon-help"
|
|
368
400
|
}));
|
|
369
|
-
if (
|
|
370
|
-
const
|
|
401
|
+
if (b) {
|
|
402
|
+
const i = F(() => G(b, "content", {
|
|
371
403
|
placement: "right-start"
|
|
372
404
|
}));
|
|
373
|
-
return
|
|
405
|
+
return m(ye, V({
|
|
374
406
|
className: "box-item"
|
|
375
|
-
},
|
|
376
|
-
default: () => [
|
|
407
|
+
}, i.value), {
|
|
408
|
+
default: () => [m(Z, h.value, null)]
|
|
377
409
|
});
|
|
378
410
|
}
|
|
379
|
-
return
|
|
411
|
+
return m(Z, h.value, null);
|
|
380
412
|
};
|
|
381
|
-
return
|
|
413
|
+
return o && f ? s ? m("div", {
|
|
382
414
|
class: "label-content"
|
|
383
|
-
}, [
|
|
415
|
+
}, [m("div", null, [f, K(" "), m("span", {
|
|
384
416
|
class: "sub-label"
|
|
385
|
-
}, [s])]), p()]) :
|
|
417
|
+
}, [s])]), p()]) : m("div", {
|
|
386
418
|
class: "label-content"
|
|
387
|
-
}, [
|
|
419
|
+
}, [m("div", null, [f]), p()]) : void 0;
|
|
388
420
|
}
|
|
389
|
-
const
|
|
390
|
-
function
|
|
391
|
-
if (!
|
|
421
|
+
const E = me();
|
|
422
|
+
function H(o, t = "default", l) {
|
|
423
|
+
if (!o || !Reflect.has(o, t))
|
|
392
424
|
return null;
|
|
393
|
-
if (!
|
|
425
|
+
if (!x(o[t]))
|
|
394
426
|
return console.error(`${t} is not a function!`), null;
|
|
395
|
-
const s =
|
|
396
|
-
return s ? s(
|
|
427
|
+
const s = o[t];
|
|
428
|
+
return s ? s(l) : null;
|
|
397
429
|
}
|
|
398
|
-
function
|
|
430
|
+
function ae() {
|
|
399
431
|
const {
|
|
400
|
-
itemProps:
|
|
432
|
+
itemProps: o,
|
|
401
433
|
slot: t,
|
|
402
|
-
render:
|
|
434
|
+
render: l,
|
|
403
435
|
field: s,
|
|
404
|
-
suffix:
|
|
405
|
-
prefix:
|
|
406
|
-
prefixParentStyle:
|
|
407
|
-
} =
|
|
408
|
-
autoCleanErrorMessage:
|
|
436
|
+
suffix: y,
|
|
437
|
+
prefix: d,
|
|
438
|
+
prefixParentStyle: b
|
|
439
|
+
} = r.schema, {
|
|
440
|
+
autoCleanErrorMessage: f,
|
|
409
441
|
compFullWidth: p
|
|
410
|
-
} =
|
|
411
|
-
|
|
442
|
+
} = r.formProps, h = () => t ? H(E, t, c(k)) : l ? l(c(k)) : le(), i = !!y, C = !!d, D = x(y) ? y(c(k)) : y, R = x(d) ? d(c(k)) : d, g = () => {
|
|
443
|
+
r.updateSchema([{
|
|
412
444
|
field: s,
|
|
413
445
|
itemProps: {
|
|
414
446
|
error: ""
|
|
415
447
|
}
|
|
416
448
|
}]);
|
|
417
|
-
},
|
|
449
|
+
}, I = () => m(be, V({
|
|
418
450
|
style: {
|
|
419
|
-
marginRight:
|
|
451
|
+
marginRight: r.formProps.customLayout ? "10px" : 0
|
|
420
452
|
},
|
|
421
453
|
prop: s,
|
|
422
454
|
class: [{
|
|
423
|
-
[
|
|
455
|
+
[v.is("suffix")]: i
|
|
424
456
|
}, {
|
|
425
|
-
[
|
|
426
|
-
},
|
|
427
|
-
},
|
|
428
|
-
label:
|
|
429
|
-
"onUpdate:error":
|
|
457
|
+
[v.is("comp-full-width")]: p
|
|
458
|
+
}, v.e("item")]
|
|
459
|
+
}, o, {
|
|
460
|
+
label: o?.label || o?.title,
|
|
461
|
+
"onUpdate:error": f ? g : () => {
|
|
430
462
|
},
|
|
431
|
-
rules:
|
|
463
|
+
rules: ne()
|
|
432
464
|
}), {
|
|
433
|
-
default: () => [
|
|
434
|
-
class:
|
|
435
|
-
}, [
|
|
436
|
-
class:
|
|
437
|
-
}, [
|
|
438
|
-
class:
|
|
439
|
-
}, [
|
|
440
|
-
label:
|
|
465
|
+
default: () => [m("div", {
|
|
466
|
+
class: v.e("container")
|
|
467
|
+
}, [m("div", {
|
|
468
|
+
class: v.e("content")
|
|
469
|
+
}, [h(), i && m("span", {
|
|
470
|
+
class: v.m("suffix")
|
|
471
|
+
}, [D])])])],
|
|
472
|
+
label: $() ? () => $() : void 0
|
|
441
473
|
});
|
|
442
|
-
return
|
|
443
|
-
style:
|
|
444
|
-
}, [
|
|
445
|
-
class:
|
|
446
|
-
}, [
|
|
474
|
+
return C ? m("div", {
|
|
475
|
+
style: b
|
|
476
|
+
}, [m("span", {
|
|
477
|
+
class: v.m("prefix")
|
|
478
|
+
}, [R]), I()]) : I();
|
|
447
479
|
}
|
|
448
480
|
return () => {
|
|
449
|
-
let
|
|
481
|
+
let o;
|
|
450
482
|
const {
|
|
451
483
|
colProps: t = {},
|
|
452
|
-
colSlot:
|
|
484
|
+
colSlot: l,
|
|
453
485
|
renderColContent: s,
|
|
454
|
-
type:
|
|
455
|
-
render:
|
|
456
|
-
quickColSpan:
|
|
457
|
-
} =
|
|
458
|
-
if (!
|
|
486
|
+
type: y = e.Input,
|
|
487
|
+
render: d,
|
|
488
|
+
quickColSpan: b
|
|
489
|
+
} = r.schema;
|
|
490
|
+
if (!_(y) && !s && !d)
|
|
459
491
|
return null;
|
|
460
492
|
const {
|
|
461
|
-
baseColProps:
|
|
493
|
+
baseColProps: f = {},
|
|
462
494
|
quickColSpan: p
|
|
463
|
-
} =
|
|
495
|
+
} = r.formProps, h = p ? {
|
|
464
496
|
span: Math.ceil(24 / p),
|
|
465
|
-
...
|
|
497
|
+
...f
|
|
466
498
|
} : {
|
|
467
|
-
...
|
|
468
|
-
},
|
|
469
|
-
span: Math.ceil(24 /
|
|
499
|
+
...f
|
|
500
|
+
}, i = b ? {
|
|
501
|
+
span: Math.ceil(24 / b),
|
|
470
502
|
...t
|
|
471
503
|
} : {
|
|
472
504
|
...t
|
|
473
|
-
},
|
|
474
|
-
...
|
|
475
|
-
...
|
|
505
|
+
}, C = {
|
|
506
|
+
...h,
|
|
507
|
+
...i
|
|
476
508
|
}, {
|
|
477
|
-
isIfShow:
|
|
478
|
-
isShow:
|
|
479
|
-
} =
|
|
480
|
-
if (
|
|
481
|
-
let
|
|
482
|
-
return
|
|
509
|
+
isIfShow: D,
|
|
510
|
+
isShow: R
|
|
511
|
+
} = J(), g = c(k), I = () => l ? H(E, l, g) : s ? s(g) : ae();
|
|
512
|
+
if (y === e.Divider) {
|
|
513
|
+
let S;
|
|
514
|
+
return m(Q, V({
|
|
483
515
|
span: 24
|
|
484
|
-
},
|
|
485
|
-
default: () => [
|
|
486
|
-
default: () => [
|
|
516
|
+
}, i), {
|
|
517
|
+
default: () => [m(Pe, c(A), z(S = $()) ? S : {
|
|
518
|
+
default: () => [S]
|
|
487
519
|
})]
|
|
488
520
|
});
|
|
489
521
|
}
|
|
490
|
-
return
|
|
491
|
-
default: () => [
|
|
492
|
-
}), [[
|
|
522
|
+
return D && (r.formProps.customLayout ? I() : ce(m(Q, C, z(o = I()) ? o : {
|
|
523
|
+
default: () => [o]
|
|
524
|
+
}), [[pe, R]]));
|
|
493
525
|
};
|
|
494
526
|
}
|
|
495
527
|
});
|
|
496
528
|
export {
|
|
497
|
-
|
|
529
|
+
jo as default
|
|
498
530
|
};
|