@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,166 @@
|
|
|
1
|
+
import { d as e } from "./cmuHpsX6.mjs";
|
|
2
|
+
import { hasAuthority as t } from "../api/index.mjs";
|
|
3
|
+
import { toolbarContextKey as n } from "../constants/index.mjs";
|
|
4
|
+
import { isArray as r, isFunction as i } from "@web-utils/core";
|
|
5
|
+
import { computed as a, createVNode as o, defineComponent as s, getCurrentInstance as c, inject as l, mergeProps as u, ref as d } from "vue";
|
|
6
|
+
import { ElMessage as f, ElMessageBox as p } from "element-plus";
|
|
7
|
+
import { ElButton as m } from "element-plus/es";
|
|
8
|
+
//#region src/components/toolbar/button.ts
|
|
9
|
+
var h = {
|
|
10
|
+
size: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "default"
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "default"
|
|
17
|
+
},
|
|
18
|
+
plain: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
text: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
bg: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
link: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
round: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
circle: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
dashed: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
loading: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
loadingIcon: [String, Object],
|
|
51
|
+
disabled: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: !1
|
|
54
|
+
},
|
|
55
|
+
icon: [String, Object],
|
|
56
|
+
autofocus: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
nativeType: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "button"
|
|
63
|
+
},
|
|
64
|
+
autoInsertSpace: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
67
|
+
},
|
|
68
|
+
color: String,
|
|
69
|
+
dark: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !1
|
|
72
|
+
},
|
|
73
|
+
tag: [String, Object],
|
|
74
|
+
label: String,
|
|
75
|
+
loadable: Boolean,
|
|
76
|
+
footer: Boolean,
|
|
77
|
+
primary: Boolean,
|
|
78
|
+
warning: Boolean,
|
|
79
|
+
privilege: String,
|
|
80
|
+
condition: { type: [
|
|
81
|
+
Array,
|
|
82
|
+
Function,
|
|
83
|
+
Boolean
|
|
84
|
+
] },
|
|
85
|
+
conditionTips: String,
|
|
86
|
+
confirm: Boolean,
|
|
87
|
+
confirmTips: String,
|
|
88
|
+
beforeExecute: Function,
|
|
89
|
+
afterExecute: Function,
|
|
90
|
+
route: [String, Object],
|
|
91
|
+
title: String,
|
|
92
|
+
cancelButtonText: String,
|
|
93
|
+
confirmButtonText: String
|
|
94
|
+
}, g = {
|
|
95
|
+
icon: !0,
|
|
96
|
+
type: !0,
|
|
97
|
+
text: !0,
|
|
98
|
+
title: !0,
|
|
99
|
+
disabled: !0,
|
|
100
|
+
loading: !0
|
|
101
|
+
}, _ = (e) => g[e] !== !0, v = /* @__PURE__ */ s({
|
|
102
|
+
name: "ToolbarButton",
|
|
103
|
+
inheritAttrs: !1,
|
|
104
|
+
props: { ...h },
|
|
105
|
+
setup(s, { attrs: h, slots: g }) {
|
|
106
|
+
let v = c(), y = l(n, null), b = d(!1), x = a(() => s.privilege ? t(s.privilege) : !0), S = async (e) => {
|
|
107
|
+
try {
|
|
108
|
+
if (i(s.beforeExecute) && await s.beforeExecute() === !1) return;
|
|
109
|
+
if (s.conditionTips) {
|
|
110
|
+
let e;
|
|
111
|
+
if (e = r(s.condition) ? s.condition.length <= 0 : i(s.condition) ? !s.condition() : !s.condition, e) {
|
|
112
|
+
f.warning(s.conditionTips);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (s.confirm || s.confirmTips) try {
|
|
117
|
+
await p.confirm(s.confirmTips || "你确定要删除该记录吗?", "系统提示", {
|
|
118
|
+
type: "warning",
|
|
119
|
+
distinguishCancelAndClose: !0,
|
|
120
|
+
cancelButtonText: s.cancelButtonText,
|
|
121
|
+
confirmButtonText: s.confirmButtonText
|
|
122
|
+
});
|
|
123
|
+
} catch (e) {
|
|
124
|
+
if (e === "cancel") {
|
|
125
|
+
let { onCancel: t } = h;
|
|
126
|
+
i(t) && await t(e);
|
|
127
|
+
} else if (e === "close") {
|
|
128
|
+
let { onClose: t } = h;
|
|
129
|
+
i(t) && await t(e);
|
|
130
|
+
}
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
b.value = !0;
|
|
134
|
+
let n;
|
|
135
|
+
if (s.route) {
|
|
136
|
+
var t;
|
|
137
|
+
await ((t = v.proxy.$router) == null ? void 0 : t.push(s.route));
|
|
138
|
+
} else {
|
|
139
|
+
let { onClick: t } = h;
|
|
140
|
+
if (i(t)) try {
|
|
141
|
+
n = await t(e);
|
|
142
|
+
} catch {}
|
|
143
|
+
}
|
|
144
|
+
b.value = !1, i(s.afterExecute) && await s.afterExecute(n);
|
|
145
|
+
} catch {}
|
|
146
|
+
}, C = a(() => s.text ? !0 : s.type === "text"), w = a(() => {
|
|
147
|
+
if (!C.value) return s.primary ? "primary" : s.warning ? "warning" : s.type;
|
|
148
|
+
}), T = e(s, _);
|
|
149
|
+
return () => x.value ? o(m, u(T.value, {
|
|
150
|
+
title: s.footer || y != null && y.footer ? null : s.title,
|
|
151
|
+
disabled: s.disabled || b.value,
|
|
152
|
+
loading: s.loadable ? b.value : !1,
|
|
153
|
+
type: w.value,
|
|
154
|
+
text: C.value,
|
|
155
|
+
class: h.class,
|
|
156
|
+
style: h.style,
|
|
157
|
+
onClick: S
|
|
158
|
+
}), {
|
|
159
|
+
default: !s.circle && (s.label || g.default) ? () => g.default ? g.default() : s.label : null,
|
|
160
|
+
loading: g.loading,
|
|
161
|
+
icon: g.icon ? g.icon : s.icon ? () => o("i", { class: s.icon }, null) : null
|
|
162
|
+
}) : null;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
export { v as t };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { camelize as e, capitalize as t, copy as n, hyphenate as r, isArray as i, isFunction as a, isString as o, uncapitalize as s } from "@web-utils/core";
|
|
2
|
+
import { computed as c, useAttrs as l } from "vue";
|
|
3
|
+
import { ElMessage as u } from "element-plus";
|
|
4
|
+
//#region src/utils/index.ts
|
|
5
|
+
var d = (e, n, r, i, a = !0) => {
|
|
6
|
+
let o = {};
|
|
7
|
+
if (n) for (let t in e) n(t) && (o[t] = e[t]);
|
|
8
|
+
return a && r && r.forEach((e) => {
|
|
9
|
+
o[`on${t(e)}`] = (...t) => i(e, ...t);
|
|
10
|
+
}), o;
|
|
11
|
+
}, f = (e, t) => c(() => {
|
|
12
|
+
let n = {};
|
|
13
|
+
if (t) for (let r in e) t(r) && (n[r] = e[r]);
|
|
14
|
+
return n;
|
|
15
|
+
}), p = ({ removeOn: t = !1, include: n, exclude: r } = {}) => {
|
|
16
|
+
let i = l();
|
|
17
|
+
return c(() => {
|
|
18
|
+
let a = {}, o = {}, c = {}, l = !1;
|
|
19
|
+
(n || r) && (l = !0), n == null || n.forEach((t) => {
|
|
20
|
+
o[e(t)] = !0;
|
|
21
|
+
}), r == null || r.forEach((t) => {
|
|
22
|
+
c[e(t)] = !0;
|
|
23
|
+
});
|
|
24
|
+
for (let e in i) if (e.startsWith("on")) {
|
|
25
|
+
let u = s(e.replace(/^on/, ""));
|
|
26
|
+
if (l && (n && o[u] !== !0 || r && c[u] === !0)) continue;
|
|
27
|
+
t ? a[u] = i[e] : a[e] = i[e];
|
|
28
|
+
}
|
|
29
|
+
return a;
|
|
30
|
+
});
|
|
31
|
+
}, m = (e, { predicate: t, removeOn: n }) => ({
|
|
32
|
+
listeners: p({ removeOn: n }),
|
|
33
|
+
autoBindProps: f(e, t)
|
|
34
|
+
}), h = (e, { withOn: t = !1 } = {}) => {
|
|
35
|
+
let n = {};
|
|
36
|
+
for (let r in e) r.startsWith("on") && (t ? n[r] = e[r] : n[s(r.replace(/^on/, ""))] = e[r]);
|
|
37
|
+
return n;
|
|
38
|
+
}, g = (e, t = "id", n = "label") => {
|
|
39
|
+
let r = [];
|
|
40
|
+
function i(e, a) {
|
|
41
|
+
if (!e) return;
|
|
42
|
+
let o = [...a, {
|
|
43
|
+
[t]: e[t],
|
|
44
|
+
[n]: e[n]
|
|
45
|
+
}];
|
|
46
|
+
if (!e.children || e.children.length === 0) {
|
|
47
|
+
r.push(o);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
e.children.forEach((e) => {
|
|
51
|
+
i(e, o);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return e.forEach((e) => i(e, [])), r;
|
|
55
|
+
}, _ = (e, t = "id", n = "label") => {
|
|
56
|
+
let r = [];
|
|
57
|
+
return g(e).forEach((e) => {
|
|
58
|
+
let i = [], a = [];
|
|
59
|
+
for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
|
|
60
|
+
r.push({
|
|
61
|
+
value: i.join("/"),
|
|
62
|
+
label: a.join("/")
|
|
63
|
+
});
|
|
64
|
+
}), r;
|
|
65
|
+
}, v = (e, t = "id", n = "label") => {
|
|
66
|
+
let r = {};
|
|
67
|
+
return g(e).forEach((e) => {
|
|
68
|
+
let i = [], a = [];
|
|
69
|
+
for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
|
|
70
|
+
r[i.join("/")] = {
|
|
71
|
+
value: i.join("/"),
|
|
72
|
+
label: a.join("/")
|
|
73
|
+
};
|
|
74
|
+
}), r;
|
|
75
|
+
};
|
|
76
|
+
function y(e) {
|
|
77
|
+
n(e, () => u.success({
|
|
78
|
+
duration: 1e3,
|
|
79
|
+
message: "复制成功!",
|
|
80
|
+
type: "success"
|
|
81
|
+
}), () => u.error({
|
|
82
|
+
duration: 1e3,
|
|
83
|
+
message: "复制失败!",
|
|
84
|
+
type: "error"
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
var b = (e) => {
|
|
88
|
+
let t = [];
|
|
89
|
+
return e && (i(e) ? e.forEach((e) => {
|
|
90
|
+
i(e) ? t.push(...b(e)) : e && t.push(e);
|
|
91
|
+
}) : e && t.push(e)), t;
|
|
92
|
+
}, x = (e = "", t = {}) => {
|
|
93
|
+
let n = t || {};
|
|
94
|
+
return (e || "").replace(/{(.*?)}/g, (e, t) => {
|
|
95
|
+
if (t.indexOf(":")) {
|
|
96
|
+
let [e, r] = t.split(":");
|
|
97
|
+
return n[e] ? n[e] : r;
|
|
98
|
+
} else return n[t] || "";
|
|
99
|
+
});
|
|
100
|
+
}, S = (e, t) => a(e) ? x(e(t), t) : o(e) ? x(e, t) : null, C = (e) => {
|
|
101
|
+
let t = {};
|
|
102
|
+
for (let n in e) t[r(n)] = e[n];
|
|
103
|
+
return t;
|
|
104
|
+
}, w = (e, t) => {
|
|
105
|
+
for (let n in t) e[n] = t[n];
|
|
106
|
+
return e;
|
|
107
|
+
};
|
|
108
|
+
//#endregion
|
|
109
|
+
export { d as a, C as c, f as d, p as f, b as i, _ as l, y as n, h as o, S as r, v as s, w as t, m as u };
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { o as e } from "./cmuHpsX6.mjs";
|
|
2
|
+
import { goBack as t, hasAuthority as n } from "../api/index.mjs";
|
|
3
|
+
import { toolbarContextKey as r } from "../constants/index.mjs";
|
|
4
|
+
import { t as i } from "./XqRTtFfp.mjs";
|
|
5
|
+
import { NOOP as a, capitalize as o } from "@web-utils/core";
|
|
6
|
+
import { Comment as s, createVNode as c } from "vue";
|
|
7
|
+
//#region src/components/toolbar/Toolbar.vue?vue&type=script&lang.jsx
|
|
8
|
+
var l = {
|
|
9
|
+
back: {
|
|
10
|
+
label: "返回",
|
|
11
|
+
type: "primary",
|
|
12
|
+
icon: "el-icon-arrow-left"
|
|
13
|
+
},
|
|
14
|
+
cancel: {
|
|
15
|
+
label: "取消",
|
|
16
|
+
icon: "el-icon-close"
|
|
17
|
+
},
|
|
18
|
+
create: {
|
|
19
|
+
label: "新增",
|
|
20
|
+
type: "primary",
|
|
21
|
+
icon: "el-icon-plus"
|
|
22
|
+
},
|
|
23
|
+
save: {
|
|
24
|
+
label: "保存",
|
|
25
|
+
type: "primary",
|
|
26
|
+
icon: "el-icon-takeaway-box",
|
|
27
|
+
loadable: !0
|
|
28
|
+
},
|
|
29
|
+
withdraw: {
|
|
30
|
+
label: "提取",
|
|
31
|
+
type: "primary",
|
|
32
|
+
icon: "el-icon-refresh-left"
|
|
33
|
+
},
|
|
34
|
+
edit: {
|
|
35
|
+
label: "编辑",
|
|
36
|
+
type: "primary",
|
|
37
|
+
icon: "el-icon-edit-outline"
|
|
38
|
+
},
|
|
39
|
+
submit: {
|
|
40
|
+
label: "审批办理",
|
|
41
|
+
type: "primary",
|
|
42
|
+
icon: "el-icon-s-promotion"
|
|
43
|
+
},
|
|
44
|
+
publish: {
|
|
45
|
+
label: "发布",
|
|
46
|
+
type: "primary",
|
|
47
|
+
icon: "el-icon-s-promotion"
|
|
48
|
+
},
|
|
49
|
+
agree: {
|
|
50
|
+
label: "同意",
|
|
51
|
+
type: "primary",
|
|
52
|
+
icon: "el-icon-check"
|
|
53
|
+
},
|
|
54
|
+
disagree: {
|
|
55
|
+
label: "不同意",
|
|
56
|
+
type: "primary",
|
|
57
|
+
icon: "el-icon-close"
|
|
58
|
+
},
|
|
59
|
+
reject: {
|
|
60
|
+
label: "退回",
|
|
61
|
+
type: "primary",
|
|
62
|
+
icon: "el-icon-s-release"
|
|
63
|
+
},
|
|
64
|
+
finish: {
|
|
65
|
+
label: "完成",
|
|
66
|
+
type: "primary",
|
|
67
|
+
icon: "el-icon-circle-check"
|
|
68
|
+
},
|
|
69
|
+
enable: {
|
|
70
|
+
label: "启用",
|
|
71
|
+
type: "primary",
|
|
72
|
+
icon: "el-icon-circle-check"
|
|
73
|
+
},
|
|
74
|
+
exp: {
|
|
75
|
+
label: "导出",
|
|
76
|
+
type: "primary",
|
|
77
|
+
icon: "el-icon-download"
|
|
78
|
+
},
|
|
79
|
+
imp: {
|
|
80
|
+
label: "导入",
|
|
81
|
+
type: "primary",
|
|
82
|
+
icon: "el-icon-upload"
|
|
83
|
+
},
|
|
84
|
+
del: {
|
|
85
|
+
label: "删除",
|
|
86
|
+
type: "primary",
|
|
87
|
+
icon: "el-icon-delete"
|
|
88
|
+
},
|
|
89
|
+
print: {
|
|
90
|
+
label: "打印",
|
|
91
|
+
type: "primary",
|
|
92
|
+
icon: "el-icon-printer"
|
|
93
|
+
},
|
|
94
|
+
disabled: {
|
|
95
|
+
label: "禁用",
|
|
96
|
+
type: "primary",
|
|
97
|
+
icon: "el-icon-remove-outline"
|
|
98
|
+
},
|
|
99
|
+
reload: {
|
|
100
|
+
label: "刷新",
|
|
101
|
+
icon: "el-icon-refresh",
|
|
102
|
+
separateLine: !1,
|
|
103
|
+
circle: !0
|
|
104
|
+
},
|
|
105
|
+
settings: {
|
|
106
|
+
label: "设置",
|
|
107
|
+
icon: "el-icon-s-operation",
|
|
108
|
+
separateLine: !1,
|
|
109
|
+
circle: !0
|
|
110
|
+
},
|
|
111
|
+
search: {
|
|
112
|
+
label: "搜索",
|
|
113
|
+
icon: "el-icon-search",
|
|
114
|
+
separateLine: !1,
|
|
115
|
+
circle: !0
|
|
116
|
+
}
|
|
117
|
+
}, u = {
|
|
118
|
+
name: "Toolbar",
|
|
119
|
+
provide() {
|
|
120
|
+
return { [r]: this };
|
|
121
|
+
},
|
|
122
|
+
props: {
|
|
123
|
+
searchable: Boolean,
|
|
124
|
+
refreshable: Boolean,
|
|
125
|
+
buttons: {
|
|
126
|
+
type: Array,
|
|
127
|
+
default: () => ["back"]
|
|
128
|
+
},
|
|
129
|
+
back: Function,
|
|
130
|
+
cancel: Function,
|
|
131
|
+
emitter: {
|
|
132
|
+
type: String,
|
|
133
|
+
default: "self"
|
|
134
|
+
},
|
|
135
|
+
footer: Boolean,
|
|
136
|
+
label: Object
|
|
137
|
+
},
|
|
138
|
+
computed: {},
|
|
139
|
+
methods: {
|
|
140
|
+
goBack() {
|
|
141
|
+
t(this.$route.path);
|
|
142
|
+
},
|
|
143
|
+
createButton(t, { label: n, icon: r, type: s, separateLine: l = !0, loadable: u, circle: d, onClick: f, title: p }) {
|
|
144
|
+
var m;
|
|
145
|
+
let h, g = ((m = this.label) == null ? void 0 : m[t]) || n;
|
|
146
|
+
return h = f || (["back", "cancel"].includes(t) ? this.goBack : (n) => {
|
|
147
|
+
(e(this.$attrs, { withOn: !0 })[`on${o(t)}`] || a)(n);
|
|
148
|
+
}), c(i, {
|
|
149
|
+
"separate-line": l,
|
|
150
|
+
icon: r,
|
|
151
|
+
title: p,
|
|
152
|
+
label: g,
|
|
153
|
+
loadable: u,
|
|
154
|
+
circle: d,
|
|
155
|
+
footer: this.footer,
|
|
156
|
+
type: s,
|
|
157
|
+
onClick: h
|
|
158
|
+
}, null);
|
|
159
|
+
},
|
|
160
|
+
getLeftButtons() {
|
|
161
|
+
var e, t, r;
|
|
162
|
+
let { createButton: i } = this;
|
|
163
|
+
return (r = (((e = (t = this.$slots)["toolbar-left"]) == null ? void 0 : e.call(t)) || this.buttons.flatMap((e) => {
|
|
164
|
+
let t = l[e];
|
|
165
|
+
if (t) {
|
|
166
|
+
var n, r;
|
|
167
|
+
return ((n = (r = this.$slots)[e]) == null ? void 0 : n.call(r)) || i(e, t);
|
|
168
|
+
} else if (e === "slot") {
|
|
169
|
+
var a, o;
|
|
170
|
+
let e = ((a = (o = this.$slots).default) == null ? void 0 : a.call(o, {
|
|
171
|
+
buttons: this.buttons,
|
|
172
|
+
footer: this.footer
|
|
173
|
+
})) ?? null;
|
|
174
|
+
if (e && e.length === 1) {
|
|
175
|
+
var c;
|
|
176
|
+
return e == null || (c = e[0]) == null || (c = c.children) == null ? void 0 : c.filter((e) => e.type !== s);
|
|
177
|
+
}
|
|
178
|
+
return e || [];
|
|
179
|
+
} else return null;
|
|
180
|
+
})).filter((e) => e)) == null ? void 0 : r.filter((e) => e.props.privilege ? n(e.props.privilege) : !0);
|
|
181
|
+
},
|
|
182
|
+
getRightButtons() {
|
|
183
|
+
var e, t, n, r;
|
|
184
|
+
let i = (e = (t = this.$slots)["toolbar-right"]) == null ? void 0 : e.call(t), a = [
|
|
185
|
+
...((n = (r = this.$slots)["toolbar-right-button"]) == null ? void 0 : n.call(r)) || [],
|
|
186
|
+
this.getRefreshButton(),
|
|
187
|
+
this.getSettingsButton(),
|
|
188
|
+
this.getSearchButton()
|
|
189
|
+
];
|
|
190
|
+
return i || a;
|
|
191
|
+
},
|
|
192
|
+
getSearchButton() {
|
|
193
|
+
return this.searchable ? this.createButton("search", l.search) : null;
|
|
194
|
+
},
|
|
195
|
+
getRefreshButton() {
|
|
196
|
+
return this.refreshable ? this.createButton("reload", l.reload) : null;
|
|
197
|
+
},
|
|
198
|
+
getSettingsButton() {
|
|
199
|
+
return this.refreshable ? this.createButton("settings", l.settings) : null;
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
render() {
|
|
203
|
+
return this.footer ? c("div", { class: "footer-bar" }, [this.getLeftButtons()]) : c("div", { class: "toolbar" }, [c("div", { class: "toolbar-left" }, [this.getLeftButtons()]), c("div", { class: "toolbar-right" }, [this.getRightButtons()])]);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
//#endregion
|
|
207
|
+
export { u as t };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n, t as r } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { t as i } from "./CWfUPCtS.mjs";
|
|
4
|
+
import { createVNode as a, mergeProps as o, ref as s } from "vue";
|
|
5
|
+
import { ElInput as c, ElPopover as l } from "element-plus/es";
|
|
6
|
+
//#region src/components/form/props/input-cron.ts
|
|
7
|
+
var u = {
|
|
8
|
+
...n,
|
|
9
|
+
...r,
|
|
10
|
+
modelValue: [String, Number]
|
|
11
|
+
}, d = {
|
|
12
|
+
readonly: !0,
|
|
13
|
+
placeholder: !0,
|
|
14
|
+
disabled: !0,
|
|
15
|
+
modelValue: !0,
|
|
16
|
+
prefix: !0,
|
|
17
|
+
suffix: !0
|
|
18
|
+
}, f = (e) => n[e] === void 0 && d[e] !== !0, p = {
|
|
19
|
+
name: "FormInputCronExpression",
|
|
20
|
+
props: { ...u },
|
|
21
|
+
emits: { ...t },
|
|
22
|
+
setup(t, { emit: n, slots: r, attrs: u }) {
|
|
23
|
+
let d = s(!1), { emitInput: p, render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = e(t, {
|
|
24
|
+
emit: n,
|
|
25
|
+
slots: r,
|
|
26
|
+
attrs: u,
|
|
27
|
+
predicate: f
|
|
28
|
+
}), y = () => {
|
|
29
|
+
d.value = !0;
|
|
30
|
+
}, b = () => {
|
|
31
|
+
d.value = !1;
|
|
32
|
+
};
|
|
33
|
+
return () => m({ vNodes: a("div", { class: "cron" }, [a(l, {
|
|
34
|
+
placement: "bottom-start",
|
|
35
|
+
disabled: g.value,
|
|
36
|
+
visible: d.value,
|
|
37
|
+
"onUpdate:visible": (e) => d.value = e,
|
|
38
|
+
"popper-class": "cron-popover"
|
|
39
|
+
}, {
|
|
40
|
+
default: () => a(i, o(_.value, v.value, {
|
|
41
|
+
i18n: "cn",
|
|
42
|
+
expression: t.modelValue,
|
|
43
|
+
onChange: p,
|
|
44
|
+
onClose: b
|
|
45
|
+
}), null),
|
|
46
|
+
reference: () => a(c, {
|
|
47
|
+
modelValue: t.modelValue,
|
|
48
|
+
readonly: !0,
|
|
49
|
+
disabled: g.value,
|
|
50
|
+
placeholder: h.value,
|
|
51
|
+
onClick: y
|
|
52
|
+
}, null)
|
|
53
|
+
})]) });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { p as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { n as e } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n as t, t as n } from "./CFOGMFgo.mjs";
|
|
3
|
+
import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
|
|
4
|
+
//#region src/components/form/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
|
|
5
|
+
function s(e) {
|
|
6
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/components/form/FormInputPhoneNumber.vue
|
|
10
|
+
var c = {
|
|
11
|
+
name: "FormInputPhoneNumber",
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
props: { ...t },
|
|
14
|
+
emits: { ...e },
|
|
15
|
+
setup(e, { slots: t, attrs: i }) {
|
|
16
|
+
let c = o(e, "modelValue");
|
|
17
|
+
return () => r(n, a(e, i, {
|
|
18
|
+
modelValue: c.value,
|
|
19
|
+
"onUpdate:modelValue": (e) => c.value = e,
|
|
20
|
+
type: "phone"
|
|
21
|
+
}), s(t) ? t : { default: () => [t] });
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { c as t };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
stop: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
prevent: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
text: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
message: StringConstructor;
|
|
15
|
+
confirmable: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
confirmText: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
confirmType: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
confirmTitle: StringConstructor;
|
|
28
|
+
loadable: BooleanConstructor;
|
|
29
|
+
loadingText: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
tag: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
38
|
+
stop: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
prevent: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
text: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
message: StringConstructor;
|
|
51
|
+
confirmable: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
confirmText: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
confirmType: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
confirmTitle: StringConstructor;
|
|
64
|
+
loadable: BooleanConstructor;
|
|
65
|
+
loadingText: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
tag: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
}>> & Readonly<{}>, {
|
|
74
|
+
text: string;
|
|
75
|
+
stop: boolean;
|
|
76
|
+
prevent: boolean;
|
|
77
|
+
loadable: boolean;
|
|
78
|
+
loadingText: string;
|
|
79
|
+
confirmable: boolean;
|
|
80
|
+
confirmType: string;
|
|
81
|
+
confirmText: string;
|
|
82
|
+
tag: string;
|
|
83
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | {
|
|
84
|
+
props: {
|
|
85
|
+
type: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
size: StringConstructor;
|
|
90
|
+
icon: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: string;
|
|
93
|
+
};
|
|
94
|
+
nativeType: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
default: string;
|
|
97
|
+
};
|
|
98
|
+
loading: BooleanConstructor;
|
|
99
|
+
disabled: BooleanConstructor;
|
|
100
|
+
plain: BooleanConstructor;
|
|
101
|
+
autofocus: BooleanConstructor;
|
|
102
|
+
round: BooleanConstructor;
|
|
103
|
+
text: {
|
|
104
|
+
type: StringConstructor;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
tag: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
113
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as e } from "../chunks/Bm5eiSmT.mjs";
|
|
2
|
+
//#region src/components/button/ConfirmButton.vue
|
|
3
|
+
var t = {
|
|
4
|
+
name: "ConfirmButton",
|
|
5
|
+
mixins: [e, { props: {
|
|
6
|
+
type: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "danger"
|
|
9
|
+
},
|
|
10
|
+
size: String,
|
|
11
|
+
icon: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
nativeType: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "button"
|
|
18
|
+
},
|
|
19
|
+
loading: Boolean,
|
|
20
|
+
disabled: Boolean,
|
|
21
|
+
plain: Boolean,
|
|
22
|
+
autofocus: Boolean,
|
|
23
|
+
round: Boolean,
|
|
24
|
+
text: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "删除"
|
|
27
|
+
},
|
|
28
|
+
tag: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "ElButton"
|
|
31
|
+
}
|
|
32
|
+
} }]
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { t as default };
|