@web-utils/form-ui 1.0.0-beta20 → 1.0.0-beta22
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/api/index.d.ts +60 -0
- package/api/index.mjs +42 -0
- package/awesome-button/index.d.ts +60 -0
- package/awesome-button/index.mjs +49 -0
- package/chunks/{B9-9iYg8.mjs → 3VI058Yv.mjs} +6 -6
- package/chunks/{Be_E_4G0.mjs → B-Y8YSMp.mjs} +6 -6
- package/chunks/BIm5rmJm.mjs +222 -0
- package/chunks/{CPE8fqJc.mjs → BcMgzZyZ.mjs} +3 -3
- package/chunks/{BVzpe2oN.mjs → Bw1QPGNc.mjs} +6 -6
- package/chunks/{D_Xobj10.mjs → BwuQhCIf.mjs} +3 -3
- package/chunks/BzMaCcUd.mjs +53 -0
- package/chunks/{wfL1FAwc.mjs → C2RhdxHB.mjs} +354 -354
- package/chunks/{BAm_wcwz.mjs → CH7m94ce.mjs} +7 -7
- package/chunks/{BJObhbQz.mjs → CJv6Sn_v.mjs} +6 -6
- package/chunks/{B3DY36vM.mjs → Cnmu4eY-.mjs} +1 -1
- package/chunks/{CJeq96R0.mjs → CozfnlhM.mjs} +7 -7
- package/chunks/{DynLjTwi.mjs → Cp9FIjnh.mjs} +1 -1
- package/chunks/{D7hrSVVl.mjs → CwjQbaXJ.mjs} +15 -15
- package/chunks/Cxvr9Z1r.mjs +208 -0
- package/chunks/{BSriw1Qr.mjs → D4Pknq4r.mjs} +10 -10
- package/chunks/{B7fKv2-x.mjs → DBL23JPA.mjs} +6 -6
- package/chunks/DETsVUo_.mjs +93 -0
- package/chunks/DOl--Hf9.mjs +107 -0
- package/chunks/{B5B9au3z.mjs → DP1YukLf.mjs} +25 -25
- package/chunks/{Bk3PtIYo.mjs → DbBdLuvW.mjs} +8 -8
- package/chunks/DpH8CVbN.mjs +79 -0
- package/chunks/{DgbDpRQg.mjs → ENc67_lM.mjs} +9 -9
- package/chunks/{8ORg8rrN.mjs → INlqdzng.mjs} +15 -15
- package/chunks/{DgCwGit4.mjs → dDAvzX4k.mjs} +6 -6
- package/chunks/eR-FlUht.mjs +110 -0
- package/chunks/{BLpnMrum.mjs → rkRnszQn.mjs} +18 -18
- package/chunks/{DAS1h_Ei.mjs → tIzKZ11j.mjs} +3 -3
- package/chunks/y8u4cMEF.mjs +216 -0
- package/confirm-button/index.d.ts +71 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +42 -0
- package/confirmable/index.mjs +8 -0
- package/{constants.mjs → constants/index.mjs} +1 -1
- package/element-dialog/index.d.ts +5 -5
- package/element-dialog/index.mjs +1 -1
- package/empty-view/index.d.ts +2 -2
- package/empty-view/index.mjs +1 -1
- package/flex-scroll-area/index.d.ts +1 -1
- package/flex-scroll-area/index.mjs +1 -1
- package/form-advice/index.mjs +1 -1
- package/form-button/index.d.ts +72 -0
- package/form-button/index.mjs +36 -0
- package/form-cascader/index.d.ts +483 -1
- package/form-cascader/index.mjs +2 -10
- package/form-check-box-group/index.d.ts +17 -17
- package/form-check-box-group/index.mjs +1 -1
- package/form-checkbox/index.d.ts +22 -22
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.d.ts +26 -26
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +3 -3
- package/form-holder/index.mjs +1 -1
- package/form-image/index.d.ts +14 -14
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +19 -19
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.d.ts +14 -14
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.d.ts +18 -18
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +18 -18
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +17 -17
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +18 -18
- package/form-input-phone-number/index.mjs +1 -1
- package/form-item-config-provider/index.d.ts +3 -3
- package/form-item-config-provider/index.mjs +1 -1
- package/form-item-group/index.d.ts +5 -3
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.d.ts +12 -12
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.d.ts +19 -19
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +15 -15
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.mjs +13 -13
- package/form-row/index.d.ts +2 -2
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +33 -33
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +17 -17
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +23 -23
- package/form-switch/index.mjs +1 -1
- package/form-text/index.d.ts +15 -15
- package/form-text/index.mjs +1 -1
- package/helper/dictionary.d.ts +15 -0
- package/helper/dictionary.mjs +97 -0
- package/hook/useDictionary.d.ts +60 -0
- package/hook/useDictionary.mjs +15 -0
- package/iframe-window/index.d.ts +9 -0
- package/iframe-window/index.mjs +37 -0
- package/iframe-window/style.css +1 -0
- package/index.d.ts +6 -1
- package/index.mjs +45 -40
- package/month-calendar/index.d.ts +2 -2
- package/month-calendar/index.mjs +1 -1
- package/package.json +1 -1
- package/{resolver.mjs → resolver/resolver.mjs} +2 -2
- package/toolbar/index.d.ts +128 -1
- package/toolbar/index.mjs +1 -8
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.d.ts +76 -1
- package/toolbar-button/index.mjs +1 -8
- package/vue-cron/index.d.ts +2 -2
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/year-calendar/index.d.ts +2 -2
- package/year-calendar/index.mjs +1 -1
- package/chunks/Bb43eI1f.mjs +0 -93
- package/chunks/Bh_CMUlo.mjs +0 -12
- package/chunks/C1DlzLpD.mjs +0 -222
- package/chunks/lTFu0zgR.mjs +0 -106
- /package/chunks/{D9GcEl6r.mjs → DJNXk_Cv.mjs} +0 -0
- /package/{constants.d.ts → constants/index.d.ts} +0 -0
- /package/{input → form-item-x}/style.css +0 -0
- /package/{resolver.d.ts → resolver/resolver.d.ts} +0 -0
package/year-calendar/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
showYearSelector: {
|
|
3
3
|
type: BooleanConstructor;
|
|
4
4
|
default: () => true;
|
|
@@ -45,7 +45,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
45
45
|
toggleDate(dateObj: any): void;
|
|
46
46
|
modifiedActiveDates(dateIndex: any, activeDate: any): unknown[];
|
|
47
47
|
monthClick(monthYearInfo: any): void;
|
|
48
|
-
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("update:modelValue" | "toggleDate" | "monthClick" | "update:activeDates")[], "update:modelValue" | "toggleDate" | "monthClick" | "update:activeDates", import('vue').PublicProps, Readonly<
|
|
48
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("update:modelValue" | "toggleDate" | "monthClick" | "update:activeDates")[], "update:modelValue" | "toggleDate" | "monthClick" | "update:activeDates", import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
49
49
|
showYearSelector: {
|
|
50
50
|
type: BooleanConstructor;
|
|
51
51
|
default: () => true;
|
package/year-calendar/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/DJNXk_Cv.mjs";
|
|
2
2
|
import t from "../month-calendar/index.mjs";
|
|
3
3
|
import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createStaticVNode as o, createVNode as s, normalizeClass as c, openBlock as l, renderList as u, toDisplayString as d } from "vue";
|
|
4
4
|
import f from "dayjs";
|
package/chunks/Bb43eI1f.mjs
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { columnSizeContextKey as e, setColumnSizeContextKey as t } from "../constants.mjs";
|
|
2
|
-
import n from "../form-cell/index.mjs";
|
|
3
|
-
import { ElTooltip as r } from "element-plus/es";
|
|
4
|
-
import { Comment as i, Fragment as a, Text as o, createVNode as s, inject as c, isVNode as l } from "vue";
|
|
5
|
-
import { camelize as u, isDef as d, isString as f } from "@web-utils/core";
|
|
6
|
-
//#region src/components/red-form/FormRow.vue?vue&type=script&lang.jsx
|
|
7
|
-
function p(e) {
|
|
8
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
|
|
9
|
-
}
|
|
10
|
-
var m = (e) => {
|
|
11
|
-
let t = Object.keys({});
|
|
12
|
-
for (let n in e) t[u(n)] = e[n];
|
|
13
|
-
return t;
|
|
14
|
-
}, h = (e, { columnSize: t }) => {
|
|
15
|
-
if (!e || !e.length) return null;
|
|
16
|
-
e = e.filter((e) => e.type !== i);
|
|
17
|
-
let n = [], c = e.length === 1;
|
|
18
|
-
for (let i = 0; i < e.length; i++) {
|
|
19
|
-
let v = e[i], { name: y } = v.type;
|
|
20
|
-
if (v.type === o) n.push({
|
|
21
|
-
tag: y,
|
|
22
|
-
type: "text",
|
|
23
|
-
content: v,
|
|
24
|
-
colspan: c ? t : 0
|
|
25
|
-
});
|
|
26
|
-
else if (v.type === a) n.push(...h(v.children, { columnSize: t }));
|
|
27
|
-
else if (f(v.type) && v.type === "td") n.push({
|
|
28
|
-
tag: v.type,
|
|
29
|
-
type: "td",
|
|
30
|
-
content: v
|
|
31
|
-
});
|
|
32
|
-
else if (y === "FormCell") n.push({
|
|
33
|
-
tag: y,
|
|
34
|
-
type: "FormCell",
|
|
35
|
-
content: v
|
|
36
|
-
});
|
|
37
|
-
else if (typeof v.type == "object") {
|
|
38
|
-
var l, u;
|
|
39
|
-
let { label: e, hideLabel: i, labelColspan: a, inputColspan: o, labelRowspan: f, inputRowspan: h, tipsAfterLabel: b, tips: x } = m(v.props);
|
|
40
|
-
if (!d(i)) {
|
|
41
|
-
var p, g, _;
|
|
42
|
-
let t = (p = v.children) == null ? void 0 : p.tips, i = t || x ? s(r, {
|
|
43
|
-
effect: "light",
|
|
44
|
-
content: x,
|
|
45
|
-
offset: 4
|
|
46
|
-
}, {
|
|
47
|
-
default: () => s("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
48
|
-
content: t || null
|
|
49
|
-
}) : null;
|
|
50
|
-
n.push({
|
|
51
|
-
tag: y,
|
|
52
|
-
type: "label",
|
|
53
|
-
colspan: a,
|
|
54
|
-
rowspan: f,
|
|
55
|
-
content: [((g = v.children) == null || (_ = g.label) == null ? void 0 : _.call(g)) || e, b === "" ? i : null]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
let S;
|
|
59
|
-
S = c && d(i) ? t : d(o) ? o : c ? t - 1 : 0, n.push({
|
|
60
|
-
tag: y,
|
|
61
|
-
type: "input",
|
|
62
|
-
colspan: S,
|
|
63
|
-
rowspan: h,
|
|
64
|
-
content: [v, (l = v.children) == null || (u = l.below) == null ? void 0 : u.call(l)]
|
|
65
|
-
});
|
|
66
|
-
} else console.error("未知节点");
|
|
67
|
-
}
|
|
68
|
-
return n;
|
|
69
|
-
}, g = {
|
|
70
|
-
name: "FormRow",
|
|
71
|
-
props: {
|
|
72
|
-
isLabel: Boolean,
|
|
73
|
-
alignCenter: Boolean
|
|
74
|
-
},
|
|
75
|
-
setup(r, { slots: i }) {
|
|
76
|
-
let a = c(t, null), o = c(e, null);
|
|
77
|
-
return () => {
|
|
78
|
-
var e;
|
|
79
|
-
let t = (e = i.default) == null ? void 0 : e.call(i), c = [];
|
|
80
|
-
return c.push(...h(t, { columnSize: (o == null ? void 0 : o.value) ?? 0 })), ((o == null ? void 0 : o.value) ?? 0) < c.length && (a == null || a(c.length)), s("tr", null, [c.map(({ tag: e, type: t, colspan: i, rowspan: a, content: o }) => e === "td" || t === "FormCell" ? o : t === "text" ? s(n, {
|
|
81
|
-
isLabel: r.isLabel,
|
|
82
|
-
alignCenter: r.alignCenter,
|
|
83
|
-
colspan: i
|
|
84
|
-
}, p(o) ? o : { default: () => [o] }) : s("td", {
|
|
85
|
-
class: t,
|
|
86
|
-
colspan: i,
|
|
87
|
-
rowspan: a
|
|
88
|
-
}, [o]))]);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
//#endregion
|
|
93
|
-
export { g as t };
|
package/chunks/Bh_CMUlo.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { computed as e } from "vue";
|
|
2
|
-
import { capitalize as t } from "@web-utils/core";
|
|
3
|
-
//#region src/util/index.js
|
|
4
|
-
var n = (e, n, r, i) => {
|
|
5
|
-
let a = {};
|
|
6
|
-
if (n) for (let t in e) n(t) && (a[t] = e[t]);
|
|
7
|
-
return r && r.forEach((e) => {
|
|
8
|
-
a[`on${t(e)}`] = (...t) => i(e, ...t);
|
|
9
|
-
}), a;
|
|
10
|
-
}, r = (t, { emit: r, events: i, predicate: a }) => e(() => n(t, a, i, r));
|
|
11
|
-
//#endregion
|
|
12
|
-
export { r as n, n as t };
|
package/chunks/C1DlzLpD.mjs
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { formHolderContextKey as e, formItemConfigProviderContextKey as t, formItemGroupContextKey as n } from "../constants.mjs";
|
|
2
|
-
import { t as r } from "./Bh_CMUlo.mjs";
|
|
3
|
-
import { ElCol as i, ElFormItem as a, ElTooltip as o } from "element-plus/es";
|
|
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
|
-
//#region src/components/form/props/form-item.js
|
|
7
|
-
var _ = {
|
|
8
|
-
prop: [String, Array],
|
|
9
|
-
label: String,
|
|
10
|
-
labelPosition: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: ""
|
|
13
|
-
},
|
|
14
|
-
labelWidth: [String, Number],
|
|
15
|
-
required: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: !1
|
|
18
|
-
},
|
|
19
|
-
rules: Object,
|
|
20
|
-
error: String,
|
|
21
|
-
showMessage: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !0
|
|
24
|
-
},
|
|
25
|
-
inlineMessage: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: !1
|
|
28
|
-
},
|
|
29
|
-
size: String,
|
|
30
|
-
for: String,
|
|
31
|
-
validateStatus: String,
|
|
32
|
-
messagePrefix: String,
|
|
33
|
-
message: String,
|
|
34
|
-
wrapCol: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: !0
|
|
37
|
-
},
|
|
38
|
-
fixedSpan: Number,
|
|
39
|
-
block: Boolean,
|
|
40
|
-
unwrap: Boolean,
|
|
41
|
-
half: Boolean,
|
|
42
|
-
formItemClass: String,
|
|
43
|
-
hideLabel: Boolean,
|
|
44
|
-
tips: { type: String },
|
|
45
|
-
tipsAfterLabel: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: !1
|
|
48
|
-
},
|
|
49
|
-
labelColspan: [Number, String],
|
|
50
|
-
inputColspan: [Number, String],
|
|
51
|
-
labelRowspan: [Number, String],
|
|
52
|
-
inputRowspan: [Number, String]
|
|
53
|
-
}, v = {
|
|
54
|
-
required: !0,
|
|
55
|
-
rules: !0,
|
|
56
|
-
messagePrefix: !0,
|
|
57
|
-
message: !0,
|
|
58
|
-
wrapCol: !0,
|
|
59
|
-
fixedSpan: !0,
|
|
60
|
-
block: !0,
|
|
61
|
-
unwrap: !0,
|
|
62
|
-
half: !0,
|
|
63
|
-
formItemClass: !0,
|
|
64
|
-
hideLabel: !0,
|
|
65
|
-
tips: !0,
|
|
66
|
-
tipsAfterLabel: !0,
|
|
67
|
-
labelColspan: !0,
|
|
68
|
-
inputColspan: !0,
|
|
69
|
-
labelRowspan: !0,
|
|
70
|
-
inputRowspan: !0
|
|
71
|
-
}, y = (e) => _[e] !== void 0 && v[e] !== !0, b = (e, { emit: t, events: n, predicate: i }) => s(() => r(e, i, n, t)), x = {
|
|
72
|
-
span: {
|
|
73
|
-
type: Number,
|
|
74
|
-
default: 12
|
|
75
|
-
},
|
|
76
|
-
offset: {
|
|
77
|
-
type: Number,
|
|
78
|
-
default: 0
|
|
79
|
-
},
|
|
80
|
-
push: {
|
|
81
|
-
type: Number,
|
|
82
|
-
default: 0
|
|
83
|
-
},
|
|
84
|
-
pull: {
|
|
85
|
-
type: Number,
|
|
86
|
-
default: 0
|
|
87
|
-
},
|
|
88
|
-
xs: { type: [Number, Object] },
|
|
89
|
-
sm: { type: [Number, Object] },
|
|
90
|
-
md: { type: [Number, Object] },
|
|
91
|
-
lg: { type: [Number, Object] },
|
|
92
|
-
xl: { type: [Number, Object] },
|
|
93
|
-
tag: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: "div"
|
|
96
|
-
}
|
|
97
|
-
}, S = { span: !0 }, C = (e) => x[e] !== void 0 && S[e] !== !0, w = (e, { emit: t, events: n, predicate: i }) => s(() => r(e, i, n, t)), T = (t) => {
|
|
98
|
-
let n = u(e, null);
|
|
99
|
-
return s(() => t.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[t.prop]) === !0);
|
|
100
|
-
}, E = (e, { rules: t, attrs: n, messagePrefix: r, message: i } = {}) => {
|
|
101
|
-
let a = T(e);
|
|
102
|
-
return s(() => {
|
|
103
|
-
let o = { message: i }, s = p(t);
|
|
104
|
-
return Object.keys({
|
|
105
|
-
..._,
|
|
106
|
-
...x
|
|
107
|
-
}).forEach((t) => {
|
|
108
|
-
t === "rules" ? e[t] && s ? o[t] = [...e[t], ...s] : e[t] ? o[t] = e[t] : s && (o[t] = s) : t === "messagePrefix" ? o[t] = e.messagePrefix || r : o[t] = e[t];
|
|
109
|
-
}), o.required = a.value, o.class = n == null ? void 0 : n.class, o.style = n == null ? void 0 : n.style, o;
|
|
110
|
-
});
|
|
111
|
-
}, D = {
|
|
112
|
-
name: "FormItemX",
|
|
113
|
-
inheritAttrs: !1,
|
|
114
|
-
props: {
|
|
115
|
-
..._,
|
|
116
|
-
...x
|
|
117
|
-
},
|
|
118
|
-
setup(n, { attrs: r, slots: l, expose: p }) {
|
|
119
|
-
let h = u(g, null), _ = u(t, null), v = u(e, null), x = r.embed ? s(() => r.disabled) : k(n), S = b(n, { predicate: y }), E = w(n, { predicate: C }), D = s(() => (_ == null ? void 0 : _.reactive) === !0 && _.block === !1 && n.fixedSpan === void 0 && !n.half), O = T(n), A = m("formItem"), j = s(() => (_ == null ? void 0 : _.wrapCol) === !1 ? !1 : !!h && n.wrapCol), M = s(() => v != null && v.tableForm ? "" : _ != null && _.block ? "100%" : n.half && j.value ? `calc(50% - ${h.gutter.value / 2}px)` : ""), N = s(() => (_ == null ? void 0 : _.block) === !0 || n.block || n.half ? 24 : n.span), P = s(() => {
|
|
120
|
-
if (x.value) return [];
|
|
121
|
-
if (O.value) {
|
|
122
|
-
let e = {
|
|
123
|
-
required: !0,
|
|
124
|
-
message: n.message || `${n.messagePrefix || "请输入"}${n.label}`
|
|
125
|
-
};
|
|
126
|
-
return n.rules ? [...n.rules, e] : [e];
|
|
127
|
-
}
|
|
128
|
-
return n.rules;
|
|
129
|
-
});
|
|
130
|
-
return p({
|
|
131
|
-
clearValidate: async () => {
|
|
132
|
-
var e;
|
|
133
|
-
await f(), (e = A.value) == null || e.clearValidate();
|
|
134
|
-
},
|
|
135
|
-
validate: async () => {
|
|
136
|
-
var e;
|
|
137
|
-
await f(), (e = A.value) == null || e.validate();
|
|
138
|
-
}
|
|
139
|
-
}), () => {
|
|
140
|
-
var e;
|
|
141
|
-
let t = l.tips || n.tips, r = t ? c(o, {
|
|
142
|
-
effect: "light",
|
|
143
|
-
content: n.tips,
|
|
144
|
-
offset: 4
|
|
145
|
-
}, {
|
|
146
|
-
default: () => c("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
147
|
-
content: l.tips ? l.tips : null
|
|
148
|
-
}) : null, s = c(a, d(S.value, {
|
|
149
|
-
ref: "formItem",
|
|
150
|
-
style: { width: M.value },
|
|
151
|
-
class: [
|
|
152
|
-
"form-item",
|
|
153
|
-
n.formItemClass,
|
|
154
|
-
{
|
|
155
|
-
"form-item-hide-label": n.hideLabel,
|
|
156
|
-
"with-tips": !n.tipsAfterLabel && t,
|
|
157
|
-
required: x.value === !1 && O.value
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
rules: P.value
|
|
161
|
-
}), {
|
|
162
|
-
...l,
|
|
163
|
-
default: () => {
|
|
164
|
-
var e;
|
|
165
|
-
return [(e = l.default) == null ? void 0 : e.call(l, {
|
|
166
|
-
disabled: x.value,
|
|
167
|
-
required: O.value
|
|
168
|
-
}), t && !n.tipsAfterLabel ? r : null];
|
|
169
|
-
},
|
|
170
|
-
label: () => [l.label ? l.label() : n.label, n.tipsAfterLabel ? r : null]
|
|
171
|
-
}), u = [s, (e = l.below) == null ? void 0 : e.call(l)];
|
|
172
|
-
return n.unwrap ? u : j.value ? c(i, d(E.value, D.value ? {
|
|
173
|
-
xs: 24,
|
|
174
|
-
sm: 12,
|
|
175
|
-
md: 12,
|
|
176
|
-
lg: 8,
|
|
177
|
-
xl: 6
|
|
178
|
-
} : {}, { span: N.value }), { default: () => u }) : s;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
}, O = "update:modelValue", k = (t) => {
|
|
182
|
-
let r = u(e, null), i = u(n, null);
|
|
183
|
-
return s(() => {
|
|
184
|
-
if (t.disabled !== void 0) return t.disabled;
|
|
185
|
-
if (r) {
|
|
186
|
-
if (r.requiredFieldsMap[t.prop] === !0 || r.enabledFieldsMap[t.prop] === !0) return !1;
|
|
187
|
-
if (r.disabledFieldsMap[t.prop] === !0) return !0;
|
|
188
|
-
}
|
|
189
|
-
return (i == null ? void 0 : i.enabled) === !0 ? !1 : (i == null ? void 0 : i.disabled) === !0 ? !0 : (r == null ? void 0 : r.disabled) === !0;
|
|
190
|
-
});
|
|
191
|
-
}, A = { [O]: null }, j = (e, t) => e(O, t), M = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? l(D, {
|
|
192
|
-
...n.value,
|
|
193
|
-
embed: !0,
|
|
194
|
-
disabled: i == null ? void 0 : i.value
|
|
195
|
-
}, {
|
|
196
|
-
default: () => t,
|
|
197
|
-
label: r.label,
|
|
198
|
-
error: r.error,
|
|
199
|
-
tips: r.tips,
|
|
200
|
-
below: r.below
|
|
201
|
-
}) : t, N = (e, { emit: t, slots: n, attrs: i, rules: a, events: o, predicate: c, messagePrefix: u = "请输入" }) => {
|
|
202
|
-
let d = k(e), f = s(() => d.value ? "" : `${u}${e.label}`), p = E(e, {
|
|
203
|
-
rules: a,
|
|
204
|
-
attrs: i,
|
|
205
|
-
message: f.value
|
|
206
|
-
}), m = (e) => j(t, e), g = (t) => e.col ? l(h, { span: e.block ? 24 : e.span }, { default: () => t }) : t;
|
|
207
|
-
return {
|
|
208
|
-
emitInput: m,
|
|
209
|
-
render: ({ vNodes: t }) => M(e, {
|
|
210
|
-
vNodes: g(t),
|
|
211
|
-
formItemProps: p,
|
|
212
|
-
slots: n,
|
|
213
|
-
disabled: d
|
|
214
|
-
}),
|
|
215
|
-
placeholder: f,
|
|
216
|
-
disabled: d,
|
|
217
|
-
formItemProps: p,
|
|
218
|
-
autoBind: s(() => r(e, c, o, t))
|
|
219
|
-
};
|
|
220
|
-
}, P = (e) => e.icon ? l("i", { class: e.icon }) : null;
|
|
221
|
-
//#endregion
|
|
222
|
-
export { D as a, _ as c, N as i, A as n, E as o, M as r, x as s, P as t };
|
package/chunks/lTFu0zgR.mjs
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { formItemGroupContextKey as e, formViewContextKey as t } from "../constants.mjs";
|
|
2
|
-
import n from "../empty-view/index.mjs";
|
|
3
|
-
import { ElRow as r } from "element-plus/es";
|
|
4
|
-
import { Fragment as i, computed as a, createTextVNode as o, createVNode as s, h as c, inject as l, isVNode as u, onBeforeUnmount as d, onMounted as f, provide as p, reactive as m, ref as h, toRef as g, vShow as _, watchEffect as v, withDirectives as y } from "vue";
|
|
5
|
-
import { ElCol as b, ElCollapseTransition as x } from "element-plus";
|
|
6
|
-
//#region src/components/form/FormItemGroup.vue?vue&type=script&lang.jsx
|
|
7
|
-
function S(e) {
|
|
8
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/components/form/FormItemGroup.vue
|
|
12
|
-
var C = {
|
|
13
|
-
name: "FormItemGroup",
|
|
14
|
-
props: {
|
|
15
|
-
blockTitle: String,
|
|
16
|
-
size: String,
|
|
17
|
-
tips: String,
|
|
18
|
-
active: Boolean,
|
|
19
|
-
enabled: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: void 0
|
|
22
|
-
},
|
|
23
|
-
disabled: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: void 0
|
|
26
|
-
},
|
|
27
|
-
tag: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "ElCol"
|
|
30
|
-
},
|
|
31
|
-
span: {
|
|
32
|
-
type: Number,
|
|
33
|
-
default: 24
|
|
34
|
-
},
|
|
35
|
-
block: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: !0
|
|
38
|
-
},
|
|
39
|
-
wrapRow: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: !0
|
|
42
|
-
},
|
|
43
|
-
gutter: {
|
|
44
|
-
type: Number,
|
|
45
|
-
default: 20
|
|
46
|
-
},
|
|
47
|
-
collapse: Boolean,
|
|
48
|
-
showTitle: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: !0
|
|
51
|
-
},
|
|
52
|
-
notDispatch: Boolean
|
|
53
|
-
},
|
|
54
|
-
setup(u, { expose: C, slots: w }) {
|
|
55
|
-
let T = l(t, null), E = h(!0), D = g(() => u.enabled), O = g(() => u.disabled), k = a(() => u.enabled === !0 ? !1 : u.disabled === !0), A = () => E.value = !E.value, j = m({
|
|
56
|
-
disabled: O,
|
|
57
|
-
enabled: D,
|
|
58
|
-
isDisabled: k,
|
|
59
|
-
size: g(() => u.size)
|
|
60
|
-
});
|
|
61
|
-
return v(() => {
|
|
62
|
-
E.value = !u.collapse;
|
|
63
|
-
}), p(e, j), f(() => {
|
|
64
|
-
if (!u.notDispatch) {
|
|
65
|
-
var e;
|
|
66
|
-
T == null || (e = T.addGroup) == null || e.call(T, this);
|
|
67
|
-
}
|
|
68
|
-
}), d(() => {
|
|
69
|
-
if (!u.notDispatch) {
|
|
70
|
-
var e;
|
|
71
|
-
T == null || (e = T.removeGroup) == null || e.call(T, this);
|
|
72
|
-
}
|
|
73
|
-
}), C(j), () => {
|
|
74
|
-
let e = () => {
|
|
75
|
-
var e;
|
|
76
|
-
return s(i, null, [y(s("div", {
|
|
77
|
-
class: "form-item-group-title",
|
|
78
|
-
onClick: A
|
|
79
|
-
}, [s("span", {
|
|
80
|
-
class: "flex-item",
|
|
81
|
-
style: "flex: 1"
|
|
82
|
-
}, [
|
|
83
|
-
w.title ? w.title() : u.blockTitle,
|
|
84
|
-
w.tips || u.tips ? s("span", { style: "color: #ff0000; font-size: 14px" }, [
|
|
85
|
-
o("("),
|
|
86
|
-
w.tips ? w.tips() : u.tips,
|
|
87
|
-
o(")")
|
|
88
|
-
]) : null,
|
|
89
|
-
(e = w["title-right"]) == null ? void 0 : e.call(w)
|
|
90
|
-
]), s("i", { class: E.value ? "el-icon-arrow-down" : "el-icon-arrow-right" }, null)]), [[_, u.showTitle]]), s(x, null, { default: () => {
|
|
91
|
-
let e;
|
|
92
|
-
return w.default ? u.wrapRow ? y(s(r, { gutter: u.gutter }, S(e = w.default()) ? e : { default: () => [e] }), [[_, E.value]]) : y(s("div", null, [w.default()]), [[_, E.value]]) : y(s(n, {
|
|
93
|
-
"font-size": "14px",
|
|
94
|
-
"empty-tips": "暂无信息"
|
|
95
|
-
}, null), [[_, E.value]]);
|
|
96
|
-
} })]);
|
|
97
|
-
}, t = { class: ["form-item-group", {
|
|
98
|
-
"default-active": u.active,
|
|
99
|
-
"is-disabled": k.value
|
|
100
|
-
}] };
|
|
101
|
-
return u.tag !== "div" && (t.span = u.block ? 24 : u.span), c(u.tag === "div" ? "div" : b, t, e);
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
//#endregion
|
|
106
|
-
export { C as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|