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