vft 0.0.441 → 0.0.443
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/super-form/component-map.js +25 -25
- package/es/components/super-form/super-form-item.vue2.js +184 -184
- package/es/components/super-form/use/helper.js +34 -34
- package/es/components/super-form/use/use-auto-focus.js +4 -4
- package/es/components/super-form/use/use-form-events.js +56 -56
- package/es/components/table/index.d.ts +0 -54
- package/es/components/table/table.vue.d.ts +1 -1
- package/es/components/table/table.vue2.js +66 -74
- package/es/package.json.d.ts +4 -4
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +28 -28
- package/es/utils/form-register.js +44 -44
- package/lib/components/super-form/component-map.cjs +1 -1
- 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/super-form/use/use-auto-focus.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/table/index.d.ts +0 -54
- package/lib/components/table/table.vue.d.ts +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +4 -4
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +28 -28
- package/package.json +8 -8
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne, createTextVNode as O, isVNode as le, resolveComponent as N } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
|
@@ -13,14 +13,14 @@ 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 H } 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 { isFunction as
|
|
21
|
+
import { isFunction as C, isBoolean as $, singleAttrToObj as W, cloneDeep as ae, isArray as Y, isNull as se, upperFirst as me, isString as ce } from "@vft/utils";
|
|
22
22
|
import "../context-menu/context-menu.vue2.js";
|
|
23
|
-
import { VftIcon as
|
|
23
|
+
import { VftIcon as K } 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";
|
|
@@ -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 de } 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 Q } 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 fe } 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 he, isInput as
|
|
114
|
-
import { createPlaceholderMessage as
|
|
115
|
-
function
|
|
113
|
+
import { isRangePicker as he, isInput as ge, isDatePicker as Pe } from "./component-map.js";
|
|
114
|
+
import { createPlaceholderMessage as G } from "./use/helper.js";
|
|
115
|
+
function B(o) {
|
|
116
116
|
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !le(o);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const be = X({
|
|
119
119
|
inheritAttrs: !1
|
|
120
|
-
}),
|
|
121
|
-
...
|
|
120
|
+
}), Ir = /* @__PURE__ */ X({
|
|
121
|
+
...be,
|
|
122
122
|
__name: "super-form-item",
|
|
123
123
|
props: {
|
|
124
124
|
schema: {},
|
|
@@ -130,7 +130,7 @@ const Ce = Q({
|
|
|
130
130
|
formActionType: {}
|
|
131
131
|
},
|
|
132
132
|
setup(o) {
|
|
133
|
-
const
|
|
133
|
+
const w = fe("super-form"), y = j(() => {
|
|
134
134
|
const {
|
|
135
135
|
mergeDynamicData: r
|
|
136
136
|
} = o.formProps;
|
|
@@ -143,356 +143,356 @@ const Ce = Q({
|
|
|
143
143
|
...o.formModel
|
|
144
144
|
},
|
|
145
145
|
schema: o.schema,
|
|
146
|
-
elRef:
|
|
146
|
+
elRef: V
|
|
147
147
|
};
|
|
148
|
-
}),
|
|
148
|
+
}), T = j(() => {
|
|
149
149
|
let {
|
|
150
150
|
componentProps: r = {}
|
|
151
151
|
} = o.schema;
|
|
152
|
-
|
|
152
|
+
C(r) && (r = r({
|
|
153
153
|
schema: o.schema,
|
|
154
154
|
formModel: o.formModel,
|
|
155
155
|
formActionType: o.formActionType
|
|
156
156
|
}) ?? {});
|
|
157
|
-
const t = /* @__PURE__ */ new Map([[e.
|
|
157
|
+
const t = /* @__PURE__ */ new Map([[e.Divider, {
|
|
158
158
|
type: "horizontal"
|
|
159
|
-
}], [e.
|
|
159
|
+
}], [e.Textarea, {
|
|
160
160
|
type: "textarea"
|
|
161
|
-
}], [e.
|
|
161
|
+
}], [e.Password, {
|
|
162
162
|
type: "password",
|
|
163
163
|
"show-password": !0
|
|
164
|
-
}], [e.
|
|
164
|
+
}], [e.InputNumber, {
|
|
165
165
|
type: "number"
|
|
166
|
-
}], [e.
|
|
166
|
+
}], [e.CheckboxButton, {
|
|
167
167
|
useButton: !0
|
|
168
|
-
}], [e.
|
|
168
|
+
}], [e.RadioButton, {
|
|
169
169
|
useButton: !0
|
|
170
|
-
}], [e.
|
|
171
|
-
type: e.
|
|
172
|
-
}], [e.
|
|
173
|
-
type: e.
|
|
174
|
-
}], [e.
|
|
175
|
-
type: e.
|
|
176
|
-
}], [e.
|
|
177
|
-
type: e.
|
|
178
|
-
}], [e.
|
|
179
|
-
type: e.
|
|
180
|
-
}], [e.
|
|
181
|
-
type: e.
|
|
182
|
-
}], [e.
|
|
183
|
-
type: e.
|
|
170
|
+
}], [e.YearPicker, {
|
|
171
|
+
type: e.YearPicker
|
|
172
|
+
}], [e.MonthPicker, {
|
|
173
|
+
type: e.MonthPicker
|
|
174
|
+
}], [e.DatePicker, {
|
|
175
|
+
type: e.DatePicker
|
|
176
|
+
}], [e.DatesPicker, {
|
|
177
|
+
type: e.DatesPicker
|
|
178
|
+
}], [e.DateTimePicker, {
|
|
179
|
+
type: e.DateTimePicker
|
|
180
|
+
}], [e.WeekPicker, {
|
|
181
|
+
type: e.WeekPicker
|
|
182
|
+
}], [e.TimeRangePicker, {
|
|
183
|
+
type: e.TimePicker,
|
|
184
184
|
"is-range": !0,
|
|
185
185
|
"start-placeholder": "开始时间",
|
|
186
186
|
"end-placeholder": "结束时间"
|
|
187
|
-
}], [e.
|
|
188
|
-
type: e.
|
|
187
|
+
}], [e.DateTimeRangePicker, {
|
|
188
|
+
type: e.DateTimeRangePicker,
|
|
189
189
|
"start-placeholder": "开始日期",
|
|
190
190
|
"end-placeholder": "结束日期"
|
|
191
|
-
}], [e.
|
|
192
|
-
type: e.
|
|
191
|
+
}], [e.DateRangePicker, {
|
|
192
|
+
type: e.DateRangePicker,
|
|
193
193
|
"start-placeholder": "开始日期",
|
|
194
194
|
"end-placeholder": "结束日期"
|
|
195
|
-
}], [e.
|
|
196
|
-
type: e.
|
|
195
|
+
}], [e.MonthRangePicker, {
|
|
196
|
+
type: e.MonthRangePicker,
|
|
197
197
|
"start-placeholder": "开始月份",
|
|
198
198
|
"end-placeholder": "结束月份"
|
|
199
199
|
}]]);
|
|
200
|
-
return t.has(o.schema.type) && (r = Object.assign(t.get(o.schema.type) || {}, r)), o.formProps.inputMaxLength && [e.
|
|
201
|
-
}), Z =
|
|
200
|
+
return t.has(o.schema.type) && (r = Object.assign(t.get(o.schema.type) || {}, r)), o.formProps.inputMaxLength && [e.Input].includes(o.schema.type) && !r?.maxlength && (r.maxlength = o.formProps.inputMaxLength), r;
|
|
201
|
+
}), Z = j(() => {
|
|
202
202
|
const {
|
|
203
203
|
disabled: r
|
|
204
204
|
} = o.formProps, {
|
|
205
205
|
dynamicDisabled: t
|
|
206
206
|
} = o.schema, {
|
|
207
207
|
disabled: m = !1
|
|
208
|
-
} = c(
|
|
209
|
-
let
|
|
210
|
-
return
|
|
208
|
+
} = c(T);
|
|
209
|
+
let s = !!r || m;
|
|
210
|
+
return $(t) && (s = t), C(t) && (s = t(c(y))), s;
|
|
211
211
|
});
|
|
212
|
-
function
|
|
212
|
+
function U() {
|
|
213
213
|
const {
|
|
214
214
|
show: r,
|
|
215
215
|
ifShow: t
|
|
216
216
|
} = o.schema;
|
|
217
|
-
let m = !0,
|
|
218
|
-
return
|
|
217
|
+
let m = !0, s = !0;
|
|
218
|
+
return $(r) && (m = r), $(t) && (s = t), C(r) && (m = r(c(y))), C(t) && (s = t(c(y))), {
|
|
219
219
|
isShow: m,
|
|
220
|
-
isIfShow:
|
|
220
|
+
isIfShow: s
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
function _() {
|
|
224
224
|
const {
|
|
225
225
|
rules: r = [],
|
|
226
|
-
type: t = e.
|
|
226
|
+
type: t = e.Input,
|
|
227
227
|
rulesMessageJoinLabel: m,
|
|
228
|
-
label:
|
|
228
|
+
label: s,
|
|
229
229
|
title: P,
|
|
230
230
|
dynamicRule: u,
|
|
231
231
|
required: h,
|
|
232
|
-
dynamicRuleAdd:
|
|
233
|
-
} = o.schema, p =
|
|
234
|
-
if (
|
|
235
|
-
return u(c(
|
|
236
|
-
let i =
|
|
232
|
+
dynamicRuleAdd: d = !0
|
|
233
|
+
} = o.schema, p = s || P;
|
|
234
|
+
if (C(u) && !d)
|
|
235
|
+
return u(c(y));
|
|
236
|
+
let i = ae(Y(r) ? r : [r]);
|
|
237
237
|
const {
|
|
238
|
-
rulesMessageJoinLabel:
|
|
239
|
-
} = o.formProps,
|
|
238
|
+
rulesMessageJoinLabel: k
|
|
239
|
+
} = o.formProps, S = Reflect.has(o.schema, "rulesMessageJoinLabel") ? m : k, I = G(t, `${S ? p : ""}`);
|
|
240
240
|
function M(n, l) {
|
|
241
|
-
const
|
|
242
|
-
return l === void 0 ||
|
|
241
|
+
const A = n.message || I;
|
|
242
|
+
return l === void 0 || se(l) || t === e.CheckboxSingle && !l || Array.isArray(l) && l.length === 0 || typeof l == "string" && l.trim() === "" || typeof l == "object" && Reflect.has(l, "checked") && Reflect.has(l, "halfChecked") && Array.isArray(l.checked) && Array.isArray(l.halfChecked) && l.checked.length === 0 && l.halfChecked.length === 0 ? Promise.reject(A) : Promise.resolve();
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
required:
|
|
244
|
+
const f = C(h) ? h(c(y)) : h, R = [e.Radio, e.Select, e.Radio, e.RadioSingle, e.RadioButton, e.Checkbox, e.CheckboxSingle, e.CheckboxButton, e.AutoComplete, e.Cascader, e.ColorPicker, e.Upload, e.Slider].includes(t);
|
|
245
|
+
f && (!i || i.length === 0 ? i = [{
|
|
246
|
+
required: f,
|
|
247
247
|
validator: M,
|
|
248
|
-
trigger:
|
|
248
|
+
trigger: R ? "change" : "blur"
|
|
249
249
|
}] : i.findIndex((l) => Reflect.has(l, "required")) === -1 && i.unshift({
|
|
250
|
-
required:
|
|
250
|
+
required: f,
|
|
251
251
|
validator: M,
|
|
252
|
-
trigger:
|
|
252
|
+
trigger: R ? "change" : "blur"
|
|
253
253
|
}));
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
const n = i[
|
|
254
|
+
const v = i.findIndex((n) => Reflect.has(n, "required") && !Reflect.has(n, "validator"));
|
|
255
|
+
if (v !== -1) {
|
|
256
|
+
const n = i[v], {
|
|
257
257
|
isShow: l
|
|
258
|
-
} =
|
|
259
|
-
l || (n.required = !1), t && (n.message = n.message ||
|
|
258
|
+
} = U();
|
|
259
|
+
l || (n.required = !1), t && (n.message = n.message || I);
|
|
260
260
|
}
|
|
261
|
-
const
|
|
262
|
-
function
|
|
263
|
-
const
|
|
264
|
-
return ["min", "all"].includes(
|
|
261
|
+
const g = i.findIndex((n) => n.min), b = i.findIndex((n) => n.max);
|
|
262
|
+
function x(n, l, A = "all") {
|
|
263
|
+
const L = i[l], E = L.isNumber ? isNaN(n) ? n?.length || 0 : Number(n) : n?.length || 0;
|
|
264
|
+
return ["min", "all"].includes(A) && E < L.min ? Promise.reject(`${p}至少为${L.min}位`) : ["max", "all"].includes(A) && E > L.max ? Promise.reject(`${p}最多${L.max}位`) : Promise.resolve();
|
|
265
265
|
}
|
|
266
|
-
(
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
let n = u(c(
|
|
270
|
-
n =
|
|
266
|
+
(g !== -1 || b !== -1) && (g !== -1 && b !== -1 && !i[g].validator && !i[g].message ? i[g].validator = (n, l) => x(l, g) : g !== -1 && !i[g].validator && !i[g].message ? i[g].validator = (n, l) => x(l, g, "min") : b !== -1 && !i[b].validator && !i[b].message && (i[b].validator = (n, l) => x(l, b, "max")));
|
|
267
|
+
const D = i.findIndex((n) => n.len);
|
|
268
|
+
if (D !== -1 && (i[D].validator = (n, l) => l.length !== i[D].len ? Promise.reject(`${p}必须是${i[D].len}位`) : Promise.resolve()), C(u) && d) {
|
|
269
|
+
let n = u(c(y));
|
|
270
|
+
n = Y(n) ? n : [n], i = i.concat(n);
|
|
271
271
|
}
|
|
272
272
|
return i;
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const V = re(), ee = () => {
|
|
275
275
|
const {
|
|
276
276
|
renderComponentContent: r,
|
|
277
|
-
type: t = e.
|
|
277
|
+
type: t = e.Input,
|
|
278
278
|
field: m,
|
|
279
|
-
changeEvent:
|
|
279
|
+
changeEvent: s = "change",
|
|
280
280
|
valueField: P,
|
|
281
281
|
label: u,
|
|
282
282
|
title: h,
|
|
283
|
-
placeholderJoinLabel:
|
|
283
|
+
placeholderJoinLabel: d = !0
|
|
284
284
|
} = o.schema;
|
|
285
|
-
let p =
|
|
286
|
-
|
|
287
|
-
const i = `on${me(p)}`,
|
|
288
|
-
[i]: (...
|
|
289
|
-
const [
|
|
290
|
-
|
|
291
|
-
const n =
|
|
285
|
+
let p = s;
|
|
286
|
+
ge(t) ? p = "input" : Pe(t) || t === e.TimePicker || [e.InputTag, e.AutoComplete, e.Cascader, e.ColorPicker, e.Slider].includes(t) ? p = "update:modelValue" : t === e.Upload && (p = "update:fileList");
|
|
287
|
+
const i = `on${me(p)}`, k = {
|
|
288
|
+
[i]: (...x) => {
|
|
289
|
+
const [D] = x;
|
|
290
|
+
f[i] && f[i](...x);
|
|
291
|
+
const n = D ? D.target : null, l = n ? n.value : D;
|
|
292
292
|
o.setFormModel(m, l, o.schema);
|
|
293
293
|
}
|
|
294
|
-
},
|
|
295
|
-
autoSetPlaceHolder:
|
|
294
|
+
}, S = Q(t), {
|
|
295
|
+
autoSetPlaceHolder: I,
|
|
296
296
|
size: M
|
|
297
|
-
} = o.formProps,
|
|
297
|
+
} = o.formProps, f = {
|
|
298
298
|
clearable: !0,
|
|
299
|
-
...c(
|
|
299
|
+
...c(T)
|
|
300
300
|
};
|
|
301
|
-
if ([e.
|
|
302
|
-
const
|
|
303
|
-
|
|
301
|
+
if ([e.Search].includes(t) || (f.size = c(T)?.size || M, f.disabled = c(Z)), !f.disabled && I && !he(t) && t) {
|
|
302
|
+
const x = u || h;
|
|
303
|
+
f.placeholder = c(T)?.placeholder || G(t, d && ce(x) ? x : "");
|
|
304
304
|
}
|
|
305
|
-
const
|
|
305
|
+
const v = {
|
|
306
306
|
[P || "model-value"]: o.formModel[m]
|
|
307
|
-
},
|
|
308
|
-
...
|
|
309
|
-
...
|
|
310
|
-
...
|
|
307
|
+
}, g = {
|
|
308
|
+
...k,
|
|
309
|
+
...f,
|
|
310
|
+
...v
|
|
311
311
|
};
|
|
312
312
|
if (!r && t !== e.Upload)
|
|
313
|
-
return
|
|
314
|
-
ref:
|
|
315
|
-
},
|
|
316
|
-
let
|
|
317
|
-
if (
|
|
313
|
+
return a(S, q({
|
|
314
|
+
ref: V
|
|
315
|
+
}, g), null);
|
|
316
|
+
let b;
|
|
317
|
+
if (b = C(r) ? {
|
|
318
318
|
...r({
|
|
319
|
-
...c(
|
|
320
|
-
elRef:
|
|
319
|
+
...c(y),
|
|
320
|
+
elRef: V
|
|
321
321
|
})
|
|
322
322
|
} : {
|
|
323
323
|
default: () => r
|
|
324
324
|
}, t === e.Upload && !r) {
|
|
325
325
|
const {
|
|
326
|
-
drag:
|
|
327
|
-
} = c(
|
|
328
|
-
|
|
329
|
-
default: () =>
|
|
326
|
+
drag: x
|
|
327
|
+
} = c(T);
|
|
328
|
+
b = x ? {
|
|
329
|
+
default: () => a(N("vft-icon"), {
|
|
330
330
|
icon: "icon-arrow-upload"
|
|
331
331
|
}, null)
|
|
332
332
|
} : {
|
|
333
|
-
default: () =>
|
|
333
|
+
default: () => a(N("vft-button"), {
|
|
334
334
|
type: "primary"
|
|
335
335
|
}, {
|
|
336
|
-
default: () => [
|
|
336
|
+
default: () => [a(N("vft-icon"), {
|
|
337
337
|
icon: "icon-arrow-upload"
|
|
338
338
|
}, null)]
|
|
339
339
|
})
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
return
|
|
343
|
-
ref:
|
|
344
|
-
},
|
|
345
|
-
default: () => [
|
|
342
|
+
return a(S, q({
|
|
343
|
+
ref: V
|
|
344
|
+
}, g), B(b) ? b : {
|
|
345
|
+
default: () => [b]
|
|
346
346
|
});
|
|
347
347
|
};
|
|
348
|
-
function
|
|
348
|
+
function F() {
|
|
349
349
|
const {
|
|
350
350
|
showLabel: r = !0,
|
|
351
351
|
label: t,
|
|
352
352
|
title: m,
|
|
353
|
-
subLabel:
|
|
353
|
+
subLabel: s,
|
|
354
354
|
labelRequired: P,
|
|
355
355
|
helpIcon: u,
|
|
356
356
|
helpTooltip: h
|
|
357
357
|
} = o.schema;
|
|
358
|
-
let
|
|
359
|
-
|
|
358
|
+
let d = t || m;
|
|
359
|
+
d = P ? a("span", null, [a("span", {
|
|
360
360
|
class: "label-required"
|
|
361
|
-
}, [
|
|
361
|
+
}, [O("*")]), a("span", null, [d])]) : d;
|
|
362
362
|
const p = () => {
|
|
363
363
|
if (!u && !h) return null;
|
|
364
|
-
const i =
|
|
364
|
+
const i = j(() => W(u, "icon", {
|
|
365
365
|
size: 20,
|
|
366
366
|
pointer: !0,
|
|
367
367
|
icon: "icon-help"
|
|
368
368
|
}));
|
|
369
369
|
if (h) {
|
|
370
|
-
const
|
|
370
|
+
const k = j(() => W(h, "content", {
|
|
371
371
|
placement: "right-start"
|
|
372
372
|
}));
|
|
373
|
-
return
|
|
373
|
+
return a(de, q({
|
|
374
374
|
className: "box-item"
|
|
375
|
-
},
|
|
376
|
-
default: () => [
|
|
375
|
+
}, k.value), {
|
|
376
|
+
default: () => [a(K, i.value, null)]
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
|
-
return
|
|
379
|
+
return a(K, i.value, null);
|
|
380
380
|
};
|
|
381
|
-
return r &&
|
|
381
|
+
return r && d ? s ? a("div", {
|
|
382
382
|
class: "label-content"
|
|
383
|
-
}, [
|
|
383
|
+
}, [a("div", null, [d, O(" "), a("span", {
|
|
384
384
|
class: "sub-label"
|
|
385
|
-
}, [
|
|
385
|
+
}, [s])]), p()]) : a("div", {
|
|
386
386
|
class: "label-content"
|
|
387
|
-
}, [
|
|
387
|
+
}, [a("div", null, [d]), p()]) : void 0;
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
function
|
|
389
|
+
const z = oe();
|
|
390
|
+
function J(r, t = "default", m) {
|
|
391
391
|
if (!r || !Reflect.has(r, t))
|
|
392
392
|
return null;
|
|
393
|
-
if (!
|
|
393
|
+
if (!C(r[t]))
|
|
394
394
|
return console.error(`${t} is not a function!`), null;
|
|
395
|
-
const
|
|
396
|
-
return
|
|
395
|
+
const s = r[t];
|
|
396
|
+
return s ? s(m) : null;
|
|
397
397
|
}
|
|
398
398
|
function te() {
|
|
399
399
|
const {
|
|
400
400
|
itemProps: r,
|
|
401
401
|
slot: t,
|
|
402
402
|
render: m,
|
|
403
|
-
field:
|
|
403
|
+
field: s,
|
|
404
404
|
suffix: P,
|
|
405
405
|
prefix: u,
|
|
406
406
|
prefixParentStyle: h
|
|
407
407
|
} = o.schema, {
|
|
408
|
-
autoCleanErrorMessage:
|
|
408
|
+
autoCleanErrorMessage: d,
|
|
409
409
|
compFullWidth: p
|
|
410
|
-
} = o.formProps, i = () => t ?
|
|
410
|
+
} = o.formProps, i = () => t ? J(z, t, c(y)) : m ? m(c(y)) : ee(), k = !!P, S = !!u, I = C(P) ? P(c(y)) : P, M = C(u) ? u(c(y)) : u, f = () => {
|
|
411
411
|
o.updateSchema([{
|
|
412
|
-
field:
|
|
412
|
+
field: s,
|
|
413
413
|
itemProps: {
|
|
414
414
|
error: ""
|
|
415
415
|
}
|
|
416
416
|
}]);
|
|
417
|
-
},
|
|
417
|
+
}, R = () => a(ue, q({
|
|
418
418
|
style: {
|
|
419
419
|
marginRight: o.formProps.customLayout ? "10px" : 0
|
|
420
420
|
},
|
|
421
|
-
prop:
|
|
421
|
+
prop: s,
|
|
422
422
|
class: [{
|
|
423
|
-
[
|
|
423
|
+
[w.is("suffix")]: k
|
|
424
424
|
}, {
|
|
425
|
-
[
|
|
426
|
-
},
|
|
425
|
+
[w.is("comp-full-width")]: p
|
|
426
|
+
}, w.e("item")]
|
|
427
427
|
}, r, {
|
|
428
428
|
label: r?.label || r?.title,
|
|
429
|
-
"onUpdate:error":
|
|
429
|
+
"onUpdate:error": d ? f : () => {
|
|
430
430
|
},
|
|
431
431
|
rules: _()
|
|
432
432
|
}), {
|
|
433
|
-
default: () => [
|
|
434
|
-
class:
|
|
435
|
-
}, [
|
|
436
|
-
class:
|
|
437
|
-
}, [i(),
|
|
438
|
-
class:
|
|
439
|
-
}, [
|
|
440
|
-
label:
|
|
433
|
+
default: () => [a("div", {
|
|
434
|
+
class: w.e("container")
|
|
435
|
+
}, [a("div", {
|
|
436
|
+
class: w.e("content")
|
|
437
|
+
}, [i(), k && a("span", {
|
|
438
|
+
class: w.m("suffix")
|
|
439
|
+
}, [I])])])],
|
|
440
|
+
label: F() ? () => F() : void 0
|
|
441
441
|
});
|
|
442
|
-
return
|
|
442
|
+
return S ? a("div", {
|
|
443
443
|
style: h
|
|
444
|
-
}, [
|
|
445
|
-
class:
|
|
446
|
-
}, [M]),
|
|
444
|
+
}, [a("span", {
|
|
445
|
+
class: w.m("prefix")
|
|
446
|
+
}, [M]), R()]) : R();
|
|
447
447
|
}
|
|
448
448
|
return () => {
|
|
449
449
|
let r;
|
|
450
450
|
const {
|
|
451
451
|
colProps: t = {},
|
|
452
452
|
colSlot: m,
|
|
453
|
-
renderColContent:
|
|
454
|
-
type: P = e.
|
|
453
|
+
renderColContent: s,
|
|
454
|
+
type: P = e.Input,
|
|
455
455
|
render: u,
|
|
456
456
|
quickColSpan: h
|
|
457
457
|
} = o.schema;
|
|
458
|
-
if (
|
|
458
|
+
if (!Q(P) && !s && !u)
|
|
459
459
|
return null;
|
|
460
460
|
const {
|
|
461
|
-
baseColProps:
|
|
461
|
+
baseColProps: d = {},
|
|
462
462
|
quickColSpan: p
|
|
463
463
|
} = o.formProps, i = p ? {
|
|
464
464
|
span: Math.ceil(24 / p),
|
|
465
|
-
...
|
|
465
|
+
...d
|
|
466
466
|
} : {
|
|
467
|
-
...
|
|
468
|
-
},
|
|
467
|
+
...d
|
|
468
|
+
}, k = h ? {
|
|
469
469
|
span: Math.ceil(24 / h),
|
|
470
470
|
...t
|
|
471
471
|
} : {
|
|
472
472
|
...t
|
|
473
|
-
},
|
|
473
|
+
}, S = {
|
|
474
474
|
...i,
|
|
475
|
-
...
|
|
475
|
+
...k
|
|
476
476
|
}, {
|
|
477
|
-
isIfShow:
|
|
477
|
+
isIfShow: I,
|
|
478
478
|
isShow: M
|
|
479
|
-
} =
|
|
480
|
-
if (P === e.
|
|
481
|
-
let
|
|
482
|
-
return
|
|
479
|
+
} = U(), f = c(y), R = () => m ? J(z, m, f) : s ? s(f) : te();
|
|
480
|
+
if (P === e.Divider) {
|
|
481
|
+
let v;
|
|
482
|
+
return a(H, q({
|
|
483
483
|
span: 24
|
|
484
|
-
},
|
|
485
|
-
default: () => [
|
|
486
|
-
default: () => [
|
|
484
|
+
}, k), {
|
|
485
|
+
default: () => [a(pe, c(T), B(v = F()) ? v : {
|
|
486
|
+
default: () => [v]
|
|
487
487
|
})]
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
return
|
|
490
|
+
return I && (o.formProps.customLayout ? R() : ie(a(H, S, B(r = R()) ? r : {
|
|
491
491
|
default: () => [r]
|
|
492
492
|
}), [[ne, M]]));
|
|
493
493
|
};
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
export {
|
|
497
|
-
|
|
497
|
+
Ir as default
|
|
498
498
|
};
|