@web-utils/form-ui 1.0.0-beta55 → 1.0.0-beta57
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 +6 -0
- package/chunks/-qKZw-3p2.mjs +23 -0
- package/chunks/{B3A-CnYr.mjs → 33G2_TH8.mjs} +4 -4
- package/chunks/{gLPy4Sus.mjs → 8P-OAGbj.mjs} +1 -1
- package/chunks/B2PuSZ_F.mjs +35 -0
- package/chunks/B6B-rhhB.mjs +37 -0
- package/chunks/{C7Mak2La.mjs → BHT38Us-.mjs} +7 -6
- package/chunks/BWoKh6f6.mjs +66 -0
- package/chunks/{Dt_s96gL2.mjs → BXrA0SYn2.mjs} +2 -2
- package/chunks/BZ0v5mka.mjs +30 -0
- package/chunks/CE1uX9hJ.mjs +95 -0
- package/chunks/CGnOR2gn.mjs +59 -0
- package/chunks/CJ1-f8sg.mjs +30 -0
- package/chunks/{5KomemiE2.mjs → CUq3MOiQ2.mjs} +29 -29
- package/chunks/CdzoVG6J.mjs +47 -0
- package/chunks/{Dg4R65aG2.mjs → CqoMZ9Wo2.mjs} +2 -2
- package/chunks/CrQmTHMA.mjs +105 -0
- package/chunks/Crh2RUrS.mjs +106 -0
- package/chunks/DBUJ7Bva.mjs +56 -0
- package/chunks/DB_UKPay.mjs +27 -0
- package/chunks/{BvKUeniN.mjs → DEC2O0q-.mjs} +46 -44
- package/chunks/{BoJgSMkL.mjs → DUhF8YOY.mjs} +2 -2
- package/chunks/Du1PslcN.mjs +28 -0
- package/chunks/{Dluor05A.mjs → DyEYDv4B.mjs} +7 -6
- package/chunks/EAJCsX8W.mjs +32 -0
- package/chunks/{Bq62m7IR2.mjs → T4GdQtY8.mjs} +11 -11
- package/chunks/ZFJ73RWd2.mjs +29 -0
- package/chunks/{D2B9Y3oT.mjs → fmIV_kHp.mjs} +2 -2
- package/chunks/h5488Kii.mjs +27 -0
- package/chunks/k3cC9SGC.mjs +27 -0
- package/chunks/{CauzhVSa2.mjs → rJWvEBq9.mjs} +12 -12
- package/chunks/{7GmKqdbC.mjs → usyXQe35.mjs} +1 -1
- package/chunks/{BpCiVuKL.mjs → v3wbYL_-.mjs} +7 -6
- package/chunks/vd9nXj8B.mjs +59 -0
- package/chunks/{g8MIBMw92.mjs → ztBRZQwM.mjs} +13 -13
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/constants/index.d.ts +18 -0
- package/editable-tree/index.d.ts +27 -0
- package/editable-tree/index.mjs +591 -2
- package/element-dialog/index.mjs +1 -1
- package/element-resize-observer/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.d.ts +3 -0
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.d.ts +6 -0
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +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-config-provider/index.d.ts +18 -0
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/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/helper/dictionary.d.ts +14 -0
- package/helper/dictionary.mjs +1 -1
- package/helper/form-item.d.ts +8 -1
- package/helper/form-item.mjs +27 -2
- package/helper/input.d.ts +3 -0
- package/helper/input.mjs +1 -1
- package/helper/sub-table-plus.d.ts +60 -0
- package/iframe-window/index.mjs +1 -1
- package/index.css +1 -1
- package/index.mjs +37 -37
- package/package.json +1 -1
- package/pageable-table/index.mjs +1 -1
- package/props/cascader.d.ts +326 -0
- package/{chunks/Czz_49pC.mjs → props/cascader.mjs} +8 -58
- package/props/checkbox-group.d.ts +213 -0
- package/props/checkbox-group.mjs +83 -0
- package/props/checkbox.d.ts +202 -0
- package/props/checkbox.mjs +71 -0
- package/props/col.d.ts +74 -0
- package/props/col.mjs +32 -0
- package/props/common.d.ts +114 -0
- package/props/common.mjs +18 -0
- package/props/date.d.ts +339 -0
- package/props/date.mjs +145 -0
- package/props/form-item.d.ts +144 -0
- package/props/form-item.mjs +73 -0
- package/props/form.d.ts +157 -0
- package/props/form.mjs +89 -0
- package/props/image.d.ts +102 -0
- package/props/image.mjs +10 -0
- package/props/input-cron.d.ts +102 -0
- package/props/input-cron.mjs +16 -0
- package/props/input-number.d.ts +216 -0
- package/props/input-number.mjs +72 -0
- package/props/input-tag.d.ts +123 -0
- package/props/input-tag.mjs +33 -0
- package/props/input.d.ts +299 -0
- package/props/input.mjs +97 -0
- package/props/radio-group.d.ts +205 -0
- package/props/radio-group.mjs +84 -0
- package/props/rate.d.ts +211 -0
- package/{chunks/D0kIhzQo.mjs → props/rate.mjs} +7 -28
- package/props/select.d.ts +450 -0
- package/props/select.mjs +218 -0
- package/props/slide.d.ts +235 -0
- package/{chunks/DZrQmH9Y.mjs → props/slide.mjs} +7 -28
- package/props/switch.d.ts +229 -0
- package/{chunks/ecpQ-ODX.mjs → props/switch.mjs} +7 -33
- package/props/text.d.ts +127 -0
- package/props/text.mjs +22 -0
- package/props/textarea.d.ts +266 -0
- package/{chunks/CNK4mfga.mjs → props/textarea.mjs} +19 -31
- package/props/time-select.d.ts +216 -0
- package/props/time-select.mjs +67 -0
- package/props/time.d.ts +304 -0
- package/{chunks/C3MF_-bN.mjs → props/time.mjs} +8 -39
- package/props/tree.d.ts +76 -0
- package/props/tree.mjs +75 -0
- package/sub-table/index.d.ts +3 -0
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +13 -13
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +2 -2
- package/year-calendar/index.mjs +1 -1
- package/year-calendar/style.css +1 -1
- package/chunks/6GcIyEQV.mjs +0 -95
- package/chunks/8c9TEVNY.mjs +0 -36
- package/chunks/AAZfNtly.mjs +0 -119
- package/chunks/BKlMENhV.mjs +0 -57
- package/chunks/BNVYEWWW.mjs +0 -57
- package/chunks/BTuzBfTA.mjs +0 -141
- package/chunks/C6Dq9Dgb.mjs +0 -17
- package/chunks/C6u76g6o.mjs +0 -158
- package/chunks/CLO5X9Lb.mjs +0 -176
- package/chunks/CdoiMj7L2.mjs +0 -39
- package/chunks/DTVTvvq-.mjs +0 -189
- package/chunks/DWE67l1f.mjs +0 -317
- package/chunks/DWMePN6q.mjs +0 -660
- package/chunks/D_L1p3vm2.mjs +0 -90
- package/chunks/Dy_5vPdP.mjs +0 -101
- package/chunks/Goee5Y-H.mjs +0 -198
- /package/chunks/{BlxLaWcU.mjs → 6av50rJm.mjs} +0 -0
- /package/chunks/{CkOD-_VV.mjs → B1MSrc6f.mjs} +0 -0
- /package/chunks/{BNqVEHk_.mjs → C-0zqLII.mjs} +0 -0
- /package/chunks/{xq_LR6R2.mjs → CI1ehQi5.mjs} +0 -0
- /package/chunks/{DcTVYqeJ.mjs → DuOxL6xh.mjs} +0 -0
- /package/chunks/{CXsoKP22.mjs → mekxD3ef.mjs} +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { n as e, o as t } from "./DEC2O0q-.mjs";
|
|
2
|
+
import { useDictionary as n } from "../hook/useDictionary.mjs";
|
|
3
|
+
import { allProps as r, predicate as i } from "../props/select.mjs";
|
|
4
|
+
import { isNumber as a, isPlainObject as o, isString as s } from "@web-utils/core";
|
|
5
|
+
import { computed as c, createVNode as l, mergeProps as u, ref as d, watchEffect as f } from "vue";
|
|
6
|
+
import { ElOption as p, ElSelect as m } from "element-plus/es";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/components/form/FormSelect.vue
|
|
9
|
+
var h = {
|
|
10
|
+
name: "FormSelect",
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
props: { ...r },
|
|
13
|
+
emits: { ...e },
|
|
14
|
+
setup(e, { emit: r, slots: h, attrs: g }) {
|
|
15
|
+
let { emitInput: _, render: v, placeholder: y, disabled: b, listeners: x, inputProps: S } = t(e, {
|
|
16
|
+
emit: r,
|
|
17
|
+
slots: h,
|
|
18
|
+
attrs: g,
|
|
19
|
+
predicate: i,
|
|
20
|
+
messagePrefix: "请选择"
|
|
21
|
+
}), C = d(null), w = d(!1);
|
|
22
|
+
f(() => {
|
|
23
|
+
if (e.multiple && e.multipleStringMode) {
|
|
24
|
+
var t;
|
|
25
|
+
C.value = (t = e.modelValue) == null ? void 0 : t.split(",").filter((e) => e);
|
|
26
|
+
} else C.value = e.modelValue;
|
|
27
|
+
});
|
|
28
|
+
let T = (t) => {
|
|
29
|
+
if (e.multiple && e.multipleStringMode ? _(t.join(e.multipleStringSeparator)) : _(t), e.emitLabel) {
|
|
30
|
+
let n = O.value.find((n) => n[e.props.value] === t), i = n == null ? void 0 : n[e.props.label];
|
|
31
|
+
i !== e.optionLabel && r("update:optionLabel", i);
|
|
32
|
+
}
|
|
33
|
+
}, { dictItems: E } = n(e), D = d([]), O = c(() => {
|
|
34
|
+
if (e.dictType) return E.value;
|
|
35
|
+
if (e.remote) return D.value;
|
|
36
|
+
if (e.gender) return [{
|
|
37
|
+
[e.props.label]: "男",
|
|
38
|
+
[e.props.value]: e.chinese ? "男" : e.typing ? 1 : "1"
|
|
39
|
+
}, {
|
|
40
|
+
[e.props.label]: "女",
|
|
41
|
+
[e.props.value]: e.chinese ? "女" : e.typing ? 2 : "2"
|
|
42
|
+
}];
|
|
43
|
+
if (e.confirm) return [{
|
|
44
|
+
[e.props.label]: "是",
|
|
45
|
+
[e.props.value]: e.chinese ? "是" : e.english ? "Y" : e.typing ? 1 : "1"
|
|
46
|
+
}, {
|
|
47
|
+
[e.props.label]: "否",
|
|
48
|
+
[e.props.value]: e.chinese ? "否" : e.english ? "N" : e.typing ? 0 : "0"
|
|
49
|
+
}];
|
|
50
|
+
if (e.all) return [{
|
|
51
|
+
[e.props.value]: "",
|
|
52
|
+
[e.props.label]: "全部"
|
|
53
|
+
}, ...e.options];
|
|
54
|
+
if (e.start && e.end) return Array(e.end - e.start + 1).fill(1).map((t, n) => ({
|
|
55
|
+
[e.props.label]: e.start + n,
|
|
56
|
+
[e.props.value]: e.start + n
|
|
57
|
+
}));
|
|
58
|
+
if (e.year) {
|
|
59
|
+
let t = (/* @__PURE__ */ new Date()).getFullYear(), n = [], r = 10;
|
|
60
|
+
a(e.year) && (r = e.year);
|
|
61
|
+
for (let i = -r; i <= r; i++) {
|
|
62
|
+
let r = t + i;
|
|
63
|
+
n.push({
|
|
64
|
+
[e.props.label]: r,
|
|
65
|
+
[e.props.value]: r
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return n;
|
|
69
|
+
}
|
|
70
|
+
return e.options ? e.options.map((t) => (t[e.props.value] = t[e.props.value] ?? t[e.props.label], t)) : [];
|
|
71
|
+
}), k = async (t) => {
|
|
72
|
+
try {
|
|
73
|
+
var n;
|
|
74
|
+
w.value = !0;
|
|
75
|
+
let r = await e.remoteMethod(t, e.prop);
|
|
76
|
+
((n = r.data.data) == null ? void 0 : n.length) >= 0 ? s(r.data.data[0]) ? D.value = r.data.data.map((t) => ({
|
|
77
|
+
[e.props.value]: t,
|
|
78
|
+
[e.props.label]: t
|
|
79
|
+
})) : o(r.data.data[0]) && (D.value = r.data.data) : D.value = [];
|
|
80
|
+
} catch {}
|
|
81
|
+
w.value = !1;
|
|
82
|
+
};
|
|
83
|
+
return f(() => {
|
|
84
|
+
e.remote && k();
|
|
85
|
+
}), () => v({ vNodes: l(m, u(x.value, S.value, {
|
|
86
|
+
offset: e.dropDownOffset,
|
|
87
|
+
"model-value": C.value,
|
|
88
|
+
"onUpdate:modelValue": T,
|
|
89
|
+
disabled: b.value,
|
|
90
|
+
placeholder: y.value
|
|
91
|
+
}), {
|
|
92
|
+
...h,
|
|
93
|
+
default: h.default || (() => {
|
|
94
|
+
var e;
|
|
95
|
+
return (e = O.value) == null ? void 0 : e.map(({ value: e, label: t }) => l(p, {
|
|
96
|
+
key: e,
|
|
97
|
+
label: t,
|
|
98
|
+
value: e
|
|
99
|
+
}, null));
|
|
100
|
+
})
|
|
101
|
+
}) });
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
//#endregion
|
|
105
|
+
export { h as t };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { d as e } from "./DuOxL6xh.mjs";
|
|
2
|
+
import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
|
|
3
|
+
import { allProps as r, predicate as i } from "../props/form.mjs";
|
|
4
|
+
import a from "../form-advice/index.mjs";
|
|
5
|
+
import o from "../form-red-table/index.mjs";
|
|
6
|
+
import { animate as s } from "@web-utils/core";
|
|
7
|
+
import { computed as c, createVNode as l, inject as u, mergeProps as d, nextTick as f, provide as p, reactive as m, toRef as h, useTemplateRef as g } from "vue";
|
|
8
|
+
import { ElForm as _, ElRow as v } from "element-plus/es";
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/form/FormHolder.vue
|
|
11
|
+
var y = {
|
|
12
|
+
name: "FormHolder",
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
props: { ...r },
|
|
15
|
+
emits: {},
|
|
16
|
+
setup(r, { slots: y, expose: b, attrs: x }) {
|
|
17
|
+
let { autoBindProps: S, listeners: C } = e(r, { predicate: i }), w = u(n, null), T = g("form"), E = c(() => r.notTableForm === void 0 ? (w == null ? void 0 : w.tableForm) === void 0 ? !1 : w == null ? void 0 : w.tableForm : !r.notTableForm), D = c(() => E.value ? !1 : r.showMessage), O = c(() => {
|
|
18
|
+
let e = {};
|
|
19
|
+
return r.disabledFields && r.disabledFields.forEach((t) => {
|
|
20
|
+
e[t] = !0;
|
|
21
|
+
}), e;
|
|
22
|
+
}), k = c(() => {
|
|
23
|
+
let e = {};
|
|
24
|
+
return r.enabledFields && r.enabledFields.length && r.enabledFields.forEach((t) => {
|
|
25
|
+
e[t] = !0;
|
|
26
|
+
}), e;
|
|
27
|
+
}), A = c(() => {
|
|
28
|
+
let e = {};
|
|
29
|
+
return r.requiredFields && r.requiredFields.length && r.requiredFields.forEach((t) => {
|
|
30
|
+
e[t] = !0;
|
|
31
|
+
}), e;
|
|
32
|
+
}), j = c(() => r.disabled === !0 ? !0 : r.disabled), M = h(() => r.enabledFields), N = h(() => r.requiredFields), P = h(() => r.disabledFields), F = async () => {
|
|
33
|
+
await f();
|
|
34
|
+
let e = T.value.$el.querySelector(".el-form-item.is-error");
|
|
35
|
+
e && e.scrollIntoView({
|
|
36
|
+
block: "center",
|
|
37
|
+
inline: "center",
|
|
38
|
+
behavior: "smooth"
|
|
39
|
+
});
|
|
40
|
+
}, I = m({
|
|
41
|
+
tableForm: E,
|
|
42
|
+
disabled: j,
|
|
43
|
+
enabledFields: M,
|
|
44
|
+
requiredFields: N,
|
|
45
|
+
enabledFieldsMap: k,
|
|
46
|
+
disabledFieldsMap: O,
|
|
47
|
+
requiredFieldsMap: A,
|
|
48
|
+
disabledFields: P,
|
|
49
|
+
scrollIntoRequiredField: F,
|
|
50
|
+
formRef: T,
|
|
51
|
+
validate: async () => {
|
|
52
|
+
try {
|
|
53
|
+
return await T.value.validate();
|
|
54
|
+
} catch {
|
|
55
|
+
throw await F(), T.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
|
|
56
|
+
s(e, "breathe-animation");
|
|
57
|
+
}), Error("表单验证不通过!");
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
validateField: (e) => T.value.validateField(e),
|
|
61
|
+
resetFields: (e) => T.value.resetFields(e),
|
|
62
|
+
scrollToField: (e) => T.value.scrollToField(e),
|
|
63
|
+
clearValidate: (e) => T.value.clearValidate(e),
|
|
64
|
+
getField: () => T.value.getField(),
|
|
65
|
+
setInitialValues: (e) => T.value.setInitialValues(e),
|
|
66
|
+
getFields: () => T.value.fields
|
|
67
|
+
});
|
|
68
|
+
return p(t, I), b(I), () => l(_, d(C.value, S.value, x, {
|
|
69
|
+
ref: "form",
|
|
70
|
+
class: [
|
|
71
|
+
"form-holder",
|
|
72
|
+
"clear-fix",
|
|
73
|
+
{ "red-form": E }
|
|
74
|
+
],
|
|
75
|
+
"show-message": D.value
|
|
76
|
+
}), { default: () => {
|
|
77
|
+
if (E.value) {
|
|
78
|
+
var e, t, n;
|
|
79
|
+
return [
|
|
80
|
+
(e = y.top) == null ? void 0 : e.call(y),
|
|
81
|
+
l(o, {
|
|
82
|
+
class: { "hide-error-message": E.value },
|
|
83
|
+
columns: r.columns,
|
|
84
|
+
"col-count": r.colCount
|
|
85
|
+
}, { default: () => {
|
|
86
|
+
var e;
|
|
87
|
+
return [(e = y.default) == null ? void 0 : e.call(y), r.showAdvice ? l(a, {
|
|
88
|
+
"label-colspan": r.commentLabelColspan,
|
|
89
|
+
"value-colspan": r.commentValueColspan
|
|
90
|
+
}, null) : null];
|
|
91
|
+
} }),
|
|
92
|
+
(t = y.bottom) == null ? void 0 : t.call(y),
|
|
93
|
+
l("div", { class: "red-form-footer" }, [(n = y.footer) == null ? void 0 : n.call(y)])
|
|
94
|
+
];
|
|
95
|
+
} else {
|
|
96
|
+
var i;
|
|
97
|
+
return r.wrapRow ? l(v, null, { default: () => {
|
|
98
|
+
var e;
|
|
99
|
+
return [(e = y.default) == null ? void 0 : e.call(y)];
|
|
100
|
+
} }) : (i = y.default) == null ? void 0 : i.call(y);
|
|
101
|
+
}
|
|
102
|
+
} });
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
//#endregion
|
|
106
|
+
export { y as t };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { allProps as e, predicate as t } from "../props/cascader.mjs";
|
|
2
|
+
import { n, o as r } from "./DEC2O0q-.mjs";
|
|
3
|
+
import { useDictionary as i } from "../hook/useDictionary.mjs";
|
|
4
|
+
import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
|
|
5
|
+
import { computed as l, createVNode as u, mergeProps as d } from "vue";
|
|
6
|
+
import { cloneDeep as f } from "@web-utils/integrations/lodash";
|
|
7
|
+
import { ElCascader as p } from "element-plus/es";
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/components/form/FormCascader.vue
|
|
10
|
+
var m = {
|
|
11
|
+
name: "FormCascader",
|
|
12
|
+
props: { ...e },
|
|
13
|
+
emits: { ...n },
|
|
14
|
+
setup(e, { emit: n, slots: m, attrs: h }) {
|
|
15
|
+
let { emitInput: g, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = r(e, {
|
|
16
|
+
emit: n,
|
|
17
|
+
slots: m,
|
|
18
|
+
attrs: h,
|
|
19
|
+
predicate: t
|
|
20
|
+
}), { dictItems: S } = i(e), C = l(() => {
|
|
21
|
+
if (e.dictType) return S.value;
|
|
22
|
+
if (e.options) {
|
|
23
|
+
let t = f(e.options);
|
|
24
|
+
return e.last && c(t), t;
|
|
25
|
+
} else return [];
|
|
26
|
+
}), w = l(() => {
|
|
27
|
+
if (e.join) return o(e.modelValue) ? e.modelValue : s(e.modelValue) ? e.modelValue.split(e.separator) : [];
|
|
28
|
+
if (e.last) {
|
|
29
|
+
let [t] = a(C.value, (t) => t[e.valueKey] === e.modelValue), n = [];
|
|
30
|
+
for (; t;) n.push(t[e.valueKey]), t = t.parent;
|
|
31
|
+
return n.reverse();
|
|
32
|
+
}
|
|
33
|
+
return e.modelValue;
|
|
34
|
+
}), T = (t) => {
|
|
35
|
+
e.join && o(t) ? g(t.join(e.separator)) : g(e.last ? t[t.length - 1] : t);
|
|
36
|
+
};
|
|
37
|
+
return () => _({ vNodes: u(p, d(b.value, x.value, {
|
|
38
|
+
style: "width: 100%",
|
|
39
|
+
class: { "is-readonly": e.readonly },
|
|
40
|
+
"model-value": w.value,
|
|
41
|
+
options: C.value,
|
|
42
|
+
props: {
|
|
43
|
+
checkStrictly: e.checkStrictly,
|
|
44
|
+
label: e.labelKey,
|
|
45
|
+
value: e.valueKey,
|
|
46
|
+
emitPath: e.emitPath,
|
|
47
|
+
expandTrigger: "hover"
|
|
48
|
+
},
|
|
49
|
+
disabled: y.value,
|
|
50
|
+
placeholder: v.value,
|
|
51
|
+
"onUpdate:modelValue": T
|
|
52
|
+
}), null) });
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { m as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { n as e } from "./DEC2O0q-.mjs";
|
|
2
|
+
import { t } from "./BWoKh6f6.mjs";
|
|
3
|
+
import { allProps as n } from "../props/textarea.mjs";
|
|
4
|
+
import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
5
|
+
//#region src/components/form/FormTextarea.vue?vue&type=script&lang.jsx
|
|
6
|
+
function s(e) {
|
|
7
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/form/FormTextarea.vue
|
|
11
|
+
var c = {
|
|
12
|
+
name: "FormTextarea",
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
props: { ...n },
|
|
15
|
+
emits: { ...e },
|
|
16
|
+
setup(e, { slots: n, attrs: i }) {
|
|
17
|
+
let c = o(e, "modelValue");
|
|
18
|
+
return () => r(t, a(e, i, {
|
|
19
|
+
modelValue: c.value,
|
|
20
|
+
"onUpdate:modelValue": (e) => c.value = e,
|
|
21
|
+
block: e.block === void 0 ? !0 : e.block,
|
|
22
|
+
type: "textarea"
|
|
23
|
+
}), s(n) ? n : { default: () => [n] });
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { c as t };
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { f as e, o as t, p as n } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { f as e, o as t, p as n } from "./DuOxL6xh.mjs";
|
|
2
|
+
import { formItemProps as r, predicate as i, useFormItemAutoBind as a } from "../props/form-item.mjs";
|
|
3
|
+
import { colProps as o, predicate as s, useColAutoBind as c } from "../props/col.mjs";
|
|
4
|
+
import { formHolderContextKey as l, formItemConfigProviderContextKey as u, formItemGroupContextKey as d, formViewContextKey as f } from "../constants/index.mjs";
|
|
5
|
+
import { useFormItemProps as p, useRequired as m } from "../helper/form-item.mjs";
|
|
6
|
+
import { computed as h, createVNode as g, h as _, inject as v, mergeProps as y, nextTick as b, toRef as x, useTemplateRef as S } from "vue";
|
|
7
|
+
import { ElCol as C, rowContextKey as w } from "element-plus";
|
|
8
|
+
import { ElCol as T, ElFormItem as E, ElTooltip as D } from "element-plus/es";
|
|
7
9
|
//#endregion
|
|
8
10
|
//#region src/components/form/FormItemX.vue
|
|
9
|
-
var
|
|
11
|
+
var O = {
|
|
10
12
|
name: "FormItemX",
|
|
11
13
|
inheritAttrs: !1,
|
|
12
14
|
props: {
|
|
13
|
-
...
|
|
14
|
-
...
|
|
15
|
+
...r,
|
|
16
|
+
...o
|
|
15
17
|
},
|
|
16
|
-
setup(e, { attrs: t, slots: n, expose:
|
|
17
|
-
let o = v(
|
|
18
|
-
if (
|
|
18
|
+
setup(e, { attrs: t, slots: n, expose: r }) {
|
|
19
|
+
let o = v(w, null), d = v(u, null), f = v(l, null), p = t.embed ? h(() => t.disabled) : A(e), _ = a(e, { predicate: i }), x = c(e, { predicate: s }), C = h(() => (d == null ? void 0 : d.reactive) === !0 && d.block === !1 && e.fixedSpan === void 0 && !e.half), O = m(e), k = S("formItem"), j = h(() => (d == null ? void 0 : d.wrapCol) === !1 ? !1 : !!o && e.wrapCol), M = h(() => f != null && f.tableForm ? "" : d != null && d.block ? "100%" : e.half && j.value ? `calc(50% - ${o.gutter.value / 2}px)` : ""), N = h(() => (d == null ? void 0 : d.block) === !0 || e.block || e.half ? 24 : e.span), P = h(() => {
|
|
20
|
+
if (p.value) return [];
|
|
19
21
|
if (O.value) {
|
|
20
22
|
let t = {
|
|
21
23
|
required: !0,
|
|
@@ -25,25 +27,25 @@ var D = {
|
|
|
25
27
|
}
|
|
26
28
|
return e.rules;
|
|
27
29
|
});
|
|
28
|
-
return
|
|
30
|
+
return r({
|
|
29
31
|
clearValidate: async () => {
|
|
30
32
|
var e;
|
|
31
|
-
await b(), (e =
|
|
33
|
+
await b(), (e = k.value) == null || e.clearValidate();
|
|
32
34
|
},
|
|
33
35
|
validate: async () => {
|
|
34
36
|
var e;
|
|
35
|
-
await b(), (e =
|
|
37
|
+
await b(), (e = k.value) == null || e.validate();
|
|
36
38
|
}
|
|
37
39
|
}), () => {
|
|
38
40
|
var r;
|
|
39
|
-
let i = n.tips || e.tips, a = i ? g(
|
|
41
|
+
let i = n.tips || e.tips, a = i ? g(D, {
|
|
40
42
|
effect: "light",
|
|
41
43
|
content: e.tips,
|
|
42
44
|
offset: 4
|
|
43
45
|
}, {
|
|
44
46
|
default: () => g("i", { class: "el-icon-info form-item-input-info" }, null),
|
|
45
47
|
content: n.tips ? n.tips : null
|
|
46
|
-
}) : null, o = g(
|
|
48
|
+
}) : null, o = g(E, y(_.value, t, {
|
|
47
49
|
ref: "formItem",
|
|
48
50
|
style: { width: M.value },
|
|
49
51
|
class: [
|
|
@@ -52,7 +54,7 @@ var D = {
|
|
|
52
54
|
{
|
|
53
55
|
"form-item-hide-label": e.hideLabel,
|
|
54
56
|
"with-tips": !e.tipsAfterLabel && i,
|
|
55
|
-
required:
|
|
57
|
+
required: p.value === !1 && O.value
|
|
56
58
|
}
|
|
57
59
|
],
|
|
58
60
|
rules: P.value
|
|
@@ -61,13 +63,13 @@ var D = {
|
|
|
61
63
|
default: () => {
|
|
62
64
|
var t;
|
|
63
65
|
return [(t = n.default) == null ? void 0 : t.call(n, {
|
|
64
|
-
disabled:
|
|
66
|
+
disabled: p.value,
|
|
65
67
|
required: O.value
|
|
66
68
|
}), i && !e.tipsAfterLabel ? a : null];
|
|
67
69
|
},
|
|
68
70
|
label: () => [n.label ? n.label() : e.label, e.tipsAfterLabel ? a : null]
|
|
69
71
|
}), s = [o, (r = n.below) == null ? void 0 : r.call(n)];
|
|
70
|
-
return e.unwrap ? s : j.value ? g(
|
|
72
|
+
return e.unwrap ? s : j.value ? g(T, y(x.value, C.value ? {
|
|
71
73
|
xs: 24,
|
|
72
74
|
sm: 12,
|
|
73
75
|
md: 12,
|
|
@@ -76,8 +78,8 @@ var D = {
|
|
|
76
78
|
} : {}, { span: N.value }), { default: () => s }) : o;
|
|
77
79
|
};
|
|
78
80
|
}
|
|
79
|
-
},
|
|
80
|
-
let t = v(
|
|
81
|
+
}, k = "update:modelValue", A = (e) => {
|
|
82
|
+
let t = v(l, null), n = v(d, null);
|
|
81
83
|
return h(() => {
|
|
82
84
|
if (e.disabled !== void 0) return e.disabled;
|
|
83
85
|
if (t) {
|
|
@@ -86,7 +88,7 @@ var D = {
|
|
|
86
88
|
}
|
|
87
89
|
return (n == null ? void 0 : n.enabled) === !0 ? !1 : (n == null ? void 0 : n.disabled) === !0 ? !0 : (t == null ? void 0 : t.disabled) === !0;
|
|
88
90
|
});
|
|
89
|
-
},
|
|
91
|
+
}, j = { [k]: null }, M = (e, t) => e(k, t), N = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? _(O, {
|
|
90
92
|
...n.value,
|
|
91
93
|
embed: !0,
|
|
92
94
|
disabled: i == null ? void 0 : i.value
|
|
@@ -96,32 +98,32 @@ var D = {
|
|
|
96
98
|
error: r.error,
|
|
97
99
|
tips: r.tips,
|
|
98
100
|
below: r.below
|
|
99
|
-
}) : t,
|
|
100
|
-
let b =
|
|
101
|
-
rules:
|
|
102
|
-
block:
|
|
103
|
-
attrs:
|
|
104
|
-
class:
|
|
105
|
-
message:
|
|
101
|
+
}) : t, P = (r, { emit: i, slots: a, events: o, predicate: s, removeOn: c = !1, attrs: l, block: u, class: d, rules: m, messagePrefix: g = "请输入", extraFormItemProps: y }) => {
|
|
102
|
+
let b = A(r), S = v(f, null), w = h(() => b.value ? "" : `${g}${r.label}`), T = p(r, {
|
|
103
|
+
rules: m,
|
|
104
|
+
block: x(() => u === void 0 ? r.type === "textarea" && r.block === void 0 ? !0 : r.block : u),
|
|
105
|
+
attrs: l,
|
|
106
|
+
class: d,
|
|
107
|
+
message: w.value,
|
|
106
108
|
messagePrefix: g,
|
|
107
109
|
...y
|
|
108
|
-
}),
|
|
109
|
-
vNodes:
|
|
110
|
-
formItemProps:
|
|
110
|
+
}), E = (e) => M(i, e), D = (e) => r.col ? _(C, { span: r.block ? 24 : r.span }, { default: () => e }) : e, O = ({ vNodes: e }) => N(r, {
|
|
111
|
+
vNodes: D(e),
|
|
112
|
+
formItemProps: T,
|
|
111
113
|
slots: a,
|
|
112
114
|
disabled: b
|
|
113
|
-
}),
|
|
115
|
+
}), k = h(() => t(r, s, o, i)), j = n({ removeOn: c });
|
|
114
116
|
return {
|
|
115
|
-
emitInput:
|
|
116
|
-
render:
|
|
117
|
-
placeholder:
|
|
117
|
+
emitInput: E,
|
|
118
|
+
render: O,
|
|
119
|
+
placeholder: w,
|
|
118
120
|
disabled: b,
|
|
119
|
-
formItemProps:
|
|
120
|
-
autoBind:
|
|
121
|
-
inputProps: e(r,
|
|
122
|
-
listeners:
|
|
123
|
-
printing: h(() => (
|
|
121
|
+
formItemProps: T,
|
|
122
|
+
autoBind: k,
|
|
123
|
+
inputProps: e(r, s),
|
|
124
|
+
listeners: j,
|
|
125
|
+
printing: h(() => (S == null ? void 0 : S.printing) === !0)
|
|
124
126
|
};
|
|
125
|
-
},
|
|
127
|
+
}, F = (e) => e.icon ? _("i", { class: e.icon }) : null;
|
|
126
128
|
//#endregion
|
|
127
|
-
export {
|
|
129
|
+
export { A as a, M as i, j as n, P as o, N as r, O as s, F as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { t } from "./
|
|
1
|
+
import { t as e } from "./usyXQe35.mjs";
|
|
2
|
+
import { t } from "./B1MSrc6f.mjs";
|
|
3
3
|
import { copy as n } from "@web-utils/core";
|
|
4
4
|
import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, openBlock as u, renderList as d, toDisplayString as f, withCtx as p } from "vue";
|
|
5
5
|
import { ElInputNumber as m, ElOption as h, ElRadio as ee, ElRadioGroup as g, ElSelect as _, ElTabPane as v, ElTabs as y } from "element-plus/es";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { f as e } from "./DuOxL6xh.mjs";
|
|
2
|
+
import { useFormItemProps as t } from "../helper/form-item.mjs";
|
|
3
|
+
import { r as n } from "./DEC2O0q-.mjs";
|
|
4
|
+
import { allProps as r, predicate as i } from "../props/image.mjs";
|
|
5
|
+
import { createVNode as a, isVNode as o, mergeProps as s } from "vue";
|
|
6
|
+
import { ElImage as c } from "element-plus/es";
|
|
7
|
+
//#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
|
|
8
|
+
function l(e) {
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/form/FormImage.vue
|
|
13
|
+
var u = {
|
|
14
|
+
name: "FormImage",
|
|
15
|
+
inheritAttrs: !1,
|
|
16
|
+
props: { ...r },
|
|
17
|
+
emits: {},
|
|
18
|
+
setup(r, { slots: o, attrs: u }) {
|
|
19
|
+
let d = t(r, { attrs: u }), f = e(r, i);
|
|
20
|
+
return () => n(r, {
|
|
21
|
+
vNodes: a(c, s(f.value, u, { "preview-src-list": [r.src] }), l(o) ? o : { default: () => [o] }),
|
|
22
|
+
formItemProps: d,
|
|
23
|
+
slots: o
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { u as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as e } from "./
|
|
2
|
-
import {
|
|
1
|
+
import { n as e } from "./DEC2O0q-.mjs";
|
|
2
|
+
import { t } from "./BWoKh6f6.mjs";
|
|
3
|
+
import { allProps as n } from "../props/input.mjs";
|
|
3
4
|
import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
4
5
|
//#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
|
|
5
6
|
function s(e) {
|
|
@@ -10,15 +11,15 @@ function s(e) {
|
|
|
10
11
|
var c = {
|
|
11
12
|
name: "FormInputEmail",
|
|
12
13
|
inheritAttrs: !1,
|
|
13
|
-
props: { ...
|
|
14
|
+
props: { ...n },
|
|
14
15
|
emits: { ...e },
|
|
15
|
-
setup(e, { slots:
|
|
16
|
+
setup(e, { slots: n, attrs: i }) {
|
|
16
17
|
let c = o(e, "modelValue");
|
|
17
|
-
return () => r(
|
|
18
|
+
return () => r(t, a(e, i, {
|
|
18
19
|
modelValue: c.value,
|
|
19
20
|
"onUpdate:modelValue": (e) => c.value = e,
|
|
20
21
|
type: "email"
|
|
21
|
-
}), s(
|
|
22
|
+
}), s(n) ? n : { default: () => [n] });
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
//#endregion
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { n as e, o as t } from "./DEC2O0q-.mjs";
|
|
2
|
+
import { allProps as n, predicate as r } from "../props/switch.mjs";
|
|
3
|
+
import { createVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
4
|
+
import { ElSwitch as s } from "element-plus/es";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/form/FormSwitch.vue
|
|
7
|
+
var c = {
|
|
8
|
+
name: "FormSwitch",
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
props: { ...n },
|
|
11
|
+
emits: { ...e },
|
|
12
|
+
setup(e, { emit: n, slots: c, attrs: l }) {
|
|
13
|
+
let u = o(e, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = t(e, {
|
|
14
|
+
emit: n,
|
|
15
|
+
attrs: l,
|
|
16
|
+
slots: c,
|
|
17
|
+
predicate: r
|
|
18
|
+
});
|
|
19
|
+
return () => d({ vNodes: i(s, a(p.value, m.value, {
|
|
20
|
+
modelValue: u.value,
|
|
21
|
+
"onUpdate:modelValue": (e) => u.value = e,
|
|
22
|
+
disabled: f.value
|
|
23
|
+
}), {
|
|
24
|
+
"active-action": c["active-action"],
|
|
25
|
+
"inactive-action": c["inactive-action"],
|
|
26
|
+
active: c.active,
|
|
27
|
+
inactive: c.inactive
|
|
28
|
+
}) });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { c as t };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n,
|
|
3
|
-
import { n as i, t as a } from "./
|
|
1
|
+
import { commonAutoBindProps as e, commonManualBindProps as t } from "../props/common.mjs";
|
|
2
|
+
import { n, o as r } from "./DEC2O0q-.mjs";
|
|
3
|
+
import { n as i, t as a } from "./rJWvEBq9.mjs";
|
|
4
4
|
import { createVNode as o, mergeProps as s, ref as c, useModel as l } from "vue";
|
|
5
5
|
//#region src/components/table/form-table.ts
|
|
6
6
|
var u = {
|
|
7
|
-
...
|
|
8
|
-
...
|
|
7
|
+
...t,
|
|
8
|
+
...e,
|
|
9
9
|
...i
|
|
10
10
|
}, d = {
|
|
11
11
|
modelValue: !0,
|
|
12
12
|
block: !0
|
|
13
|
-
}, f = (e) =>
|
|
13
|
+
}, f = (e) => t[e] === void 0 && d[e] !== !0, p = {
|
|
14
14
|
name: "FormTable",
|
|
15
15
|
props: { ...u },
|
|
16
16
|
emits: {
|
|
17
|
-
...
|
|
17
|
+
...n,
|
|
18
18
|
"add-row": null
|
|
19
19
|
},
|
|
20
|
-
setup(e, { emit:
|
|
20
|
+
setup(e, { emit: t, attrs: n, slots: i }) {
|
|
21
21
|
let u = l(e, "modelValue"), d = c([]), p = (e) => {
|
|
22
22
|
d.value = e;
|
|
23
|
-
}, { render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } =
|
|
24
|
-
emit:
|
|
23
|
+
}, { render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = r(e, {
|
|
24
|
+
emit: t,
|
|
25
25
|
slots: i,
|
|
26
|
-
attrs:
|
|
26
|
+
attrs: n,
|
|
27
27
|
predicate: f,
|
|
28
28
|
block: e.block === void 0 ? !0 : e.block
|
|
29
29
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { n as e, o as t } from "./DEC2O0q-.mjs";
|
|
2
|
+
import { allProps as n, predicate as r } from "../props/time-select.mjs";
|
|
3
|
+
import { createVNode as i, mergeProps as a } from "vue";
|
|
4
|
+
import { ElTimeSelect as o } from "element-plus/es";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/form/FormTimeSelect.vue
|
|
7
|
+
var s = {
|
|
8
|
+
name: "FormTimeSelect",
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
props: { ...n },
|
|
11
|
+
emits: { ...e },
|
|
12
|
+
setup(e, { emit: n, slots: s, attrs: c }) {
|
|
13
|
+
let { emitInput: l, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = t(e, {
|
|
14
|
+
emit: n,
|
|
15
|
+
slots: s,
|
|
16
|
+
attrs: c,
|
|
17
|
+
predicate: r
|
|
18
|
+
});
|
|
19
|
+
return () => u({ vNodes: i(o, a(p.value, m.value, {
|
|
20
|
+
style: "width: 100%",
|
|
21
|
+
modelValue: e.modelValue,
|
|
22
|
+
disabled: f.value,
|
|
23
|
+
"onUpdate:modelValue": l,
|
|
24
|
+
placeholder: d.value
|
|
25
|
+
}), null) });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { s as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, f as t } from "./
|
|
1
|
+
import { a as e, f as t } from "./DuOxL6xh.mjs";
|
|
2
2
|
import { t as n } from "./DOZRzqlo.mjs";
|
|
3
3
|
import { cellClickHandlerContextKey as r } from "../constants/index.mjs";
|
|
4
|
-
import { n as i, t as a } from "./
|
|
4
|
+
import { n as i, t as a } from "./CI1ehQi5.mjs";
|
|
5
5
|
import { createVNode as o, inject as s, mergeProps as c } from "vue";
|
|
6
6
|
import { ElTableColumn as l } from "element-plus/es";
|
|
7
7
|
//#region src/components/table/TableColumn.vue?vue&type=script&lang.jsx
|