@web-utils/form-ui 1.0.0-beta4 → 1.0.0-beta40
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/base.css +1 -0
- package/chunks/B1MSrc6f.mjs +8 -0
- package/chunks/B3ajWLh3.mjs +198 -0
- package/chunks/BH_JJ8Xh.mjs +106 -0
- package/chunks/BWBHzD5N.mjs +89 -0
- package/chunks/Bd1UFJic.mjs +660 -0
- package/chunks/Bm5eiSmT.mjs +79 -0
- package/chunks/BsCS7SB5.mjs +141 -0
- package/chunks/BufIRDd0.mjs +185 -0
- package/chunks/C1AgOUe_.mjs +172 -0
- package/chunks/C3Uo82-I.mjs +35 -0
- package/chunks/C9dGL28n.mjs +56 -0
- package/chunks/CFOGMFgo.mjs +150 -0
- package/chunks/CLPSCSsy.mjs +603 -0
- package/chunks/CSyJ-vEx.mjs +17 -0
- package/chunks/CTKmEf2M.mjs +93 -0
- package/chunks/CWfUPCtS.mjs +1360 -0
- package/chunks/CXvGoZKJ.mjs +198 -0
- package/chunks/Cab-ZjRx.mjs +164 -0
- package/chunks/ChmDDqoZ2.mjs +478 -0
- package/chunks/Cj59E77g.mjs +230 -0
- package/chunks/CqTcEefA.mjs +93 -0
- package/chunks/Ct5bDJ50.mjs +38 -0
- package/chunks/CuG2Q-PM.mjs +100 -0
- package/chunks/D8UVq1t1.mjs +176 -0
- package/chunks/DDmQcNm6.mjs +93 -0
- package/chunks/DF9fJMQS.mjs +105 -0
- package/chunks/DJe97Fgi.mjs +107 -0
- package/chunks/DXYgAmil.mjs +317 -0
- package/chunks/DhtHh0jk.mjs +87 -0
- package/chunks/DiJyms_r.mjs +100 -0
- package/chunks/Ds_Tpa_M.mjs +83 -0
- package/chunks/TvNHGVAP.mjs +25 -0
- package/chunks/XCGWTz41.mjs +25 -0
- package/chunks/XqRTtFfp.mjs +166 -0
- package/chunks/cmuHpsX6.mjs +109 -0
- package/chunks/o6VhYAN52.mjs +207 -0
- package/chunks/pdwFQpA8.mjs +57 -0
- package/chunks/taicx2sd.mjs +25 -0
- package/confirm-button/index.d.ts +113 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +84 -0
- package/confirmable/index.mjs +8 -0
- package/constants/index.d.ts +53 -0
- package/constants/index.mjs +4 -0
- package/editable-tree/index.d.ts +254 -0
- package/editable-tree/index.mjs +2 -0
- package/editable-tree/style.css +1 -0
- package/element-dialog/index.d.ts +337 -16
- package/element-dialog/index.mjs +2 -91
- 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 +13 -12
- package/form-button/index.d.ts +114 -0
- package/form-button/index.mjs +36 -0
- package/form-card/index.d.ts +14 -0
- package/form-card/index.mjs +18 -0
- package/form-cascader/index.d.ts +472 -0
- package/form-cascader/index.mjs +2 -0
- package/form-check-box-group/index.d.ts +289 -18
- package/form-check-box-group/index.mjs +1 -1
- package/form-check-box-group/style.css +1 -0
- package/form-checkbox/index.d.ts +236 -16
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.d.ts +390 -19
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +87 -20
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +1 -1
- package/form-image/index.d.ts +145 -13
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +301 -20
- package/form-input/index.mjs +1 -1
- package/form-input/style.css +1 -0
- package/form-input-cron-expression/index.d.ts +217 -0
- package/form-input-cron-expression/index.mjs +2 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.d.ts +307 -16
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +307 -16
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +246 -18
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +307 -16
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +263 -1
- package/form-input-tag/index.mjs +1 -3
- package/form-input-time/index.d.ts +434 -1
- package/form-input-time/index.mjs +1 -3
- package/form-item-config-provider/index.d.ts +22 -0
- package/form-item-config-provider/index.mjs +24 -0
- package/form-item-group/index.d.ts +91 -17
- package/form-item-group/index.mjs +2 -78
- package/form-item-group/style.css +1 -1
- package/form-item-x/index.d.ts +141 -11
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -0
- package/form-radio-group/index.d.ts +303 -16
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +254 -14
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.mjs +27 -26
- package/form-row/index.d.ts +2 -2
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +537 -18
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +283 -16
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +272 -14
- package/form-switch/index.mjs +1 -1
- package/form-text/index.d.ts +165 -13
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +351 -0
- package/form-textarea/index.mjs +2 -0
- package/form-time-select/index.d.ts +319 -0
- package/form-time-select/index.mjs +2 -0
- package/form-view/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/hook/useVisibilityChange.d.ts +4 -0
- package/hook/useVisibilityChange.mjs +14 -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 +52 -36
- package/index.mjs +54 -61
- package/package.json +10 -5
- package/pageable-table/index.d.ts +398 -0
- package/pageable-table/index.mjs +2 -0
- package/pageable-table/style.css +1 -0
- package/resize-observer/index.d.ts +8 -0
- package/resize-observer/index.mjs +40 -0
- package/resize-observer/style.css +1 -0
- package/resolver/index.mjs +29 -0
- package/table-column/index.d.ts +160 -0
- package/table-column/index.mjs +2 -0
- package/table-column/style.css +1 -0
- package/table-column-def/index.d.ts +85 -0
- package/table-column-def/index.mjs +11 -0
- package/table-view/index.d.ts +340 -1
- package/table-view/index.mjs +453 -6
- package/table-view/style.css +1 -0
- 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 +188 -1
- package/toolbar-button/index.mjs +1 -8
- package/vue-cron/index.d.ts +191 -0
- package/vue-cron/index.mjs +2 -0
- package/vue-cron/style.css +1 -0
- package/web-types.json +1 -1
- package/x-input-tag/index.d.ts +2 -0
- package/x-input-tag/index.mjs +227 -0
- package/x-input-tag/style.css +1 -0
- package/year-calendar/index.d.ts +99 -0
- package/year-calendar/index.mjs +2 -0
- package/year-calendar/style.css +1 -0
- package/chunks/B4M_TFeR.mjs +0 -152
- package/chunks/B5BIQCcK.mjs +0 -149
- package/chunks/BHNKrW1j.mjs +0 -61
- package/chunks/BO9jWhBl.mjs +0 -46
- package/chunks/BZ8aOa78.mjs +0 -35
- package/chunks/Bsz7y4Xp.mjs +0 -73
- package/chunks/Bxj372sF.mjs +0 -53
- package/chunks/C33EmJN8.mjs +0 -32
- package/chunks/C6Li3-l7.mjs +0 -28
- package/chunks/CBcdalMX.mjs +0 -35
- package/chunks/CdRsyF0n.mjs +0 -43
- package/chunks/ClNahmiU.mjs +0 -23
- package/chunks/CstztYMu.mjs +0 -28
- package/chunks/DC9b53M6.mjs +0 -32
- package/chunks/DDVAgRED.mjs +0 -36
- package/chunks/DpJQABVD.mjs +0 -91
- package/chunks/ZsLNWI9x.mjs +0 -46
- package/chunks/jn_iQrVZ.mjs +0 -28
- package/constants.d.ts +0 -1
- package/constants.mjs +0 -4
- package/input/style.css +0 -1
- package/resolver.mjs +0 -79
- package/utils/style.css +0 -1
- /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { isFunction as e } from "@web-utils/core";
|
|
2
|
+
import { defineComponent as t, h as n, resolveComponent as r } from "vue";
|
|
3
|
+
import { ElLoading as i, ElMessageBox as a } from "element-plus";
|
|
4
|
+
//#region src/components/button/confirmable-mixin.ts
|
|
5
|
+
async function o(t, n, r) {
|
|
6
|
+
let { stop: o, prevent: s, message: c, loadable: l, loadingText: u, confirmable: d, confirmType: f, confirmText: p, confirmTitle: m } = n;
|
|
7
|
+
o && t.stopPropagation(), s && t.preventDefault();
|
|
8
|
+
let { onBefore: h, onClick: g, onCancel: _, onAfter: v } = r;
|
|
9
|
+
if (e(g)) try {
|
|
10
|
+
let n = !0;
|
|
11
|
+
if (e(h) && (n = await h(t)), !n) return;
|
|
12
|
+
d && await a.confirm(c || p, {
|
|
13
|
+
type: f,
|
|
14
|
+
title: m
|
|
15
|
+
});
|
|
16
|
+
let r;
|
|
17
|
+
l && (r = i.service({
|
|
18
|
+
background: "rgba(0,0,0,0.3)",
|
|
19
|
+
text: u
|
|
20
|
+
}));
|
|
21
|
+
let o;
|
|
22
|
+
try {
|
|
23
|
+
o = await g(t);
|
|
24
|
+
} catch {}
|
|
25
|
+
l && (r == null || r.close()), e(v) && await v(t, o);
|
|
26
|
+
} catch (t) {
|
|
27
|
+
e(_) && await _(t);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var s = t({
|
|
31
|
+
inheritAttrs: !1,
|
|
32
|
+
props: {
|
|
33
|
+
stop: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
prevent: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !0
|
|
40
|
+
},
|
|
41
|
+
text: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
},
|
|
45
|
+
message: String,
|
|
46
|
+
confirmable: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
},
|
|
50
|
+
confirmText: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "你确定要删除该记录吗?"
|
|
53
|
+
},
|
|
54
|
+
confirmType: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "warning"
|
|
57
|
+
},
|
|
58
|
+
confirmTitle: String,
|
|
59
|
+
loadable: Boolean,
|
|
60
|
+
loadingText: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "正在处理中请稍候..."
|
|
63
|
+
},
|
|
64
|
+
tag: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "i"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
render() {
|
|
70
|
+
let e = r(this.tag), { text: t, ...i } = this.$props, { onClick: a, ...s } = this.$attrs;
|
|
71
|
+
return n(e, {
|
|
72
|
+
...s,
|
|
73
|
+
...i,
|
|
74
|
+
onClick: (e) => o(e, this.$props, this.$attrs)
|
|
75
|
+
}, { default: this.$slots.default || (() => t) });
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { s as t };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { useDictionary as r } from "../hook/useDictionary.mjs";
|
|
4
|
+
import { computed as i, createVNode as a, isVNode as o, mergeProps as s, useModel as c } from "vue";
|
|
5
|
+
import { ElRadio as l, ElRadioButton as u, ElRadioGroup as d } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/props/radio-group.ts
|
|
7
|
+
var f = {
|
|
8
|
+
...n,
|
|
9
|
+
modelValue: [
|
|
10
|
+
String,
|
|
11
|
+
Number,
|
|
12
|
+
Boolean
|
|
13
|
+
],
|
|
14
|
+
size: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "default"
|
|
17
|
+
},
|
|
18
|
+
validateEvent: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
textColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "#ffffff"
|
|
25
|
+
},
|
|
26
|
+
fill: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "#409eff"
|
|
29
|
+
},
|
|
30
|
+
ariaLabel: String,
|
|
31
|
+
name: String,
|
|
32
|
+
id: String,
|
|
33
|
+
options: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => []
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => ({
|
|
40
|
+
value: "value",
|
|
41
|
+
label: "label",
|
|
42
|
+
disabled: "disabled"
|
|
43
|
+
})
|
|
44
|
+
},
|
|
45
|
+
type: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "radio"
|
|
48
|
+
},
|
|
49
|
+
border: Boolean,
|
|
50
|
+
gender: Boolean,
|
|
51
|
+
overFlow: Boolean,
|
|
52
|
+
confirm: Boolean,
|
|
53
|
+
trigger: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "change"
|
|
56
|
+
},
|
|
57
|
+
labelProp: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "name"
|
|
60
|
+
},
|
|
61
|
+
valueProp: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "code"
|
|
64
|
+
},
|
|
65
|
+
english: Boolean,
|
|
66
|
+
chinese: Boolean,
|
|
67
|
+
typing: Boolean,
|
|
68
|
+
classic: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !0
|
|
71
|
+
},
|
|
72
|
+
fillRow: Boolean,
|
|
73
|
+
ellipsis: Boolean,
|
|
74
|
+
inline: Boolean,
|
|
75
|
+
allowCancel: Boolean,
|
|
76
|
+
radioType: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: "radio"
|
|
79
|
+
},
|
|
80
|
+
dictType: String
|
|
81
|
+
}, p = {
|
|
82
|
+
modelValue: !0,
|
|
83
|
+
disabled: !0,
|
|
84
|
+
type: !0,
|
|
85
|
+
options: !0
|
|
86
|
+
}, m = (e) => n[e] === void 0 && p[e] !== !0;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/components/form/FormRadioGroup.vue?vue&type=script&lang.jsx
|
|
89
|
+
function h(e) {
|
|
90
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/components/form/FormRadioGroup.vue
|
|
94
|
+
var g = {
|
|
95
|
+
name: "FormRadioGroup",
|
|
96
|
+
inheritAttrs: !1,
|
|
97
|
+
props: { ...f },
|
|
98
|
+
emits: { ...t },
|
|
99
|
+
setup(t, { slots: n, attrs: o, emit: f }) {
|
|
100
|
+
let p = c(t, "modelValue"), { render: g, disabled: _, listeners: v, inputProps: y } = e(t, {
|
|
101
|
+
emit: f,
|
|
102
|
+
slots: n,
|
|
103
|
+
attrs: o,
|
|
104
|
+
predicate: m,
|
|
105
|
+
messagePrefix: "请选择"
|
|
106
|
+
}), b = i(() => t.classic ? "label" : t.labelProp), x = i(() => t.classic ? "value" : t.valueProp), { dictItems: S } = r(t), C = i(() => t.dictType ? S.value : t.gender ? [{
|
|
107
|
+
[b.value]: "男",
|
|
108
|
+
[x.value]: t.chinese ? "男" : t.typing ? 1 : "1"
|
|
109
|
+
}, {
|
|
110
|
+
[b.value]: "女",
|
|
111
|
+
[x.value]: t.chinese ? "女" : t.typing ? 2 : "2"
|
|
112
|
+
}] : t.confirm ? [{
|
|
113
|
+
[b.value]: "是",
|
|
114
|
+
[x.value]: t.chinese ? "是" : t.english ? "Y" : t.typing ? 1 : "1"
|
|
115
|
+
}, {
|
|
116
|
+
[b.value]: "否",
|
|
117
|
+
[x.value]: t.chinese ? "否" : t.english ? "N" : t.typing ? 0 : "0"
|
|
118
|
+
}] : t.options);
|
|
119
|
+
return () => g({ vNodes: a(d, s(v.value, y.value, {
|
|
120
|
+
modelValue: p.value,
|
|
121
|
+
"onUpdate:modelValue": (e) => p.value = e,
|
|
122
|
+
disabled: _.value
|
|
123
|
+
}), {
|
|
124
|
+
...n,
|
|
125
|
+
default: n.default || (() => {
|
|
126
|
+
var e;
|
|
127
|
+
return (e = C.value) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" || t.radioType === "button" ? a(u, {
|
|
128
|
+
key: e,
|
|
129
|
+
value: e,
|
|
130
|
+
disabled: r
|
|
131
|
+
}, h(n) ? n : { default: () => [n] }) : a(l, {
|
|
132
|
+
key: e,
|
|
133
|
+
value: e,
|
|
134
|
+
disabled: r
|
|
135
|
+
}, h(n) ? n : { default: () => [n] }));
|
|
136
|
+
})
|
|
137
|
+
}) });
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
141
|
+
export { g as t };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { u as e } from "./cmuHpsX6.mjs";
|
|
2
|
+
import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
|
|
3
|
+
import r from "../form-advice/index.mjs";
|
|
4
|
+
import i from "../form-red-table/index.mjs";
|
|
5
|
+
import { animate as a } from "@web-utils/core";
|
|
6
|
+
import { computed as o, createVNode as s, inject as c, mergeProps as l, nextTick as u, provide as d, reactive as f, toRef as p, useTemplateRef as m } from "vue";
|
|
7
|
+
import { ElForm as h, ElRow as g } from "element-plus/es";
|
|
8
|
+
//#region src/components/form/props/form.ts
|
|
9
|
+
var _ = {
|
|
10
|
+
model: Object,
|
|
11
|
+
rules: Object,
|
|
12
|
+
inline: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
labelPosition: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "right"
|
|
19
|
+
},
|
|
20
|
+
labelWidth: {
|
|
21
|
+
type: [String, Number],
|
|
22
|
+
default: "auto"
|
|
23
|
+
},
|
|
24
|
+
labelSuffix: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
hideRequiredAsterisk: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
requireAsteriskPosition: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "left"
|
|
35
|
+
},
|
|
36
|
+
showMessage: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !0
|
|
39
|
+
},
|
|
40
|
+
inlineMessage: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
statusIcon: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
validateOnRuleChange: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
},
|
|
52
|
+
size: String,
|
|
53
|
+
disabled: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: void 0
|
|
56
|
+
},
|
|
57
|
+
scrollToError: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
scrollIntoViewOptions: [Object, Boolean],
|
|
62
|
+
requiredFields: Array,
|
|
63
|
+
disabledFields: Array,
|
|
64
|
+
enabledFields: Array,
|
|
65
|
+
showAdvice: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !0
|
|
68
|
+
},
|
|
69
|
+
columns: [Array, Object],
|
|
70
|
+
colCount: Number,
|
|
71
|
+
notTableForm: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: void 0
|
|
74
|
+
},
|
|
75
|
+
commentValueColspan: Number,
|
|
76
|
+
commentLabelColspan: Number,
|
|
77
|
+
wrapRow: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: !0
|
|
80
|
+
}
|
|
81
|
+
}, v = {
|
|
82
|
+
showMessage: !0,
|
|
83
|
+
required: !0,
|
|
84
|
+
requiredFields: !0,
|
|
85
|
+
disabledFields: !0,
|
|
86
|
+
enabledFields: !0,
|
|
87
|
+
showAdvice: !0,
|
|
88
|
+
columns: !0,
|
|
89
|
+
colCount: !0,
|
|
90
|
+
notTableForm: !0,
|
|
91
|
+
commentValueColspan: !0,
|
|
92
|
+
commentLabelColspan: !0,
|
|
93
|
+
wrapRow: !0
|
|
94
|
+
}, y = (e) => v[e] !== !0, b = {
|
|
95
|
+
name: "FormHolder",
|
|
96
|
+
inheritAttrs: !1,
|
|
97
|
+
props: { ..._ },
|
|
98
|
+
emits: {},
|
|
99
|
+
setup(_, { slots: v, expose: b }) {
|
|
100
|
+
let { autoBindProps: x, listeners: S } = e(_, { predicate: y }), C = c(n, null), w = m("form"), T = o(() => _.notTableForm === void 0 ? (C == null ? void 0 : C.tableForm) === void 0 ? !1 : C == null ? void 0 : C.tableForm : !_.notTableForm), E = o(() => T.value ? !1 : _.showMessage), D = o(() => {
|
|
101
|
+
let e = {};
|
|
102
|
+
return _.disabledFields && _.disabledFields.forEach((t) => {
|
|
103
|
+
e[t] = !0;
|
|
104
|
+
}), e;
|
|
105
|
+
}), O = o(() => {
|
|
106
|
+
let e = {};
|
|
107
|
+
return _.enabledFields && _.enabledFields.length && _.enabledFields.forEach((t) => {
|
|
108
|
+
e[t] = !0;
|
|
109
|
+
}), e;
|
|
110
|
+
}), k = o(() => {
|
|
111
|
+
let e = {};
|
|
112
|
+
return _.requiredFields && _.requiredFields.length && _.requiredFields.forEach((t) => {
|
|
113
|
+
e[t] = !0;
|
|
114
|
+
}), e;
|
|
115
|
+
}), A = o(() => _.disabled === !0 ? !0 : _.disabled), j = p(() => _.enabledFields), M = p(() => _.requiredFields), N = p(() => _.disabledFields), P = async () => {
|
|
116
|
+
await u();
|
|
117
|
+
let e = w.value.$el.querySelector(".el-form-item.is-error");
|
|
118
|
+
e && e.scrollIntoView({
|
|
119
|
+
block: "center",
|
|
120
|
+
inline: "center",
|
|
121
|
+
behavior: "smooth"
|
|
122
|
+
});
|
|
123
|
+
}, F = f({
|
|
124
|
+
tableForm: T,
|
|
125
|
+
disabled: A,
|
|
126
|
+
enabledFields: j,
|
|
127
|
+
requiredFields: M,
|
|
128
|
+
enabledFieldsMap: O,
|
|
129
|
+
disabledFieldsMap: D,
|
|
130
|
+
requiredFieldsMap: k,
|
|
131
|
+
disabledFields: N,
|
|
132
|
+
scrollIntoRequiredField: P,
|
|
133
|
+
formRef: w,
|
|
134
|
+
validate: async () => {
|
|
135
|
+
try {
|
|
136
|
+
return await w.value.validate();
|
|
137
|
+
} catch {
|
|
138
|
+
throw await P(), w.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
|
|
139
|
+
a(e, "breathe-animation");
|
|
140
|
+
}), Error("表单验证不通过!");
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
validateField: (e) => w.value.validateField(e),
|
|
144
|
+
resetFields: (e) => w.value.resetFields(e),
|
|
145
|
+
scrollToField: (e) => w.value.scrollToField(e),
|
|
146
|
+
clearValidate: (e) => w.value.clearValidate(e),
|
|
147
|
+
getField: () => w.value.getField(),
|
|
148
|
+
setInitialValues: (e) => w.value.setInitialValues(e),
|
|
149
|
+
getFields: () => w.value.fields
|
|
150
|
+
});
|
|
151
|
+
return d(t, F), b(F), () => s(h, l(S.value, x.value, {
|
|
152
|
+
ref: "form",
|
|
153
|
+
class: "form-holder",
|
|
154
|
+
"show-message": E.value
|
|
155
|
+
}), { default: () => {
|
|
156
|
+
if (T.value) {
|
|
157
|
+
var e, t, n;
|
|
158
|
+
return [
|
|
159
|
+
(e = v.top) == null ? void 0 : e.call(v),
|
|
160
|
+
s(i, {
|
|
161
|
+
class: { "hide-error-message": T.value },
|
|
162
|
+
columns: _.columns,
|
|
163
|
+
"col-count": _.colCount
|
|
164
|
+
}, { default: () => {
|
|
165
|
+
var e;
|
|
166
|
+
return [(e = v.default) == null ? void 0 : e.call(v), _.showAdvice ? s(r, {
|
|
167
|
+
"label-colspan": _.commentLabelColspan,
|
|
168
|
+
"value-colspan": _.commentValueColspan
|
|
169
|
+
}, null) : null];
|
|
170
|
+
} }),
|
|
171
|
+
(t = v.bottom) == null ? void 0 : t.call(v),
|
|
172
|
+
s("div", { class: "red-form-footer" }, [(n = v.footer) == null ? void 0 : n.call(v)])
|
|
173
|
+
];
|
|
174
|
+
} else {
|
|
175
|
+
var a;
|
|
176
|
+
return _.wrapRow ? s(g, null, { default: () => {
|
|
177
|
+
var e;
|
|
178
|
+
return [(e = v.default) == null ? void 0 : e.call(v)];
|
|
179
|
+
} }) : (a = v.default) == null ? void 0 : a.call(v);
|
|
180
|
+
}
|
|
181
|
+
} });
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
//#endregion
|
|
185
|
+
export { b as t };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n, t as r } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { createVNode as i, mergeProps as a } from "vue";
|
|
4
|
+
import { ElTimePicker as o } from "element-plus/es";
|
|
5
|
+
//#region src/components/form/props/time.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
...r,
|
|
9
|
+
modelValue: [
|
|
10
|
+
Number,
|
|
11
|
+
String,
|
|
12
|
+
Object
|
|
13
|
+
],
|
|
14
|
+
readonly: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
editable: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
clearable: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
size: String,
|
|
31
|
+
placeholder: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
startPlaceholder: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "开始时间"
|
|
38
|
+
},
|
|
39
|
+
endPlaceholder: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "结束时间"
|
|
42
|
+
},
|
|
43
|
+
isRange: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
arrowControl: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
popperClass: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
popperStyle: [String, Object],
|
|
56
|
+
popperOptions: Object,
|
|
57
|
+
fallbackPlacements: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: () => [
|
|
60
|
+
"bottom",
|
|
61
|
+
"top",
|
|
62
|
+
"right",
|
|
63
|
+
"left"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
placement: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "bottom-start"
|
|
69
|
+
},
|
|
70
|
+
rangeSeparator: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "-"
|
|
73
|
+
},
|
|
74
|
+
format: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "HH:mm:ss"
|
|
77
|
+
},
|
|
78
|
+
defaultValue: [Date, Array],
|
|
79
|
+
valueFormat: String,
|
|
80
|
+
id: [String, Array],
|
|
81
|
+
name: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: ""
|
|
84
|
+
},
|
|
85
|
+
ariaLabel: String,
|
|
86
|
+
prefixIcon: [String, Object],
|
|
87
|
+
clearIcon: [String, Object],
|
|
88
|
+
disabledHours: Function,
|
|
89
|
+
disabledMinutes: Function,
|
|
90
|
+
disabledSeconds: Function,
|
|
91
|
+
teleported: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !0
|
|
94
|
+
},
|
|
95
|
+
tabindex: [String, Number],
|
|
96
|
+
emptyValues: Array,
|
|
97
|
+
valueOnClear: [
|
|
98
|
+
String,
|
|
99
|
+
Number,
|
|
100
|
+
Boolean,
|
|
101
|
+
Function
|
|
102
|
+
],
|
|
103
|
+
saveOnBlur: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: !0
|
|
106
|
+
},
|
|
107
|
+
range: Boolean,
|
|
108
|
+
start: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: "09:00"
|
|
111
|
+
},
|
|
112
|
+
end: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: "18:00"
|
|
115
|
+
},
|
|
116
|
+
step: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: "00:30"
|
|
119
|
+
},
|
|
120
|
+
minTime: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: "00:00"
|
|
123
|
+
},
|
|
124
|
+
maxTime: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: ""
|
|
127
|
+
},
|
|
128
|
+
selectableRange: String
|
|
129
|
+
}, c = {
|
|
130
|
+
disabled: !0,
|
|
131
|
+
modelValue: !0,
|
|
132
|
+
isRange: !0,
|
|
133
|
+
range: !0,
|
|
134
|
+
placement: !0,
|
|
135
|
+
popperOptions: !0,
|
|
136
|
+
start: !0,
|
|
137
|
+
end: !0,
|
|
138
|
+
step: !0,
|
|
139
|
+
minTime: !0,
|
|
140
|
+
maxTime: !0,
|
|
141
|
+
selectableRange: !0
|
|
142
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
143
|
+
name: "FormInputTime",
|
|
144
|
+
inheritAttrs: !1,
|
|
145
|
+
props: { ...s },
|
|
146
|
+
emits: { ...t },
|
|
147
|
+
setup(t, { emit: n, slots: r, attrs: s }) {
|
|
148
|
+
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
149
|
+
emit: n,
|
|
150
|
+
slots: r,
|
|
151
|
+
attrs: s,
|
|
152
|
+
predicate: l
|
|
153
|
+
}), h = { modifiers: [{
|
|
154
|
+
name: "arrow",
|
|
155
|
+
options: { padding: ({ popper: e, reference: t, placement: n }) => e.width / 2 }
|
|
156
|
+
}] };
|
|
157
|
+
return () => u({ vNodes: i(o, a(p.value, m.value, {
|
|
158
|
+
"popper-options": t.popperOptions || h,
|
|
159
|
+
style: "width: 100%",
|
|
160
|
+
placement: t.placement || "left",
|
|
161
|
+
"is-range": t.isRange || t.range,
|
|
162
|
+
format: t.format,
|
|
163
|
+
"value-format": t.valueFormat || t.format,
|
|
164
|
+
modelValue: t.modelValue,
|
|
165
|
+
disabled: f.value,
|
|
166
|
+
"onUpdate:modelValue": c,
|
|
167
|
+
placeholder: d.value
|
|
168
|
+
}), null) });
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
//#endregion
|
|
172
|
+
export { u as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { d as e } from "./cmuHpsX6.mjs";
|
|
2
|
+
import { o as t, r as n } from "./Cj59E77g.mjs";
|
|
3
|
+
import { n as r } from "./CSyJ-vEx.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 = (e) => r[e] === void 0 && l[e] !== !0;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
|
|
15
|
+
function d(e) {
|
|
16
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/form/FormImage.vue
|
|
20
|
+
var f = {
|
|
21
|
+
name: "FormImage",
|
|
22
|
+
inheritAttrs: !1,
|
|
23
|
+
props: { ...c },
|
|
24
|
+
emits: {},
|
|
25
|
+
setup(r, { slots: a, attrs: c }) {
|
|
26
|
+
let l = t(r, { attrs: c }), f = e(r, u);
|
|
27
|
+
return () => n(r, {
|
|
28
|
+
vNodes: i(s, o(f.value, c, { "preview-src-list": [r.src] }), d(a) ? a : { default: () => [a] }),
|
|
29
|
+
formItemProps: l,
|
|
30
|
+
slots: a
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { f as t };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n, t as r } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import i from "../x-input-tag/index.mjs";
|
|
4
|
+
import { createVNode as a, mergeProps as o } from "vue";
|
|
5
|
+
//#region src/components/form/props/input-tag.ts
|
|
6
|
+
var s = {
|
|
7
|
+
...n,
|
|
8
|
+
...r,
|
|
9
|
+
modelValue: [Array, String],
|
|
10
|
+
arrayMode: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !0
|
|
13
|
+
},
|
|
14
|
+
objectMode: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
separator: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ","
|
|
21
|
+
},
|
|
22
|
+
boundarySelector: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ".form-scroller"
|
|
25
|
+
},
|
|
26
|
+
query: Function,
|
|
27
|
+
type: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "标签"
|
|
30
|
+
}
|
|
31
|
+
}, c = {
|
|
32
|
+
disabled: !0,
|
|
33
|
+
modelValue: !0
|
|
34
|
+
}, l = (e) => n[e] === void 0 && c[e] !== !0, u = {
|
|
35
|
+
name: "FormInputTag",
|
|
36
|
+
inheritAttrs: !1,
|
|
37
|
+
props: { ...s },
|
|
38
|
+
emits: { ...t },
|
|
39
|
+
setup(t, { emit: n, slots: r, attrs: s }) {
|
|
40
|
+
let { emitInput: c, render: u, placeholder: d, disabled: f, listeners: p, inputProps: m } = e(t, {
|
|
41
|
+
emit: n,
|
|
42
|
+
slots: r,
|
|
43
|
+
attrs: s,
|
|
44
|
+
predicate: l
|
|
45
|
+
});
|
|
46
|
+
return () => u({ vNodes: a(i, o(p.value, m.value, {
|
|
47
|
+
style: "width: 100%",
|
|
48
|
+
modelValue: t.modelValue,
|
|
49
|
+
disabled: f.value,
|
|
50
|
+
"onUpdate:modelValue": c,
|
|
51
|
+
placeholder: d.value
|
|
52
|
+
}), null) });
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { u as t };
|