@done-coding/admin-core 0.8.2 → 0.9.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/config-hook.mjs +37 -0
- package/es/bridge/index.mjs +157 -62
- package/es/bridge/plugin.mjs +29 -0
- package/es/bridge/theme.mjs +62 -0
- package/es/components/app-layout/AppBody.vue.mjs +1 -1
- package/es/components/app-layout/AppBody.vue2.mjs +47 -49
- package/es/components/app-layout/AppBreadcrumb.vue.mjs +1 -1
- package/es/components/app-layout/AppBreadcrumb.vue2.mjs +35 -41
- package/es/components/app-layout/AppFooter.vue.mjs +2 -2
- package/es/components/app-layout/AppFooter.vue2.mjs +8 -8
- package/es/components/app-layout/AppHeader.vue.mjs +1 -1
- package/es/components/app-layout/AppHeader.vue2.mjs +60 -69
- package/es/components/app-layout/AppLayout.vue.mjs +2 -2
- package/es/components/app-layout/AppLayout.vue2.mjs +95 -93
- package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
- package/es/components/app-layout/AppSidebar.vue2.mjs +79 -82
- package/es/components/app-layout/AppTheme.vue.mjs +7 -0
- package/es/components/app-layout/AppTheme.vue2.mjs +38 -0
- package/es/components/data-view/DataListView.vue.mjs +2 -2
- package/es/components/data-view/DataListView.vue2.mjs +36 -36
- package/es/components/display/ActionConfirm.vue2.mjs +16 -16
- package/es/components/display/HeightProvider.vue.mjs +10 -10
- package/es/components/display/TabsHeader.vue.mjs +4 -4
- package/es/components/display/TabsHeader.vue2.mjs +34 -34
- package/es/components/display/TabsMain.vue.mjs +40 -39
- package/es/components/display/TabsRefineFlow.vue.mjs +30 -28
- package/es/components/form/FormItem.vue.mjs +1 -1
- package/es/components/form/FormItem.vue2.mjs +75 -81
- package/es/components/form/FormMain.vue.mjs +81 -88
- package/es/components/form/FormRadioGroup.vue.mjs +42 -49
- package/es/components/form/FormSearch.vue.mjs +1 -1
- package/es/components/form/FormSearch.vue2.mjs +116 -123
- package/es/components/form/FormSelect.vue.mjs +34 -40
- package/es/components/form/FormSubmitBtn.vue.mjs +24 -35
- package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue2.mjs +75 -55
- package/es/components/form/FormTree.vue.mjs +16 -21
- package/es/components/form/FormVerifyCode.vue.mjs +37 -43
- package/es/components/form/FormVerifyImage.vue.mjs +2 -2
- package/es/components/form/FormVerifyImage.vue2.mjs +36 -41
- package/es/components/form/use-form-submit.mjs +21 -0
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +134 -139
- package/es/components/menu/MenuItemSub.vue.mjs +41 -48
- package/es/components/menu/MenuTree.vue.mjs +58 -65
- package/es/components/misc/AutoRefresh.vue.mjs +2 -2
- package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
- package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
- package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
- package/es/components/modal/ConfirmModal.vue.mjs +3 -3
- package/es/components/modal/ConfirmModal.vue2.mjs +93 -100
- package/es/components/modal/DetailModal.vue.mjs +38 -41
- package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
- package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
- package/es/components/panel/PanelMain.vue.mjs +2 -2
- package/es/components/panel/PanelMain.vue2.mjs +67 -74
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +221 -229
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +115 -126
- package/es/hooks/use-admin-theme-apply.mjs +84 -0
- package/es/hooks/use-admin-viewport-apply.mjs +27 -0
- package/es/index.mjs +125 -117
- package/es/inject/key.mjs +7 -4
- package/es/store/app.mjs +75 -84
- package/es/style.css +1 -1
- package/es/utils/theme-scale.mjs +37 -0
- package/package.json +2 -4
- package/types/bridge/config-hook.d.ts +91 -0
- package/types/bridge/index.d.ts +110 -10
- package/types/bridge/plugin.d.ts +39 -0
- package/types/bridge/theme.d.ts +66 -0
- package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
- package/types/components/app-layout/types.d.ts +1 -1
- package/types/components/form/FormItem.vue.d.ts +12 -12
- package/types/components/form/FormSubmitPanel.vue.d.ts +4 -0
- package/types/components/form/FormTree.vue.d.ts +50 -50
- package/types/components/form/types.d.ts +17 -0
- package/types/components/form/use-form-submit.d.ts +25 -0
- package/types/components/menu/MenuTree.vue.d.ts +10 -10
- package/types/components/modal/ModalShelf.vue.d.ts +1 -1
- package/types/components/table/TableMain.vue.d.ts +1 -1
- package/types/hooks/activated.d.ts +2 -2
- package/types/hooks/feel-size.d.ts +1 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/menus-dispatch.d.ts +5 -5
- package/types/hooks/use-admin-theme-apply.d.ts +17 -0
- package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
- package/types/hooks/use-breakpoint.d.ts +1 -1
- package/types/inject/key.d.ts +18 -0
- package/types/store/app.d.ts +138 -59
- package/types/store/user.d.ts +3 -3
- package/types/utils/index.d.ts +1 -0
- package/types/utils/theme-scale.d.ts +35 -0
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "element-plus/es/components/popover/style/css";
|
|
4
|
-
import "element-plus/es/components/input-number/style/css";
|
|
5
|
-
import "element-plus/es/components/switch/style/css";
|
|
6
|
-
import { defineComponent as B, useModel as d, computed as N, watch as g, openBlock as x, createBlock as P, withCtx as f, createElementVNode as p, createVNode as v, unref as h, mergeModels as T } from "vue";
|
|
1
|
+
import { defineComponent as M, useModel as f, computed as R, watch as w, openBlock as y, createBlock as B, unref as t, withCtx as v, createElementVNode as p, createVNode as h, mergeModels as E } from "vue";
|
|
2
|
+
import { ElPopover as g, ElInputNumber as x, ElSwitch as N } from "element-plus";
|
|
7
3
|
import { Refresh as V } from "@element-plus/icons-vue";
|
|
8
|
-
import { useTimeout as
|
|
9
|
-
import { useActivated as
|
|
10
|
-
const
|
|
4
|
+
import { useTimeout as T } from "../../hooks/timeout.mjs";
|
|
5
|
+
import { useActivated as k } from "../../hooks/activated.mjs";
|
|
6
|
+
const A = { class: "auto-refresh" }, I = /* @__PURE__ */ M({
|
|
11
7
|
__name: "AutoRefresh",
|
|
12
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ E({
|
|
13
9
|
refreshFn: {},
|
|
14
10
|
disabled: { type: Boolean }
|
|
15
11
|
}, {
|
|
@@ -20,52 +16,49 @@ const C = { class: "auto-refresh" }, H = /* @__PURE__ */ B({
|
|
|
20
16
|
}),
|
|
21
17
|
emits: ["update:modelValue", "update:interval"],
|
|
22
18
|
setup(r) {
|
|
23
|
-
const
|
|
19
|
+
const d = r, i = f(r, "modelValue"), l = f(r, "interval"), n = R(() => i.value && !d.disabled), [b, m] = T();
|
|
24
20
|
let o = null;
|
|
25
|
-
const c = () => (o || (o =
|
|
21
|
+
const c = () => (o || (o = d.refreshFn().catch(() => {
|
|
26
22
|
}).finally(() => {
|
|
27
23
|
o = null;
|
|
28
|
-
})), o),
|
|
29
|
-
|
|
30
|
-
await c(), n.value &&
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
return g([n, t], ([l]) => {
|
|
34
|
-
l ? i() : m();
|
|
35
|
-
}), A(({ isActivated: l, triggerType: e }) => {
|
|
36
|
-
l && n.value && (e === "activated" && (m(), c()), i());
|
|
37
|
-
}), (l, e) => {
|
|
38
|
-
const b = y, _ = R, w = M;
|
|
39
|
-
return x(), P(w, {
|
|
40
|
-
trigger: "hover",
|
|
41
|
-
placement: "bottom-start"
|
|
42
|
-
}, {
|
|
43
|
-
reference: f(() => [
|
|
44
|
-
v(b, {
|
|
45
|
-
modelValue: a.value,
|
|
46
|
-
"onUpdate:modelValue": e[0] || (e[0] = (s) => a.value = s),
|
|
47
|
-
"active-action-icon": h(V),
|
|
48
|
-
"inactive-action-icon": h(V)
|
|
49
|
-
}, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"])
|
|
50
|
-
]),
|
|
51
|
-
default: f(() => [
|
|
52
|
-
p("div", C, [
|
|
53
|
-
e[2] || (e[2] = p("div", { class: "auto-refresh-label" }, "自动刷新间隔(秒)", -1)),
|
|
54
|
-
v(_, {
|
|
55
|
-
modelValue: t.value,
|
|
56
|
-
"onUpdate:modelValue": e[1] || (e[1] = (s) => t.value = s),
|
|
57
|
-
min: 1,
|
|
58
|
-
step: 1,
|
|
59
|
-
size: "small",
|
|
60
|
-
class: "auto-refresh-interval"
|
|
61
|
-
}, null, 8, ["modelValue"])
|
|
62
|
-
])
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
65
|
-
});
|
|
24
|
+
})), o), s = () => {
|
|
25
|
+
b(async () => {
|
|
26
|
+
await c(), n.value && s();
|
|
27
|
+
}, l.value * 1e3);
|
|
66
28
|
};
|
|
29
|
+
return w([n, l], ([a]) => {
|
|
30
|
+
a ? s() : m();
|
|
31
|
+
}), k(({ isActivated: a, triggerType: e }) => {
|
|
32
|
+
a && n.value && (e === "activated" && (m(), c()), s());
|
|
33
|
+
}), (a, e) => (y(), B(t(g), {
|
|
34
|
+
trigger: "hover",
|
|
35
|
+
placement: "bottom-start"
|
|
36
|
+
}, {
|
|
37
|
+
reference: v(() => [
|
|
38
|
+
h(t(N), {
|
|
39
|
+
modelValue: i.value,
|
|
40
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => i.value = u),
|
|
41
|
+
"active-action-icon": t(V),
|
|
42
|
+
"inactive-action-icon": t(V)
|
|
43
|
+
}, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"])
|
|
44
|
+
]),
|
|
45
|
+
default: v(() => [
|
|
46
|
+
p("div", A, [
|
|
47
|
+
e[2] || (e[2] = p("div", { class: "auto-refresh-label" }, "自动刷新间隔(秒)", -1)),
|
|
48
|
+
h(t(x), {
|
|
49
|
+
modelValue: l.value,
|
|
50
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => l.value = u),
|
|
51
|
+
min: 1,
|
|
52
|
+
step: 1,
|
|
53
|
+
size: "small",
|
|
54
|
+
class: "auto-refresh-interval"
|
|
55
|
+
}, null, 8, ["modelValue"])
|
|
56
|
+
])
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
}));
|
|
67
60
|
}
|
|
68
61
|
});
|
|
69
62
|
export {
|
|
70
|
-
|
|
63
|
+
I as default
|
|
71
64
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AutoRefreshGroup.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e608ff06"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "element-plus
|
|
4
|
-
import "element-plus/
|
|
5
|
-
|
|
6
|
-
import k from "./AutoRefresh.vue.mjs";
|
|
7
|
-
import { Refresh as y } from "@element-plus/icons-vue";
|
|
8
|
-
const b = /* @__PURE__ */ v({
|
|
1
|
+
import { defineComponent as m, useModel as s, openBlock as o, createElementBlock as h, Fragment as v, createBlock as u, createCommentVNode as i, unref as l, withCtx as f, createVNode as d, normalizeClass as R, mergeModels as c } from "vue";
|
|
2
|
+
import A from "./AutoRefresh.vue.mjs";
|
|
3
|
+
import { ElButton as B, ElIcon as g } from "element-plus";
|
|
4
|
+
import { Refresh as k } from "@element-plus/icons-vue";
|
|
5
|
+
const V = /* @__PURE__ */ m({
|
|
9
6
|
__name: "AutoRefreshGroup",
|
|
10
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ c({
|
|
11
8
|
showAutoRefresh: { type: Boolean, default: !0 },
|
|
12
9
|
showRefresh: { type: Boolean, default: !0 },
|
|
13
10
|
loading: { type: Boolean },
|
|
@@ -20,41 +17,38 @@ const b = /* @__PURE__ */ v({
|
|
|
20
17
|
}),
|
|
21
18
|
emits: ["update:isAutoRefresh", "update:interval"],
|
|
22
19
|
setup(e) {
|
|
23
|
-
const
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
})) : u("", !0)
|
|
54
|
-
], 64);
|
|
55
|
-
};
|
|
20
|
+
const n = s(e, "isAutoRefresh"), a = s(e, "interval");
|
|
21
|
+
return (p, t) => (o(), h(v, null, [
|
|
22
|
+
e.showAutoRefresh ? (o(), u(A, {
|
|
23
|
+
key: 0,
|
|
24
|
+
modelValue: n.value,
|
|
25
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => n.value = r),
|
|
26
|
+
interval: a.value,
|
|
27
|
+
"onUpdate:interval": t[1] || (t[1] = (r) => a.value = r),
|
|
28
|
+
refreshFn: e.refreshFn,
|
|
29
|
+
disabled: e.loading
|
|
30
|
+
}, null, 8, ["modelValue", "interval", "refreshFn", "disabled"])) : i("", !0),
|
|
31
|
+
e.showRefresh ? (o(), u(l(B), {
|
|
32
|
+
key: 1,
|
|
33
|
+
size: "small",
|
|
34
|
+
circle: "",
|
|
35
|
+
onClick: t[2] || (t[2] = (r) => e.refreshFn())
|
|
36
|
+
}, {
|
|
37
|
+
default: f(() => [
|
|
38
|
+
d(l(g), {
|
|
39
|
+
class: R({ "auto-refresh-group-icon--rotating": e.loading })
|
|
40
|
+
}, {
|
|
41
|
+
default: f(() => [
|
|
42
|
+
d(l(k))
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
}, 8, ["class"])
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
})) : i("", !0)
|
|
49
|
+
], 64));
|
|
56
50
|
}
|
|
57
51
|
});
|
|
58
52
|
export {
|
|
59
|
-
|
|
53
|
+
V as default
|
|
60
54
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./ConfirmModal.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0e89245a"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
f as default
|
|
8
8
|
};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "element-plus/
|
|
4
|
-
|
|
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 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
|
-
import { Close as L } from "@element-plus/icons-vue";
|
|
8
|
-
const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z = { class: "content" }, A = ["reverse"], W = /* @__PURE__ */ V({
|
|
1
|
+
import { defineComponent as H, ref as N, computed as O, openBlock as l, createBlock as d, unref as a, withCtx as r, createElementVNode as c, renderSlot as m, resolveDynamicComponent as k, createElementBlock as y, Fragment as w, createTextVNode as f, toDisplayString as u, createCommentVNode as B, createVNode as C } from "vue";
|
|
2
|
+
import { ElDialog as S, ElButton as x, ElIcon as V } from "element-plus";
|
|
3
|
+
import { Close as $ } from "@element-plus/icons-vue";
|
|
4
|
+
const D = { class: "main" }, F = { class: "shim" }, L = { class: "title" }, M = { class: "content" }, P = ["reverse"], q = /* @__PURE__ */ H({
|
|
9
5
|
inheritAttrs: !1,
|
|
10
6
|
__name: "ConfirmModal",
|
|
11
7
|
props: {
|
|
@@ -27,116 +23,113 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
|
|
|
27
23
|
type: { default: "primary" }
|
|
28
24
|
},
|
|
29
25
|
emits: ["update:show"],
|
|
30
|
-
setup(e, { emit:
|
|
31
|
-
const o = e,
|
|
26
|
+
setup(e, { emit: T }) {
|
|
27
|
+
const o = e, b = T, s = N(!1), h = O(() => o.useLoading && s.value), i = (n) => {
|
|
32
28
|
var t;
|
|
33
|
-
console.log("close", n),
|
|
34
|
-
},
|
|
29
|
+
console.log("close", n), b("update:show", !1), (t = o.onClose) == null || t.call(o, n);
|
|
30
|
+
}, v = async () => {
|
|
35
31
|
var t;
|
|
36
32
|
if (await ((t = o.onCancel) == null ? void 0 : t.call(o)) === !1) {
|
|
37
33
|
console.log("确认弹窗 onCancel 返回false,不关闭弹窗");
|
|
38
34
|
return;
|
|
39
35
|
}
|
|
40
|
-
|
|
41
|
-
},
|
|
36
|
+
i(!1);
|
|
37
|
+
}, g = async () => {
|
|
42
38
|
var n;
|
|
43
|
-
|
|
39
|
+
s.value = !0;
|
|
44
40
|
try {
|
|
45
41
|
const t = await ((n = o.onConfirm) == null ? void 0 : n.call(o));
|
|
46
|
-
if (
|
|
42
|
+
if (s.value = !1, t === !1) {
|
|
47
43
|
console.log("确认弹窗 onConfirm 返回false,不关闭弹窗");
|
|
48
44
|
return;
|
|
49
45
|
}
|
|
50
|
-
|
|
46
|
+
i(!0);
|
|
51
47
|
} catch {
|
|
52
|
-
|
|
48
|
+
s.value = !1;
|
|
53
49
|
}
|
|
54
|
-
},
|
|
55
|
-
console.log("closeHandler"),
|
|
50
|
+
}, E = () => {
|
|
51
|
+
console.log("closeHandler"), i(!1);
|
|
56
52
|
};
|
|
57
|
-
return (n, t) => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
], 64))
|
|
85
|
-
], !0)
|
|
86
|
-
]),
|
|
87
|
-
c("div", {
|
|
88
|
-
class: "footer",
|
|
89
|
-
reverse: e.reverse
|
|
90
|
-
}, [
|
|
91
|
-
u(n.$slots, "footer", {
|
|
92
|
-
cancelHandler: g,
|
|
93
|
-
confirmHandler: v,
|
|
94
|
-
loading: y(h)
|
|
95
|
-
}, () => [
|
|
96
|
-
e.hiddenCancel ? x("", !0) : (l(), i(k, {
|
|
97
|
-
key: 0,
|
|
98
|
-
class: "btn cancel-btn",
|
|
99
|
-
btnHover: "",
|
|
100
|
-
onClick: g
|
|
101
|
-
}, {
|
|
102
|
-
default: d(() => [
|
|
103
|
-
r(f(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
|
|
104
|
-
]),
|
|
105
|
-
_: 1
|
|
106
|
-
})),
|
|
107
|
-
C(k, {
|
|
108
|
-
type: e.type,
|
|
109
|
-
class: "btn confirm-btn",
|
|
110
|
-
loading: y(h),
|
|
111
|
-
onClick: v
|
|
112
|
-
}, {
|
|
113
|
-
default: d(() => [
|
|
114
|
-
r(f(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
|
|
115
|
-
]),
|
|
116
|
-
_: 1
|
|
117
|
-
}, 8, ["type", "loading"])
|
|
118
|
-
], !0)
|
|
119
|
-
], 8, A)
|
|
53
|
+
return (n, t) => (l(), d(a(S), {
|
|
54
|
+
"model-value": e.show,
|
|
55
|
+
class: "confirm-dialog",
|
|
56
|
+
width: e.width,
|
|
57
|
+
"show-close": !1,
|
|
58
|
+
"append-to-body": "",
|
|
59
|
+
"align-center": "",
|
|
60
|
+
"close-on-click-modal": e.closeOnClickModal,
|
|
61
|
+
"close-on-press-escape": e.closeOnPressEscape,
|
|
62
|
+
onClose: E
|
|
63
|
+
}, {
|
|
64
|
+
default: r(() => [
|
|
65
|
+
c("div", D, [
|
|
66
|
+
c("div", F, [
|
|
67
|
+
c("div", L, [
|
|
68
|
+
m(n.$slots, "title", {}, () => [
|
|
69
|
+
typeof e.title == "function" ? (l(), d(k(e.title), { key: 0 })) : (l(), y(w, { key: 1 }, [
|
|
70
|
+
f(u(e.title), 1)
|
|
71
|
+
], 64))
|
|
72
|
+
], !0)
|
|
73
|
+
]),
|
|
74
|
+
c("div", M, [
|
|
75
|
+
m(n.$slots, "default", {}, () => [
|
|
76
|
+
typeof e.content == "function" ? (l(), d(k(e.content), { key: 0 })) : (l(), y(w, { key: 1 }, [
|
|
77
|
+
f(u(e.content), 1)
|
|
78
|
+
], 64))
|
|
79
|
+
], !0)
|
|
120
80
|
]),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
onClick: t[0] || (t[0] = (j) => s())
|
|
81
|
+
c("div", {
|
|
82
|
+
class: "footer",
|
|
83
|
+
reverse: e.reverse
|
|
125
84
|
}, [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
85
|
+
m(n.$slots, "footer", {
|
|
86
|
+
cancelHandler: v,
|
|
87
|
+
confirmHandler: g,
|
|
88
|
+
loading: h.value
|
|
89
|
+
}, () => [
|
|
90
|
+
e.hiddenCancel ? B("", !0) : (l(), d(a(x), {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "btn cancel-btn",
|
|
93
|
+
btnHover: "",
|
|
94
|
+
onClick: v
|
|
95
|
+
}, {
|
|
96
|
+
default: r(() => [
|
|
97
|
+
f(u(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})),
|
|
101
|
+
C(a(x), {
|
|
102
|
+
type: e.type,
|
|
103
|
+
class: "btn confirm-btn",
|
|
104
|
+
loading: h.value,
|
|
105
|
+
onClick: g
|
|
106
|
+
}, {
|
|
107
|
+
default: r(() => [
|
|
108
|
+
f(u(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
}, 8, ["type", "loading"])
|
|
112
|
+
], !0)
|
|
113
|
+
], 8, P)
|
|
114
|
+
]),
|
|
115
|
+
e.showClose ? (l(), y("div", {
|
|
116
|
+
key: 0,
|
|
117
|
+
class: "close-box",
|
|
118
|
+
onClick: t[0] || (t[0] = (z) => i())
|
|
119
|
+
}, [
|
|
120
|
+
C(a(V), { size: 22 }, {
|
|
121
|
+
default: r(() => [
|
|
122
|
+
C(a($))
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
})
|
|
126
|
+
])) : B("", !0)
|
|
127
|
+
])
|
|
128
|
+
]),
|
|
129
|
+
_: 3
|
|
130
|
+
}, 8, ["model-value", "width", "close-on-click-modal", "close-on-press-escape"]));
|
|
138
131
|
}
|
|
139
132
|
});
|
|
140
133
|
export {
|
|
141
|
-
|
|
134
|
+
q as default
|
|
142
135
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import y from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as w, ref as y, computed as n, watch as g, openBlock as b, createBlock as p, withCtx as A, createVNode as W, unref as v, mergeProps as C } from "vue";
|
|
2
|
+
import D from "../form/FormMain.vue.mjs";
|
|
3
|
+
import { stringifyFormData as M } from "../form/utils.mjs";
|
|
4
|
+
import k from "./ConfirmModal.vue.mjs";
|
|
5
|
+
const $ = /* @__PURE__ */ w({
|
|
6
6
|
__name: "DetailModal",
|
|
7
7
|
props: {
|
|
8
8
|
data: {},
|
|
@@ -20,51 +20,48 @@ const L = /* @__PURE__ */ g({
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["update:show", "afterAdd", "afterEdit"],
|
|
22
22
|
setup(a, { emit: f }) {
|
|
23
|
-
const t = a,
|
|
24
|
-
|
|
25
|
-
},
|
|
23
|
+
const t = a, i = f, l = y(), s = n(() => t.data), u = n(() => `${t.type === "add" ? "新增" : "编辑"}${t.subTitle || ""}`), m = (o) => {
|
|
24
|
+
i("update:show", o);
|
|
25
|
+
}, c = () => {
|
|
26
26
|
var o;
|
|
27
|
-
return (o =
|
|
28
|
-
var
|
|
29
|
-
const e =
|
|
30
|
-
console.log("confirm", e), t.type === "add" ? (await ((
|
|
27
|
+
return (o = l.value) == null ? void 0 : o.validate().then(async () => {
|
|
28
|
+
var d, r;
|
|
29
|
+
const e = M(t.data, t.list);
|
|
30
|
+
console.log("confirm", e), t.type === "add" ? (await ((d = t.addApi) == null ? void 0 : d.call(t, e)), i("afterAdd", e)) : (await ((r = t.editApi) == null ? void 0 : r.call(t, e)), i("afterEdit", e));
|
|
31
31
|
});
|
|
32
|
-
},
|
|
32
|
+
}, h = () => {
|
|
33
33
|
console.log("cancel");
|
|
34
34
|
};
|
|
35
|
-
return
|
|
35
|
+
return g(
|
|
36
36
|
() => t.show,
|
|
37
37
|
(o) => {
|
|
38
38
|
var e;
|
|
39
|
-
o || (e =
|
|
39
|
+
o || (e = l.value) == null || e.clearValidate();
|
|
40
40
|
}
|
|
41
|
-
), (o, e) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_: 1
|
|
64
|
-
}, 8, ["title", "show", "width"]);
|
|
65
|
-
};
|
|
41
|
+
), (o, e) => (b(), p(k, {
|
|
42
|
+
title: u.value,
|
|
43
|
+
show: a.show,
|
|
44
|
+
onConfirm: c,
|
|
45
|
+
onCancel: h,
|
|
46
|
+
useLoading: "",
|
|
47
|
+
width: a.modalWidth,
|
|
48
|
+
"onUpdate:show": m
|
|
49
|
+
}, {
|
|
50
|
+
default: A(() => [
|
|
51
|
+
W(v(D), C({
|
|
52
|
+
ref_key: "formMain",
|
|
53
|
+
ref: l,
|
|
54
|
+
list: a.list,
|
|
55
|
+
data: s.value,
|
|
56
|
+
layout: a.formLayout,
|
|
57
|
+
labelWidth: a.labelWidth,
|
|
58
|
+
"row-gutter": a.formRowGutter
|
|
59
|
+
}, a.formProps), null, 16, ["list", "data", "layout", "labelWidth", "row-gutter"])
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["title", "show", "width"]));
|
|
66
63
|
}
|
|
67
64
|
});
|
|
68
65
|
export {
|
|
69
|
-
|
|
66
|
+
$ as default
|
|
70
67
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./PanelEditSwitch.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-65f056ab"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|