@done-coding/admin-core 0.3.0 → 0.4.0
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/es/bridge/index.mjs +87 -47
- package/es/components/app-layout/AppBody.vue.mjs +7 -0
- package/es/components/app-layout/AppBody.vue2.mjs +89 -0
- package/es/components/app-layout/AppBreadcrumb.vue.mjs +7 -0
- package/es/components/app-layout/AppBreadcrumb.vue2.mjs +58 -0
- package/es/components/app-layout/AppFooter.vue.mjs +7 -0
- package/es/components/app-layout/AppFooter.vue2.mjs +17 -0
- package/es/components/app-layout/AppHeader.vue.mjs +7 -0
- package/es/components/app-layout/AppHeader.vue2.mjs +99 -0
- package/es/components/app-layout/AppLayout.vue.mjs +7 -0
- package/es/components/app-layout/AppLayout.vue2.mjs +130 -0
- package/es/components/app-layout/AppPage.vue.mjs +7 -0
- package/es/components/app-layout/AppPage.vue2.mjs +39 -0
- package/es/components/app-layout/AppSidebar.vue.mjs +7 -0
- package/es/components/app-layout/AppSidebar.vue2.mjs +97 -0
- package/es/components/app-layout/index.mjs +32 -0
- package/es/components/display/ActionBtnGroup.vue.mjs +61 -0
- package/es/components/display/ActionBtnGroup.vue2.mjs +4 -0
- package/es/components/display/HeightProvider.vue.mjs +26 -26
- package/es/components/display/TabsHeader.vue.mjs +7 -0
- package/es/components/display/TabsHeader.vue2.mjs +76 -0
- package/es/components/display/TabsMain.vue.mjs +100 -5
- package/es/components/display/TabsMain.vue2.mjs +2 -95
- package/es/components/display/TabsNaturalFlow.vue.mjs +17 -0
- package/es/components/display/TabsNaturalFlow.vue2.mjs +4 -0
- package/es/components/display/TabsRefineFlow.vue.mjs +62 -0
- package/es/components/display/TabsRefineFlow.vue2.mjs +4 -0
- package/es/components/display/index.mjs +10 -8
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +107 -63
- package/es/components/form/form-search-utils.mjs +25 -0
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +82 -76
- package/es/components/misc/ActionBtn.vue.mjs +84 -65
- package/es/components/misc/ActionConfirm.vue.mjs +1 -1
- package/es/components/misc/ActionConfirm.vue2.mjs +77 -71
- package/es/components/misc/SelectModule.vue.mjs +55 -0
- package/es/components/misc/SelectModule.vue2.mjs +4 -0
- package/es/components/modal/ConfirmModal.vue.mjs +1 -1
- package/es/components/modal/ConfirmModal.vue2.mjs +13 -12
- package/es/components/modal/modal-shelf-hierarchy.mjs +4 -6
- package/es/components/table/TableMain.vue.mjs +3 -3
- package/es/components/table/TableMain.vue2.mjs +103 -102
- package/es/components/table/ToolbarButtons.vue.mjs +10 -40
- package/es/hooks/use-breakpoint.mjs +40 -0
- package/es/hooks/use-channel-viewport-height.mjs +18 -0
- package/es/index.mjs +165 -128
- package/es/inject/key.mjs +18 -8
- package/es/router/guard/index.mjs +31 -0
- package/es/router/guard/login.mjs +4 -0
- package/es/router/guard/permission.mjs +4 -0
- package/es/store/app.mjs +103 -0
- package/es/store/router-permission.mjs +65 -0
- package/es/store/user.mjs +52 -52
- package/es/style.css +1 -1
- package/package.json +3 -2
- package/types/bridge/index.d.ts +193 -89
- package/types/components/app-layout/AppBody.vue.d.ts +45 -0
- package/types/components/app-layout/AppBreadcrumb.vue.d.ts +25 -0
- package/types/components/app-layout/AppFooter.vue.d.ts +2 -0
- package/types/components/app-layout/AppHeader.vue.d.ts +55 -0
- package/types/components/app-layout/AppLayout.vue.d.ts +76 -0
- package/types/components/app-layout/AppPage.vue.d.ts +54 -0
- package/types/components/app-layout/AppSidebar.vue.d.ts +51 -0
- package/types/components/app-layout/index.d.ts +27 -0
- package/types/components/app-layout/types.d.ts +43 -0
- package/types/components/display/ActionBtnGroup.vue.d.ts +16 -0
- package/types/components/display/HeightProvider.vue.d.ts +10 -6
- package/types/components/display/TabsHeader.vue.d.ts +42 -0
- package/types/components/display/TabsMain.vue.d.ts +49 -7
- package/types/components/display/TabsNaturalFlow.vue.d.ts +16 -0
- package/types/components/display/TabsRefineFlow.vue.d.ts +53 -0
- package/types/components/display/index.d.ts +16 -13
- package/types/components/display/types.d.ts +85 -29
- package/types/components/form/form-search-utils.d.ts +24 -0
- package/types/components/form/types.d.ts +7 -1
- package/types/components/list-page/types.d.ts +1 -1
- package/types/components/misc/ActionBtn.vue.d.ts +17 -23
- package/types/components/misc/ActionConfirm.vue.d.ts +56 -27
- package/types/components/misc/SelectModule.vue.d.ts +2 -0
- package/types/components/misc/index.d.ts +11 -1
- package/types/components/misc/types.d.ts +35 -26
- package/types/components/modal/ConfirmModal.vue.d.ts +17 -0
- package/types/components/modal/modal-shelf-hierarchy.d.ts +1 -1
- package/types/components/table/types.d.ts +14 -12
- package/types/helpers/index.d.ts +10 -3
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/use-breakpoint.d.ts +4 -0
- package/types/hooks/use-channel-viewport-height.d.ts +28 -0
- package/types/index.d.ts +4 -1
- package/types/inject/key.d.ts +35 -10
- package/types/router/guard/index.d.ts +21 -0
- package/types/router/guard/login.d.ts +5 -0
- package/types/router/guard/permission.d.ts +5 -0
- package/types/router/guard/types.d.ts +15 -0
- package/types/router/index.d.ts +1 -0
- package/types/store/app.d.ts +149 -0
- package/types/store/index.d.ts +2 -0
- package/types/store/router-permission.d.ts +80 -0
- package/types/store/user.d.ts +11 -9
- /package/es/{helpers → bridge}/route.mjs +0 -0
- /package/es/{helpers → bridge}/state.mjs +0 -0
- /package/es/{helpers → bridge}/storage.mjs +0 -0
- /package/types/{helpers → bridge}/route.d.ts +0 -0
- /package/types/{helpers → bridge}/state.d.ts +0 -0
- /package/types/{helpers → bridge}/storage.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElButton as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as z, toRefs as E, getCurrentInstance as M, ref as p, computed as C, watch as R, openBlock as b, createBlock as x, unref as u, withCtx as d, createVNode as V, mergeProps as w, renderSlot as A } from "vue";
|
|
2
|
+
import { ElButton as I } from "element-plus";
|
|
3
|
+
import $ from "./ActionConfirm.vue.mjs";
|
|
4
|
+
const q = /* @__PURE__ */ z({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "ActionBtn",
|
|
7
7
|
props: {
|
|
@@ -24,14 +24,17 @@ const E = /* @__PURE__ */ A({
|
|
|
24
24
|
autoInsertSpace: { type: Boolean },
|
|
25
25
|
tag: {},
|
|
26
26
|
confirmMode: {},
|
|
27
|
-
confirmConfig: {}
|
|
27
|
+
confirmConfig: { type: [Object, Function] },
|
|
28
|
+
beforeOpen: { type: Function }
|
|
28
29
|
},
|
|
29
30
|
emits: ["click"],
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
32
|
-
let
|
|
33
|
-
const
|
|
34
|
-
|
|
31
|
+
setup(_) {
|
|
32
|
+
const v = _, { confirmConfig: s, confirmMode: T, beforeOpen: f } = E(v), r = M(), o = p(!1), c = p(!1), l = p();
|
|
33
|
+
let m;
|
|
34
|
+
const F = C(
|
|
35
|
+
() => !!s.value || !!f.value
|
|
36
|
+
), y = C(() => {
|
|
37
|
+
const e = v, t = {}, a = [
|
|
35
38
|
"type",
|
|
36
39
|
"size",
|
|
37
40
|
"plain",
|
|
@@ -50,68 +53,84 @@ const E = /* @__PURE__ */ A({
|
|
|
50
53
|
"icon",
|
|
51
54
|
"loadingIcon"
|
|
52
55
|
];
|
|
53
|
-
for (const
|
|
54
|
-
return { ...
|
|
55
|
-
}),
|
|
56
|
-
var
|
|
57
|
-
const e = (
|
|
56
|
+
for (const n of a) e[n] !== void 0 && (t[n] = e[n]);
|
|
57
|
+
return { ...r == null ? void 0 : r.attrs, ...t };
|
|
58
|
+
}), L = (e) => !!e && typeof e.then == "function", O = () => {
|
|
59
|
+
var t;
|
|
60
|
+
const e = (t = r == null ? void 0 : r.vnode.props) == null ? void 0 : t.onClick;
|
|
58
61
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
59
|
-
},
|
|
60
|
-
const e =
|
|
62
|
+
}, g = () => {
|
|
63
|
+
const e = O();
|
|
61
64
|
if (!e.length) return;
|
|
62
|
-
const
|
|
63
|
-
let
|
|
65
|
+
const t = m;
|
|
66
|
+
let a;
|
|
64
67
|
try {
|
|
65
|
-
|
|
66
|
-
} catch (
|
|
67
|
-
throw
|
|
68
|
+
a = e.map((i) => i(t));
|
|
69
|
+
} catch (i) {
|
|
70
|
+
throw o.value = !1, i;
|
|
68
71
|
}
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
72
|
-
|
|
72
|
+
const n = a.filter(L);
|
|
73
|
+
if (n.length)
|
|
74
|
+
return o.value = !0, Promise.all(n).finally(() => {
|
|
75
|
+
o.value = !1;
|
|
73
76
|
});
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
}, P = g, k = async (e) => {
|
|
78
|
+
if (o.value || c.value) return;
|
|
79
|
+
m = e;
|
|
80
|
+
let t;
|
|
81
|
+
if (f.value) {
|
|
82
|
+
o.value = !0;
|
|
83
|
+
try {
|
|
84
|
+
t = await f.value();
|
|
85
|
+
} catch {
|
|
86
|
+
o.value = !1;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
o.value = !1;
|
|
90
|
+
} else
|
|
91
|
+
t = void 0;
|
|
92
|
+
s.value ? (l.value = typeof s.value == "function" ? s.value(t) : s.value, c.value = !0) : g();
|
|
93
|
+
};
|
|
94
|
+
return R(c, (e) => {
|
|
95
|
+
e || (l.value = void 0);
|
|
96
|
+
}), (e, t) => {
|
|
97
|
+
var a, n, i, B, h;
|
|
98
|
+
return F.value ? (b(), x($, {
|
|
99
|
+
key: 0,
|
|
100
|
+
show: c.value,
|
|
101
|
+
"onUpdate:show": t[0] || (t[0] = (S) => c.value = S),
|
|
102
|
+
mode: u(T) || "popconfirm",
|
|
103
|
+
title: (a = l.value) == null ? void 0 : a.title,
|
|
104
|
+
content: (n = l.value) == null ? void 0 : n.content,
|
|
105
|
+
"confirm-text": (i = l.value) == null ? void 0 : i.confirmText,
|
|
106
|
+
"cancel-text": (B = l.value) == null ? void 0 : B.cancelText,
|
|
107
|
+
type: (h = l.value) == null ? void 0 : h.type,
|
|
108
|
+
"submit-fn": u(P)
|
|
109
|
+
}, {
|
|
110
|
+
default: d(() => [
|
|
111
|
+
V(u(I), w(y.value, {
|
|
112
|
+
loading: o.value,
|
|
113
|
+
onClick: k
|
|
114
|
+
}), {
|
|
115
|
+
default: d(() => [
|
|
116
|
+
A(e.$slots, "default")
|
|
117
|
+
]),
|
|
118
|
+
_: 3
|
|
119
|
+
}, 16, ["loading"])
|
|
120
|
+
]),
|
|
121
|
+
_: 3
|
|
122
|
+
}, 8, ["show", "mode", "title", "content", "confirm-text", "cancel-text", "type", "submit-fn"])) : (b(), x(u(I), w({ key: 1 }, y.value, {
|
|
123
|
+
loading: o.value,
|
|
124
|
+
onClick: k
|
|
125
|
+
}), {
|
|
126
|
+
default: d(() => [
|
|
127
|
+
A(e.$slots, "default")
|
|
128
|
+
]),
|
|
129
|
+
_: 3
|
|
130
|
+
}, 16, ["loading"]));
|
|
79
131
|
};
|
|
80
|
-
return (e, o) => t.confirmConfig ? (g(), v(w, {
|
|
81
|
-
key: 0,
|
|
82
|
-
ref_key: "confirmRef",
|
|
83
|
-
ref: u,
|
|
84
|
-
mode: t.confirmMode || "popconfirm",
|
|
85
|
-
title: t.confirmConfig.title,
|
|
86
|
-
content: t.confirmConfig.content,
|
|
87
|
-
"confirm-text": t.confirmConfig.confirmText,
|
|
88
|
-
"cancel-text": t.confirmConfig.cancelText,
|
|
89
|
-
type: t.confirmConfig.type,
|
|
90
|
-
action: d
|
|
91
|
-
}, {
|
|
92
|
-
default: f(() => [
|
|
93
|
-
T(k(h), B(m.value, {
|
|
94
|
-
loading: r.value,
|
|
95
|
-
onClick: y
|
|
96
|
-
}), {
|
|
97
|
-
default: f(() => [
|
|
98
|
-
C(e.$slots, "default")
|
|
99
|
-
]),
|
|
100
|
-
_: 3
|
|
101
|
-
}, 16, ["loading"])
|
|
102
|
-
]),
|
|
103
|
-
_: 3
|
|
104
|
-
}, 8, ["mode", "title", "content", "confirm-text", "cancel-text", "type"])) : (g(), v(k(h), B({ key: 1 }, m.value, {
|
|
105
|
-
loading: r.value,
|
|
106
|
-
onClick: y
|
|
107
|
-
}), {
|
|
108
|
-
default: f(() => [
|
|
109
|
-
C(e.$slots, "default")
|
|
110
|
-
]),
|
|
111
|
-
_: 3
|
|
112
|
-
}, 16, ["loading"]));
|
|
113
132
|
}
|
|
114
133
|
});
|
|
115
134
|
export {
|
|
116
|
-
|
|
135
|
+
q as default
|
|
117
136
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ActionConfirm.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5bb407c9"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -1,103 +1,95 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElPopover as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as _, useModel as P, ref as $, computed as s, h as r, openBlock as o, createBlock as u, unref as d, withCtx as c, createElementVNode as C, createElementBlock as f, resolveDynamicComponent as x, createCommentVNode as k, createVNode as m, createTextVNode as T, toDisplayString as b, renderSlot as v, Fragment as z, mergeModels as D } from "vue";
|
|
2
|
+
import { ElPopover as S, ElButton as N } from "element-plus";
|
|
3
|
+
import A from "../modal/ConfirmModal.vue.mjs";
|
|
4
|
+
const U = { class: "action-confirm" }, j = {
|
|
4
5
|
key: 0,
|
|
5
6
|
class: "action-confirm__title"
|
|
6
|
-
},
|
|
7
|
+
}, q = {
|
|
7
8
|
key: 1,
|
|
8
9
|
class: "action-confirm__content"
|
|
9
|
-
},
|
|
10
|
+
}, G = { class: "action-confirm__actions" }, K = /* @__PURE__ */ _({
|
|
10
11
|
__name: "ActionConfirm",
|
|
11
|
-
props: {
|
|
12
|
+
props: /* @__PURE__ */ D({
|
|
12
13
|
mode: {},
|
|
13
14
|
title: {},
|
|
14
15
|
content: {},
|
|
15
16
|
confirmText: { default: "确定" },
|
|
16
17
|
cancelText: { default: "取消" },
|
|
17
18
|
type: {},
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
submitFn: {}
|
|
20
|
+
}, {
|
|
21
|
+
show: { type: Boolean, default: !1 },
|
|
22
|
+
showModifiers: {}
|
|
23
|
+
}),
|
|
24
|
+
emits: ["update:show"],
|
|
25
|
+
setup(t) {
|
|
26
|
+
const n = t, i = P(t, "show"), a = $(!1), l = (e) => {
|
|
27
|
+
if (e != null)
|
|
28
|
+
return typeof e == "function" ? e() : e;
|
|
29
|
+
}, y = (e) => {
|
|
30
|
+
if (!(e == null || e === ""))
|
|
31
|
+
return typeof e == "string" ? () => r("span", e) : () => e;
|
|
32
|
+
}, p = s(() => y(l(n.title))), h = s(() => y(l(n.content))), B = async () => {
|
|
33
|
+
a.value = !0;
|
|
31
34
|
try {
|
|
32
|
-
await Promise.resolve(
|
|
35
|
+
await Promise.resolve(n.submitFn()), i.value = !1;
|
|
36
|
+
} catch {
|
|
33
37
|
} finally {
|
|
34
|
-
|
|
38
|
+
a.value = !1;
|
|
35
39
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
}, g = () => {
|
|
41
|
+
i.value = !1;
|
|
42
|
+
}, M = s(() => {
|
|
43
|
+
const e = l(n.title);
|
|
44
|
+
if (!(e === void 0 || e === ""))
|
|
45
|
+
return typeof e == "string" ? e : () => r("span", e);
|
|
46
|
+
}), E = s(() => {
|
|
47
|
+
const e = l(n.content);
|
|
48
|
+
if (!(e === void 0 || e === ""))
|
|
49
|
+
return typeof e == "string" ? e : () => r("div", e);
|
|
50
|
+
}), F = async () => {
|
|
42
51
|
try {
|
|
43
|
-
|
|
44
|
-
title: typeof t == "string" ? t : void 0,
|
|
45
|
-
confirmButtonText: e.confirmText,
|
|
46
|
-
cancelButtonText: e.cancelText,
|
|
47
|
-
type: e.type === "danger" ? "warning" : void 0,
|
|
48
|
-
beforeClose: async (M, v, p) => {
|
|
49
|
-
if (M !== "confirm") return p();
|
|
50
|
-
v.confirmButtonLoading = !0;
|
|
51
|
-
try {
|
|
52
|
-
await Promise.resolve(e.action());
|
|
53
|
-
} finally {
|
|
54
|
-
v.confirmButtonLoading = !1;
|
|
55
|
-
}
|
|
56
|
-
p();
|
|
57
|
-
}
|
|
58
|
-
}), !0;
|
|
52
|
+
await Promise.resolve(n.submitFn());
|
|
59
53
|
} catch {
|
|
60
54
|
return !1;
|
|
61
55
|
}
|
|
62
56
|
};
|
|
63
|
-
return
|
|
64
|
-
n = t;
|
|
65
|
-
})) }), (t, o) => e.mode === "popconfirm" ? (i(), u(f($), {
|
|
57
|
+
return (e, w) => n.mode === "popconfirm" ? (o(), u(d(S), {
|
|
66
58
|
key: 0,
|
|
67
|
-
visible:
|
|
59
|
+
visible: i.value,
|
|
68
60
|
width: 240,
|
|
69
61
|
persistent: !1
|
|
70
62
|
}, {
|
|
71
|
-
reference:
|
|
72
|
-
|
|
63
|
+
reference: c(() => [
|
|
64
|
+
v(e.$slots, "default", {}, void 0, !0)
|
|
73
65
|
]),
|
|
74
|
-
default:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
(
|
|
78
|
-
])) :
|
|
79
|
-
|
|
80
|
-
(
|
|
81
|
-
])) :
|
|
82
|
-
|
|
83
|
-
|
|
66
|
+
default: c(() => [
|
|
67
|
+
C("div", U, [
|
|
68
|
+
p.value ? (o(), f("div", j, [
|
|
69
|
+
(o(), u(x(p.value)))
|
|
70
|
+
])) : k("", !0),
|
|
71
|
+
h.value ? (o(), f("div", q, [
|
|
72
|
+
(o(), u(x(h.value)))
|
|
73
|
+
])) : k("", !0),
|
|
74
|
+
C("div", G, [
|
|
75
|
+
m(d(N), {
|
|
84
76
|
size: "small",
|
|
85
|
-
disabled:
|
|
86
|
-
onClick:
|
|
77
|
+
disabled: a.value,
|
|
78
|
+
onClick: g
|
|
87
79
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
|
|
80
|
+
default: c(() => [
|
|
81
|
+
T(b(t.cancelText), 1)
|
|
90
82
|
]),
|
|
91
83
|
_: 1
|
|
92
84
|
}, 8, ["disabled"]),
|
|
93
|
-
|
|
85
|
+
m(d(N), {
|
|
94
86
|
size: "small",
|
|
95
|
-
type:
|
|
96
|
-
loading:
|
|
97
|
-
onClick:
|
|
87
|
+
type: t.type,
|
|
88
|
+
loading: a.value,
|
|
89
|
+
onClick: B
|
|
98
90
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
|
|
91
|
+
default: c(() => [
|
|
92
|
+
T(b(t.confirmText), 1)
|
|
101
93
|
]),
|
|
102
94
|
_: 1
|
|
103
95
|
}, 8, ["type", "loading"])
|
|
@@ -105,9 +97,23 @@ const q = { class: "action-confirm" }, F = {
|
|
|
105
97
|
])
|
|
106
98
|
]),
|
|
107
99
|
_: 3
|
|
108
|
-
}, 8, ["visible"])) :
|
|
100
|
+
}, 8, ["visible"])) : n.mode === "messageConfirm" ? (o(), f(z, { key: 1 }, [
|
|
101
|
+
v(e.$slots, "default", {}, void 0, !0),
|
|
102
|
+
m(A, {
|
|
103
|
+
show: i.value,
|
|
104
|
+
"onUpdate:show": w[0] || (w[0] = (V) => i.value = V),
|
|
105
|
+
title: M.value,
|
|
106
|
+
content: E.value,
|
|
107
|
+
"confirm-text": t.confirmText,
|
|
108
|
+
"cancel-text": t.cancelText,
|
|
109
|
+
type: t.type,
|
|
110
|
+
"on-confirm": F,
|
|
111
|
+
"on-cancel": g,
|
|
112
|
+
"use-loading": ""
|
|
113
|
+
}, null, 8, ["show", "title", "content", "confirm-text", "cancel-text", "type"])
|
|
114
|
+
], 64)) : v(e.$slots, "default", { key: 2 }, void 0, !0);
|
|
109
115
|
}
|
|
110
116
|
});
|
|
111
117
|
export {
|
|
112
|
-
|
|
118
|
+
K as default
|
|
113
119
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineComponent as s, inject as E, computed as d, openBlock as e, createBlock as n, unref as l, withCtx as i, createVNode as h, createElementBlock as a, Fragment as p, renderList as m } from "vue";
|
|
2
|
+
import { ElSelect as b, ElOption as _, ElOptionGroup as A } from "element-plus";
|
|
3
|
+
import { APP_LAYOUT_BRIDGE_KEY as L } from "../../inject/key.mjs";
|
|
4
|
+
import { FORM_CONFIG_SELECT_ALL_VALUE as S } from "../../helpers/form.mjs";
|
|
5
|
+
const w = /* @__PURE__ */ s({
|
|
6
|
+
name: "SelectModule",
|
|
7
|
+
inheritAttrs: !0,
|
|
8
|
+
__name: "SelectModule",
|
|
9
|
+
setup(k) {
|
|
10
|
+
const o = E(L);
|
|
11
|
+
if (!o)
|
|
12
|
+
throw new Error(
|
|
13
|
+
"[SelectModule] 必须在 AppLayout 内使用(缺 APP_LAYOUT_BRIDGE_KEY)"
|
|
14
|
+
);
|
|
15
|
+
const f = d(
|
|
16
|
+
() => o.generateRouteMetaRawTree(o.getRoutes(), {
|
|
17
|
+
filterFn: (r) => r.menuShow,
|
|
18
|
+
sortFn: (r, c) => r.menuSort - c.menuSort
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
return (r, c) => (e(), n(l(b), null, {
|
|
22
|
+
default: i(() => [
|
|
23
|
+
h(l(_), {
|
|
24
|
+
value: l(S),
|
|
25
|
+
label: "全部"
|
|
26
|
+
}, null, 8, ["value"]),
|
|
27
|
+
(e(!0), a(p, null, m(f.value, (t) => (e(), a(p, {
|
|
28
|
+
key: t.path
|
|
29
|
+
}, [
|
|
30
|
+
t.children.length ? (e(), n(l(A), {
|
|
31
|
+
key: 0,
|
|
32
|
+
label: t.title
|
|
33
|
+
}, {
|
|
34
|
+
default: i(() => [
|
|
35
|
+
(e(!0), a(p, null, m(t.children, (u) => (e(), n(l(_), {
|
|
36
|
+
key: u.path,
|
|
37
|
+
label: u.title,
|
|
38
|
+
value: u.path
|
|
39
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
40
|
+
]),
|
|
41
|
+
_: 2
|
|
42
|
+
}, 1032, ["label"])) : (e(), n(l(_), {
|
|
43
|
+
key: 1,
|
|
44
|
+
label: t.title,
|
|
45
|
+
value: t.path
|
|
46
|
+
}, null, 8, ["label", "value"]))
|
|
47
|
+
], 64))), 128))
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
w as default
|
|
55
|
+
};
|
|
@@ -2,7 +2,7 @@ import o from "./ConfirmModal.vue2.mjs";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-dfc2f447"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -3,7 +3,7 @@ import "element-plus/es/components/base/style/css";
|
|
|
3
3
|
import "element-plus/es/components/dialog/style/css";
|
|
4
4
|
import "element-plus/es/components/icon/style/css";
|
|
5
5
|
import "element-plus/es/components/button/style/css";
|
|
6
|
-
import { defineComponent as V, ref as $, computed as F, openBlock as l, createBlock as i, withCtx as
|
|
6
|
+
import { defineComponent as V, ref as $, computed as F, openBlock as l, createBlock as i, withCtx as d, createElementVNode as c, renderSlot as u, resolveDynamicComponent as w, createElementBlock as m, Fragment as B, createTextVNode as r, toDisplayString as f, unref as y, createCommentVNode as x, createVNode as C } from "vue";
|
|
7
7
|
import { Close as L } from "@element-plus/icons-vue";
|
|
8
8
|
const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z = { class: "content" }, A = ["reverse"], W = /* @__PURE__ */ V({
|
|
9
9
|
inheritAttrs: !1,
|
|
@@ -23,7 +23,8 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
|
|
|
23
23
|
reverse: { type: Boolean, default: !1 },
|
|
24
24
|
closeOnPressEscape: { type: Boolean, default: !0 },
|
|
25
25
|
closeOnClickModal: { type: Boolean, default: !0 },
|
|
26
|
-
useLoading: { type: Boolean }
|
|
26
|
+
useLoading: { type: Boolean },
|
|
27
|
+
type: { default: "primary" }
|
|
27
28
|
},
|
|
28
29
|
emits: ["update:show"],
|
|
29
30
|
setup(e, { emit: E }) {
|
|
@@ -66,20 +67,20 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
|
|
|
66
67
|
"close-on-press-escape": e.closeOnPressEscape,
|
|
67
68
|
onClose: b
|
|
68
69
|
}, {
|
|
69
|
-
default:
|
|
70
|
+
default: d(() => [
|
|
70
71
|
c("div", M, [
|
|
71
72
|
c("div", I, [
|
|
72
73
|
c("div", P, [
|
|
73
74
|
u(n.$slots, "title", {}, () => [
|
|
74
75
|
typeof e.title == "function" ? (l(), i(w(e.title), { key: 0 })) : (l(), m(B, { key: 1 }, [
|
|
75
|
-
|
|
76
|
+
r(f(e.title), 1)
|
|
76
77
|
], 64))
|
|
77
78
|
], !0)
|
|
78
79
|
]),
|
|
79
80
|
c("div", z, [
|
|
80
81
|
u(n.$slots, "default", {}, () => [
|
|
81
82
|
typeof e.content == "function" ? (l(), i(w(e.content), { key: 0 })) : (l(), m(B, { key: 1 }, [
|
|
82
|
-
|
|
83
|
+
r(f(e.content), 1)
|
|
83
84
|
], 64))
|
|
84
85
|
], !0)
|
|
85
86
|
]),
|
|
@@ -98,22 +99,22 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
|
|
|
98
99
|
btnHover: "",
|
|
99
100
|
onClick: g
|
|
100
101
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
|
|
102
|
+
default: d(() => [
|
|
103
|
+
r(f(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
|
|
103
104
|
]),
|
|
104
105
|
_: 1
|
|
105
106
|
})),
|
|
106
107
|
C(k, {
|
|
107
|
-
type:
|
|
108
|
+
type: e.type,
|
|
108
109
|
class: "btn confirm-btn",
|
|
109
110
|
loading: y(h),
|
|
110
111
|
onClick: v
|
|
111
112
|
}, {
|
|
112
|
-
default:
|
|
113
|
-
|
|
113
|
+
default: d(() => [
|
|
114
|
+
r(f(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
|
|
114
115
|
]),
|
|
115
116
|
_: 1
|
|
116
|
-
}, 8, ["loading"])
|
|
117
|
+
}, 8, ["type", "loading"])
|
|
117
118
|
], !0)
|
|
118
119
|
], 8, A)
|
|
119
120
|
]),
|
|
@@ -123,7 +124,7 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
|
|
|
123
124
|
onClick: t[0] || (t[0] = (j) => s())
|
|
124
125
|
}, [
|
|
125
126
|
C(H, { size: 22 }, {
|
|
126
|
-
default:
|
|
127
|
+
default: d(() => [
|
|
127
128
|
C(y(L))
|
|
128
129
|
]),
|
|
129
130
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function i(o, e) {
|
|
2
2
|
if (o === "app" && e.length > 0) {
|
|
3
3
|
console.error(
|
|
4
4
|
`[ModalShelf] level="app" 必须最顶层,但其上存在: ${e.join(
|
|
@@ -8,14 +8,12 @@ function l(o, e) {
|
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
10
|
if (o === "page") {
|
|
11
|
-
const r = e.filter((
|
|
11
|
+
const r = e.filter((l) => l === "custom");
|
|
12
12
|
r.length > 0 && console.error(
|
|
13
|
-
`[ModalShelf] level="page" 之上不得套
|
|
14
|
-
", "
|
|
15
|
-
)}`
|
|
13
|
+
`[ModalShelf] level="page" 之上不得套 custom,发现: ${r.join(", ")}`
|
|
16
14
|
);
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
export {
|
|
20
|
-
|
|
18
|
+
i as assertLevelHierarchy
|
|
21
19
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableMain.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-feb76359"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|