@web-utils/form-ui 1.0.0-beta36 → 1.0.0-beta37
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/chunks/{iWQD3xvX.mjs → B17LMtNG.mjs} +11 -16
- package/chunks/{DFsI7Y6h.mjs → B2HO8aAj.mjs} +11 -11
- package/chunks/{axr9InkL.mjs → BC0gfvsl.mjs} +9 -13
- package/chunks/{DQxPzCsy.mjs → BMAsNnWL.mjs} +11 -15
- package/chunks/{DQJyNm1V.mjs → Bd1UFJic.mjs} +135 -131
- package/chunks/{D5_ctQqL.mjs → BeBtvo7Q.mjs} +1 -1
- package/chunks/{Cr1vBYne.mjs → BeyC-b9n.mjs} +12 -15
- package/chunks/{A3sHIRQ_.mjs → BiIR7j9T.mjs} +15 -42
- package/chunks/{_dm2lLNL.mjs → BrXlRZbl.mjs} +2 -2
- package/chunks/{BTS_zTkz.mjs → BufIRDd0.mjs} +35 -39
- package/chunks/{Buc52aVh.mjs → Byr79NWq.mjs} +11 -29
- package/chunks/{BLWwTutr.mjs → C81uwgZb.mjs} +14 -33
- package/chunks/{CNskrN5I.mjs → C95McWbI.mjs} +2 -2
- package/chunks/CE8bze--.mjs +231 -0
- package/chunks/{DcbnHU8K.mjs → CGmMqCP6.mjs} +19 -23
- package/chunks/{D7hD-ppq.mjs → CRrdgtwT.mjs} +1 -1
- package/chunks/{DistOy_O.mjs → CUvhHVXq.mjs} +27 -19
- package/chunks/{DJKE5P39.mjs → CZ6kuiWf.mjs} +2 -2
- package/chunks/{Dgyjc3LT.mjs → Cab-ZjRx.mjs} +29 -45
- package/chunks/{ZXCLnZFa.mjs → Ce5K-XbN.mjs} +111 -144
- package/chunks/{CLn0r4lV.mjs → CszLlvRH.mjs} +15 -17
- package/chunks/{CGJkMYZ4.mjs → D0M61zlJ.mjs} +11 -20
- package/chunks/DjX-fB-E.mjs +35 -0
- package/chunks/{BwdWZEjT.mjs → DkXSvAFI.mjs} +12 -18
- package/chunks/{DQKi5eEl.mjs → XqRTtFfp.mjs} +2 -2
- package/chunks/{BX-cVxlK.mjs → cmuHpsX6.mjs} +21 -14
- package/chunks/{1cDNhlSV.mjs → h0Y7oZ-O.mjs} +2 -2
- package/editable-tree/index.d.ts +1 -1
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.d.ts +1 -1
- package/element-dialog/index.mjs +1 -1
- package/form-cascader/index.d.ts +0 -14
- package/form-cascader/index.mjs +1 -1
- package/form-check-box-group/index.d.ts +0 -2
- package/form-check-box-group/index.mjs +1 -1
- package/form-checkbox/index.d.ts +36 -10
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +2 -6
- package/form-holder/index.mjs +1 -1
- package/form-image/index.d.ts +2 -14
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +0 -24
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +0 -6
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.d.ts +0 -2
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +0 -2
- package/form-rate/index.mjs +1 -1
- package/form-select/index.d.ts +0 -14
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +0 -4
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +0 -2
- package/form-switch/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/helper/dictionary.mjs +1 -1
- package/iframe-window/index.mjs +1 -1
- package/index.mjs +25 -25
- package/package.json +1 -1
- package/pageable-table/index.d.ts +0 -38
- package/pageable-table/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-view/index.mjs +6 -6
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/web-types.json +1 -1
- package/chunks/BLRY0zkF.mjs +0 -51
- package/chunks/BvsmTC3G.mjs +0 -229
package/chunks/BLRY0zkF.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { u as e } from "./BX-cVxlK.mjs";
|
|
2
|
-
import { o as t, r as n } from "./BvsmTC3G.mjs";
|
|
3
|
-
import { n as r } from "./D7hD-ppq.mjs";
|
|
4
|
-
import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
|
|
5
|
-
import { ElImage as s } from "element-plus/es";
|
|
6
|
-
//#region src/components/form/props/image.ts
|
|
7
|
-
var c = {
|
|
8
|
-
...r,
|
|
9
|
-
src: String,
|
|
10
|
-
fit: String,
|
|
11
|
-
hideOnClickModal: Boolean
|
|
12
|
-
}, l = { modelValue: !0 }, u = [
|
|
13
|
-
"load",
|
|
14
|
-
"error",
|
|
15
|
-
"switch",
|
|
16
|
-
"close",
|
|
17
|
-
"show"
|
|
18
|
-
], d = (e) => r[e] === void 0 && l[e] !== !0;
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
|
|
21
|
-
function f(e) {
|
|
22
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/components/form/FormImage.vue
|
|
26
|
-
var p = {
|
|
27
|
-
name: "FormImage",
|
|
28
|
-
inheritAttrs: !1,
|
|
29
|
-
props: { ...c },
|
|
30
|
-
emits: {
|
|
31
|
-
load: null,
|
|
32
|
-
error: null,
|
|
33
|
-
switch: null,
|
|
34
|
-
close: null,
|
|
35
|
-
show: null
|
|
36
|
-
},
|
|
37
|
-
setup(r, { slots: a, attrs: c, emit: l }) {
|
|
38
|
-
let p = t(r, { attrs: c }), m = e(r, {
|
|
39
|
-
events: u,
|
|
40
|
-
predicate: d,
|
|
41
|
-
emit: l
|
|
42
|
-
});
|
|
43
|
-
return () => n(r, {
|
|
44
|
-
vNodes: i(s, o(m.value, c, { "preview-src-list": [r.src] }), f(a) ? a : { default: () => [a] }),
|
|
45
|
-
formItemProps: p,
|
|
46
|
-
slots: a
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
//#endregion
|
|
51
|
-
export { p as t };
|
package/chunks/BvsmTC3G.mjs
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { a as e } from "./BX-cVxlK.mjs";
|
|
2
|
-
import { formHolderContextKey as t, formItemConfigProviderContextKey as n, formItemGroupContextKey as r } from "../constants/index.mjs";
|
|
3
|
-
import { isArray as i, isPlainObject as a, isString as o } from "@web-utils/core";
|
|
4
|
-
import { computed as s, createVNode as c, h as l, inject as u, mergeProps as d, nextTick as f, unref as p, useTemplateRef as m } from "vue";
|
|
5
|
-
import { ElCol as h, rowContextKey as g } from "element-plus";
|
|
6
|
-
import { ElCol as _, ElFormItem as v, ElTooltip as y } from "element-plus/es";
|
|
7
|
-
//#region src/components/form/props/form-item.ts
|
|
8
|
-
var b = {
|
|
9
|
-
prop: [String, Array],
|
|
10
|
-
label: String,
|
|
11
|
-
labelPosition: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: ""
|
|
14
|
-
},
|
|
15
|
-
labelWidth: [String, Number],
|
|
16
|
-
required: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !1
|
|
19
|
-
},
|
|
20
|
-
rules: Object,
|
|
21
|
-
error: String,
|
|
22
|
-
showMessage: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: !0
|
|
25
|
-
},
|
|
26
|
-
inlineMessage: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: !1
|
|
29
|
-
},
|
|
30
|
-
size: String,
|
|
31
|
-
for: String,
|
|
32
|
-
validateStatus: String,
|
|
33
|
-
messagePrefix: String,
|
|
34
|
-
message: String,
|
|
35
|
-
wrapCol: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: !0
|
|
38
|
-
},
|
|
39
|
-
fixedSpan: Number,
|
|
40
|
-
block: Boolean,
|
|
41
|
-
unwrap: Boolean,
|
|
42
|
-
half: Boolean,
|
|
43
|
-
formItemClass: String,
|
|
44
|
-
hideLabel: Boolean,
|
|
45
|
-
tips: { type: String },
|
|
46
|
-
tipsAfterLabel: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: !1
|
|
49
|
-
},
|
|
50
|
-
labelColspan: [Number, String],
|
|
51
|
-
inputColspan: [Number, String],
|
|
52
|
-
labelRowspan: [Number, String],
|
|
53
|
-
inputRowspan: [Number, String]
|
|
54
|
-
}, x = {
|
|
55
|
-
required: !0,
|
|
56
|
-
rules: !0,
|
|
57
|
-
messagePrefix: !0,
|
|
58
|
-
message: !0,
|
|
59
|
-
wrapCol: !0,
|
|
60
|
-
fixedSpan: !0,
|
|
61
|
-
block: !0,
|
|
62
|
-
unwrap: !0,
|
|
63
|
-
half: !0,
|
|
64
|
-
formItemClass: !0,
|
|
65
|
-
hideLabel: !0,
|
|
66
|
-
tips: !0,
|
|
67
|
-
tipsAfterLabel: !0,
|
|
68
|
-
labelColspan: !0,
|
|
69
|
-
inputColspan: !0,
|
|
70
|
-
labelRowspan: !0,
|
|
71
|
-
inputRowspan: !0
|
|
72
|
-
}, S = (e) => b[e] !== void 0 && x[e] !== !0, C = (t, { emit: n, events: r, predicate: i }) => s(() => e(t, i, r, n)), w = {
|
|
73
|
-
span: {
|
|
74
|
-
type: Number,
|
|
75
|
-
default: 12
|
|
76
|
-
},
|
|
77
|
-
offset: {
|
|
78
|
-
type: Number,
|
|
79
|
-
default: 0
|
|
80
|
-
},
|
|
81
|
-
push: {
|
|
82
|
-
type: Number,
|
|
83
|
-
default: 0
|
|
84
|
-
},
|
|
85
|
-
pull: {
|
|
86
|
-
type: Number,
|
|
87
|
-
default: 0
|
|
88
|
-
},
|
|
89
|
-
xs: { type: [Number, Object] },
|
|
90
|
-
sm: { type: [Number, Object] },
|
|
91
|
-
md: { type: [Number, Object] },
|
|
92
|
-
lg: { type: [Number, Object] },
|
|
93
|
-
xl: { type: [Number, Object] },
|
|
94
|
-
tag: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: "div"
|
|
97
|
-
}
|
|
98
|
-
}, T = { span: !0 }, E = (e) => w[e] !== void 0 && T[e] !== !0, D = (t, { emit: n, events: r, predicate: i }) => s(() => e(t, i, r, n)), O = (e) => {
|
|
99
|
-
let n = u(t, null);
|
|
100
|
-
return s(() => e.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[e.prop]) === !0);
|
|
101
|
-
}, k = (e, t) => {
|
|
102
|
-
let n = p(t);
|
|
103
|
-
o(n) ? e.push(n) : i(n) ? e.push(...n) : a(n) && e.push(n);
|
|
104
|
-
}, A = (e, { rules: t, attrs: n, messagePrefix: r, message: i, ...a } = {}) => {
|
|
105
|
-
let o = O(e);
|
|
106
|
-
return s(() => {
|
|
107
|
-
let s = { message: i }, c = p(t);
|
|
108
|
-
Object.keys({
|
|
109
|
-
...b,
|
|
110
|
-
...w
|
|
111
|
-
}).forEach((t) => {
|
|
112
|
-
t === "rules" ? e[t] && c ? s[t] = [...e[t], ...c] : e[t] ? s[t] = e[t] : c && (s[t] = c) : t === "messagePrefix" ? s[t] = e.messagePrefix || r : s[t] = e[t];
|
|
113
|
-
});
|
|
114
|
-
let l = [];
|
|
115
|
-
return k(l, n == null ? void 0 : n.class), k(l, a == null ? void 0 : a.class), s.required = o.value, s.class = l, s.style = n == null ? void 0 : n.style, s;
|
|
116
|
-
});
|
|
117
|
-
}, j = {
|
|
118
|
-
name: "FormItemX",
|
|
119
|
-
inheritAttrs: !1,
|
|
120
|
-
props: {
|
|
121
|
-
...b,
|
|
122
|
-
...w
|
|
123
|
-
},
|
|
124
|
-
setup(e, { attrs: r, slots: i, expose: a }) {
|
|
125
|
-
let o = u(g, null), l = u(n, null), p = u(t, null), h = r.embed ? s(() => r.disabled) : N(e), b = C(e, { predicate: S }), x = D(e, { predicate: E }), w = s(() => (l == null ? void 0 : l.reactive) === !0 && l.block === !1 && e.fixedSpan === void 0 && !e.half), T = O(e), k = m("formItem"), A = s(() => (l == null ? void 0 : l.wrapCol) === !1 ? !1 : !!o && e.wrapCol), j = s(() => p != null && p.tableForm ? "" : l != null && l.block ? "100%" : e.half && A.value ? `calc(50% - ${o.gutter.value / 2}px)` : ""), M = s(() => (l == null ? void 0 : l.block) === !0 || e.block || e.half ? 24 : e.span), P = s(() => {
|
|
126
|
-
if (h.value) return [];
|
|
127
|
-
if (T.value) {
|
|
128
|
-
let t = {
|
|
129
|
-
required: !0,
|
|
130
|
-
message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
|
|
131
|
-
};
|
|
132
|
-
return e.rules ? [...e.rules, t] : [t];
|
|
133
|
-
}
|
|
134
|
-
return e.rules;
|
|
135
|
-
});
|
|
136
|
-
return a({
|
|
137
|
-
clearValidate: async () => {
|
|
138
|
-
var e;
|
|
139
|
-
await f(), (e = k.value) == null || e.clearValidate();
|
|
140
|
-
},
|
|
141
|
-
validate: async () => {
|
|
142
|
-
var e;
|
|
143
|
-
await f(), (e = k.value) == null || e.validate();
|
|
144
|
-
}
|
|
145
|
-
}), () => {
|
|
146
|
-
var t;
|
|
147
|
-
let n = i.tips || e.tips, a = n ? c(y, {
|
|
148
|
-
effect: "light",
|
|
149
|
-
content: e.tips,
|
|
150
|
-
offset: 4
|
|
151
|
-
}, {
|
|
152
|
-
default: () => c("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
153
|
-
content: i.tips ? i.tips : null
|
|
154
|
-
}) : null, o = c(v, d(b.value, r, {
|
|
155
|
-
ref: "formItem",
|
|
156
|
-
style: { width: j.value },
|
|
157
|
-
class: [
|
|
158
|
-
"form-item",
|
|
159
|
-
e.formItemClass,
|
|
160
|
-
{
|
|
161
|
-
"form-item-hide-label": e.hideLabel,
|
|
162
|
-
"with-tips": !e.tipsAfterLabel && n,
|
|
163
|
-
required: h.value === !1 && T.value
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
rules: P.value
|
|
167
|
-
}), {
|
|
168
|
-
...i,
|
|
169
|
-
default: () => {
|
|
170
|
-
var t;
|
|
171
|
-
return [(t = i.default) == null ? void 0 : t.call(i, {
|
|
172
|
-
disabled: h.value,
|
|
173
|
-
required: T.value
|
|
174
|
-
}), n && !e.tipsAfterLabel ? a : null];
|
|
175
|
-
},
|
|
176
|
-
label: () => [i.label ? i.label() : e.label, e.tipsAfterLabel ? a : null]
|
|
177
|
-
}), s = [o, (t = i.below) == null ? void 0 : t.call(i)];
|
|
178
|
-
return e.unwrap ? s : A.value ? c(_, d(x.value, w.value ? {
|
|
179
|
-
xs: 24,
|
|
180
|
-
sm: 12,
|
|
181
|
-
md: 12,
|
|
182
|
-
lg: 8,
|
|
183
|
-
xl: 6
|
|
184
|
-
} : {}, { span: M.value }), { default: () => s }) : o;
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
}, M = "update:modelValue", N = (e) => {
|
|
188
|
-
let n = u(t, null), i = u(r, null);
|
|
189
|
-
return s(() => {
|
|
190
|
-
if (e.disabled !== void 0) return e.disabled;
|
|
191
|
-
if (n) {
|
|
192
|
-
if (n.requiredFieldsMap[e.prop] === !0 || n.enabledFieldsMap[e.prop] === !0) return !1;
|
|
193
|
-
if (n.disabledFieldsMap[e.prop] === !0) return !0;
|
|
194
|
-
}
|
|
195
|
-
return (i == null ? void 0 : i.enabled) === !0 ? !1 : (i == null ? void 0 : i.disabled) === !0 ? !0 : (n == null ? void 0 : n.disabled) === !0;
|
|
196
|
-
});
|
|
197
|
-
}, P = { [M]: null }, F = (e, t) => e(M, t), I = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? l(j, {
|
|
198
|
-
...n.value,
|
|
199
|
-
embed: !0,
|
|
200
|
-
disabled: i == null ? void 0 : i.value
|
|
201
|
-
}, {
|
|
202
|
-
default: () => t,
|
|
203
|
-
label: r.label,
|
|
204
|
-
error: r.error,
|
|
205
|
-
tips: r.tips,
|
|
206
|
-
below: r.below
|
|
207
|
-
}) : t, L = (t, { emit: n, slots: r, attrs: i, rules: a, events: o, predicate: c, messagePrefix: u = "请输入", ...d }) => {
|
|
208
|
-
let f = N(t), p = s(() => f.value ? "" : `${u}${t.label}`), m = A(t, {
|
|
209
|
-
rules: a,
|
|
210
|
-
attrs: i,
|
|
211
|
-
message: p.value,
|
|
212
|
-
...d
|
|
213
|
-
}), g = (e) => F(n, e), _ = (e) => t.col ? l(h, { span: t.block ? 24 : t.span }, { default: () => e }) : e;
|
|
214
|
-
return {
|
|
215
|
-
emitInput: g,
|
|
216
|
-
render: ({ vNodes: e }) => I(t, {
|
|
217
|
-
vNodes: _(e),
|
|
218
|
-
formItemProps: m,
|
|
219
|
-
slots: r,
|
|
220
|
-
disabled: f
|
|
221
|
-
}),
|
|
222
|
-
placeholder: p,
|
|
223
|
-
disabled: f,
|
|
224
|
-
formItemProps: m,
|
|
225
|
-
autoBind: s(() => e(t, c, o, n))
|
|
226
|
-
};
|
|
227
|
-
}, R = (e) => e.icon ? l("i", { class: e.icon }) : null;
|
|
228
|
-
//#endregion
|
|
229
|
-
export { j as a, b as c, L as i, P as n, A as o, I as r, w as s, R as t };
|