@web-utils/form-ui 1.0.0-beta75 → 1.0.0-beta76
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/{CzA5Lt_l2.mjs → B-WTB0ce2.mjs} +1 -1
- package/chunks/{aG2VZRRm2.mjs → BLBHnUme2.mjs} +1 -1
- package/chunks/{CMyOgBni2.mjs → BM8snKHN2.mjs} +1 -1
- package/chunks/{nZTrOKQf2.mjs → BP_0cJ172.mjs} +66 -66
- package/chunks/{CEDZmNDG2.mjs → BTNnujZA2.mjs} +1 -1
- package/chunks/{BCI1maFm2.mjs → BaB0bq4I2.mjs} +1 -1
- package/chunks/{B2p5StJk2.mjs → BvlU_Z6D2.mjs} +1 -1
- package/chunks/C7rEqtOR.mjs +70 -0
- package/chunks/{BoXQg1h12.mjs → CF23xugU2.mjs} +2 -2
- package/chunks/{DS86zxjN2.mjs → CFKKwzh72.mjs} +2 -2
- package/chunks/{B5gBCT5G2.mjs → CI-pH-gR2.mjs} +1 -1
- package/chunks/{BA_en_FG2.mjs → CVM0lwn22.mjs} +1 -1
- package/chunks/{CizBLN6J2.mjs → CWaId08S2.mjs} +1 -1
- package/chunks/{Bh4XihEh.mjs → Cg6ahpHk.mjs} +1 -1
- package/chunks/{Cjxblk9N2.mjs → CpIXTVFU2.mjs} +2 -2
- package/chunks/{Dv-_PE3-.mjs → DLdsvozr.mjs} +2 -2
- package/chunks/{DCTK5oyK.mjs → DMDsZeqv.mjs} +1 -1
- package/chunks/{DjFlEzPM2.mjs → DNiq6hHj2.mjs} +3 -3
- package/chunks/{CfxgQ-wf2.mjs → DP7eF99m2.mjs} +1 -1
- package/chunks/{CstdEG9K2.mjs → DRXM1Mt22.mjs} +1 -1
- package/chunks/{Bp4VotK62.mjs → D_gR5ibl2.mjs} +2 -2
- package/chunks/{Cfz-cav7.mjs → Dgwcljur.mjs} +63 -41
- package/chunks/{_BhTD9wf.mjs → Dhdoa4M6.mjs} +1 -1
- package/chunks/{C_UxYEd72.mjs → Dje2xUVd2.mjs} +2 -2
- package/chunks/{BbO6NHlx2.mjs → DvkUImww2.mjs} +109 -109
- package/chunks/{VbE4wwJT2.mjs → kAaQhLJs2.mjs} +1 -1
- package/chunks/{CBsdczGQ.mjs → ohCkWdwS.mjs} +1 -1
- package/chunks/{C6AxHCkY2.mjs → x2jJ6cfy2.mjs} +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- 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.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/helper/input.d.ts +3 -1
- package/helper/input.mjs +1 -1
- package/helper/sub-table-plus.d.ts +1 -1
- package/index.mjs +29 -29
- package/package.json +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-view/index.mjs +1 -1
- package/tag-render/index.mjs +15 -16
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +36 -37
- package/chunks/UCeucUsB.mjs +0 -68
|
@@ -3,16 +3,15 @@ import { formItemProps as r, predicate as i, useFormItemAutoBind as a } from "..
|
|
|
3
3
|
import { colProps as o, predicate as s, useColAutoBind as c } from "../props/col.mjs";
|
|
4
4
|
import { formHolderContextKey as l, formItemConfigProviderContextKey as u, formItemGroupContextKey as d, formViewContextKey as f } from "../constants/index.mjs";
|
|
5
5
|
import { useFormItemProps as p, useRequired as m } from "../helper/form-item.mjs";
|
|
6
|
-
import { ElCol as h, ElFormItem as g, ElTooltip as _ } from "element-plus/es";
|
|
6
|
+
import { ElCol as h, ElFormItem as g, ElTooltip as _, rowContextKey as v } from "element-plus/es";
|
|
7
7
|
import "element-plus/es/components/base/style/css";
|
|
8
|
-
import { computed as
|
|
8
|
+
import { computed as y, createVNode as b, h as x, inject as S, mergeProps as C, toRef as w, useTemplateRef as T } from "vue";
|
|
9
9
|
import "element-plus/es/components/col/style/css";
|
|
10
10
|
import "element-plus/es/components/tooltip/style/css";
|
|
11
11
|
import "element-plus/es/components/form-item/style/css";
|
|
12
|
-
import { rowContextKey as E } from "element-plus";
|
|
13
12
|
//#endregion
|
|
14
13
|
//#region src/components/form/FormItemX.vue
|
|
15
|
-
var
|
|
14
|
+
var E = {
|
|
16
15
|
name: "FormItemX",
|
|
17
16
|
inheritAttrs: !1,
|
|
18
17
|
props: {
|
|
@@ -20,9 +19,9 @@ var D = {
|
|
|
20
19
|
...o
|
|
21
20
|
},
|
|
22
21
|
setup(e, { attrs: t, slots: n, expose: r }) {
|
|
23
|
-
let o =
|
|
22
|
+
let o = S(v, null), d = S(u, null), f = S(l, null), p = t.embed ? y(() => t.disabled) : O(e), x = a(e, { predicate: i }), w = c(e, { predicate: s }), E = y(() => (d == null ? void 0 : d.reactive) === !0 && d.block === !1 && e.fixedSpan === void 0 && !e.half), D = m(e), k = T("formItem"), A = y(() => (d == null ? void 0 : d.wrapCol) === !1 ? !1 : !!o && e.wrapCol), j = y(() => f != null && f.tableForm ? "" : d != null && d.block ? "100%" : e.half && A.value ? `calc(50% - ${o.gutter.value / 2}px)` : ""), M = y(() => (d == null ? void 0 : d.block) === !0 || e.block || e.half ? 24 : e.span), N = y(() => {
|
|
24
23
|
if (p.value) return [];
|
|
25
|
-
if (
|
|
24
|
+
if (D.value) {
|
|
26
25
|
let t = {
|
|
27
26
|
required: !0,
|
|
28
27
|
message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
|
|
@@ -32,59 +31,79 @@ var D = {
|
|
|
32
31
|
return e.rules;
|
|
33
32
|
});
|
|
34
33
|
return r({
|
|
35
|
-
clearValidate:
|
|
34
|
+
clearValidate: () => {
|
|
36
35
|
var e;
|
|
37
|
-
|
|
36
|
+
return (e = k.value) == null ? void 0 : e.clearValidate();
|
|
38
37
|
},
|
|
39
|
-
validate:
|
|
38
|
+
validate: () => {
|
|
40
39
|
var e;
|
|
41
|
-
|
|
42
|
-
}
|
|
40
|
+
return (e = k.value) == null ? void 0 : e.validate();
|
|
41
|
+
},
|
|
42
|
+
resetField: () => {
|
|
43
|
+
var e;
|
|
44
|
+
return (e = k.value) == null ? void 0 : e.resetField();
|
|
45
|
+
},
|
|
46
|
+
setInitialValue: () => {
|
|
47
|
+
var e;
|
|
48
|
+
return (e = k.value) == null ? void 0 : e.setInitialValue();
|
|
49
|
+
},
|
|
50
|
+
size: y(() => {
|
|
51
|
+
var e;
|
|
52
|
+
return (e = k.value) == null ? void 0 : e.size;
|
|
53
|
+
}),
|
|
54
|
+
validateMessage: y(() => {
|
|
55
|
+
var e;
|
|
56
|
+
return (e = k.value) == null ? void 0 : e.validateMessage;
|
|
57
|
+
}),
|
|
58
|
+
validateState: y(() => {
|
|
59
|
+
var e;
|
|
60
|
+
return (e = k.value) == null ? void 0 : e.validateState;
|
|
61
|
+
})
|
|
43
62
|
}), () => {
|
|
44
63
|
var r;
|
|
45
|
-
let i = n.tips || e.tips, a = i ?
|
|
64
|
+
let i = n.tips || e.tips, a = i ? b(_, {
|
|
46
65
|
effect: "light",
|
|
47
66
|
content: e.tips,
|
|
48
67
|
offset: 4
|
|
49
68
|
}, {
|
|
50
|
-
default: () =>
|
|
69
|
+
default: () => b("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
51
70
|
content: n.tips ? n.tips : null
|
|
52
|
-
}) : null, o =
|
|
71
|
+
}) : null, o = b(g, C(x.value, t, {
|
|
53
72
|
ref: "formItem",
|
|
54
|
-
style: { width:
|
|
73
|
+
style: { width: j.value },
|
|
55
74
|
class: [
|
|
56
75
|
"form-item",
|
|
57
76
|
e.formItemClass,
|
|
58
77
|
{
|
|
59
78
|
"form-item-hide-label": e.hideLabel,
|
|
60
79
|
"with-tips": !e.tipsAfterLabel && i,
|
|
61
|
-
required: p.value === !1 &&
|
|
80
|
+
required: p.value === !1 && D.value
|
|
62
81
|
}
|
|
63
82
|
],
|
|
64
|
-
rules:
|
|
83
|
+
rules: N.value
|
|
65
84
|
}), {
|
|
66
85
|
...n,
|
|
67
86
|
default: () => {
|
|
68
87
|
var t;
|
|
69
88
|
return [(t = n.default) == null ? void 0 : t.call(n, {
|
|
70
89
|
disabled: p.value,
|
|
71
|
-
required:
|
|
90
|
+
required: D.value
|
|
72
91
|
}), i && !e.tipsAfterLabel ? a : null];
|
|
73
92
|
},
|
|
74
93
|
label: () => [n.label ? n.label() : e.label, e.tipsAfterLabel ? a : null]
|
|
75
94
|
}), s = [o, (r = n.below) == null ? void 0 : r.call(n)];
|
|
76
|
-
return e.unwrap ? s :
|
|
95
|
+
return e.unwrap ? s : A.value ? b(h, C(w.value, E.value ? {
|
|
77
96
|
xs: 24,
|
|
78
97
|
sm: 12,
|
|
79
98
|
md: 12,
|
|
80
99
|
lg: 8,
|
|
81
100
|
xl: 6
|
|
82
|
-
} : {}, { span:
|
|
101
|
+
} : {}, { span: M.value }), { default: () => s }) : o;
|
|
83
102
|
};
|
|
84
103
|
}
|
|
85
|
-
},
|
|
86
|
-
let t =
|
|
87
|
-
return
|
|
104
|
+
}, D = "update:modelValue", O = (e) => {
|
|
105
|
+
let t = S(l, null), n = S(d, null);
|
|
106
|
+
return y(() => {
|
|
88
107
|
if (e.disabled !== void 0) return e.disabled;
|
|
89
108
|
if (t) {
|
|
90
109
|
if (t.requiredFieldsMap[e.prop] === !0 || t.enabledFieldsMap[e.prop] === !0) return !1;
|
|
@@ -92,18 +111,19 @@ var D = {
|
|
|
92
111
|
}
|
|
93
112
|
return (n == null ? void 0 : n.enabled) === !0 ? !1 : (n == null ? void 0 : n.disabled) === !0 ? !0 : (t == null ? void 0 : t.disabled) === !0;
|
|
94
113
|
});
|
|
95
|
-
},
|
|
114
|
+
}, k = { [D]: null }, A = (e, t) => e(D, t), j = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i, ref: a }) => e.wrapFormItem ? x(E, {
|
|
96
115
|
...n.value,
|
|
97
116
|
embed: !0,
|
|
98
|
-
disabled: i == null ? void 0 : i.value
|
|
117
|
+
disabled: i == null ? void 0 : i.value,
|
|
118
|
+
ref: a
|
|
99
119
|
}, {
|
|
100
120
|
default: () => t,
|
|
101
121
|
label: r.label,
|
|
102
122
|
error: r.error,
|
|
103
123
|
tips: r.tips,
|
|
104
124
|
below: r.below
|
|
105
|
-
}) : t,
|
|
106
|
-
let
|
|
125
|
+
}) : t, M = (r, { emit: i, slots: a, events: o, predicate: s, removeOn: c = !1, attrs: l, block: u, class: d, rules: m, messagePrefix: g = "请输入", extraFormItemProps: _ }) => {
|
|
126
|
+
let v = O(r), b = S(f, null), C = y(() => v.value || r.placeholder === !1 ? "" : r.placeholder === !0 ? `${g}${r.label}` : r.placeholder ?? `${g}${r.label}`), E = p(r, {
|
|
107
127
|
rules: m,
|
|
108
128
|
block: w(() => u === void 0 ? r.type === "textarea" && r.block === void 0 ? !0 : r.block : u),
|
|
109
129
|
attrs: l,
|
|
@@ -111,23 +131,25 @@ var D = {
|
|
|
111
131
|
message: C.value,
|
|
112
132
|
messagePrefix: g,
|
|
113
133
|
..._
|
|
114
|
-
}),
|
|
115
|
-
vNodes:
|
|
116
|
-
formItemProps:
|
|
134
|
+
}), D = (e) => A(i, e), k = (e) => r.col ? x(h, { span: r.block ? 24 : r.span }, { default: () => e }) : e, M = T("formItem"), N = ({ vNodes: e }) => j(r, {
|
|
135
|
+
vNodes: k(e),
|
|
136
|
+
formItemProps: E,
|
|
117
137
|
slots: a,
|
|
118
|
-
disabled:
|
|
119
|
-
|
|
138
|
+
disabled: v,
|
|
139
|
+
ref: "formItem"
|
|
140
|
+
}), P = y(() => n(r, s, o, i)), F = e({ removeOn: c });
|
|
120
141
|
return {
|
|
121
|
-
emitInput:
|
|
122
|
-
render:
|
|
142
|
+
emitInput: D,
|
|
143
|
+
render: N,
|
|
123
144
|
placeholder: C,
|
|
124
|
-
disabled:
|
|
125
|
-
formItemProps:
|
|
126
|
-
autoBind:
|
|
145
|
+
disabled: v,
|
|
146
|
+
formItemProps: E,
|
|
147
|
+
autoBind: P,
|
|
127
148
|
inputProps: t(r, s),
|
|
128
|
-
listeners:
|
|
129
|
-
|
|
149
|
+
listeners: F,
|
|
150
|
+
formItem: M,
|
|
151
|
+
printing: y(() => (b == null ? void 0 : b.printing) === !0)
|
|
130
152
|
};
|
|
131
|
-
},
|
|
153
|
+
}, N = (e) => e.icon ? x("i", { class: e.icon }) : null;
|
|
132
154
|
//#endregion
|
|
133
|
-
export {
|
|
155
|
+
export { O as a, A as i, k as n, M as o, j as r, E as s, N as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { allProps as e, predicate as t } from "../props/checkbox.mjs";
|
|
2
|
-
import { n, o as r } from "./
|
|
2
|
+
import { n, o as r } from "./Dgwcljur.mjs";
|
|
3
3
|
import { ElCheckbox as i } from "element-plus/es";
|
|
4
4
|
import "element-plus/es/components/base/style/css";
|
|
5
5
|
import { createVNode as a, mergeProps as o, useModel as s } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e } from "./
|
|
2
|
-
import { t } from "./
|
|
1
|
+
import { n as e } from "./Dgwcljur.mjs";
|
|
2
|
+
import { t } from "./C7rEqtOR.mjs";
|
|
3
3
|
import { allProps as n } from "../props/input.mjs";
|
|
4
4
|
import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
5
5
|
//#region src/components/form/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
|