@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,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import T from "../form/FormSubmitPanel.vue.mjs";
|
|
7
|
-
const V = { class: "panel-edit-switch" }, A = /* @__PURE__ */ h({
|
|
1
|
+
import { defineComponent as S, useModel as C, ref as h, computed as w, watch as l, openBlock as s, createElementBlock as u, createBlock as d, unref as c, withCtx as F, createTextVNode as B, createCommentVNode as E, renderSlot as r, Fragment as P, mergeModels as f } from "vue";
|
|
2
|
+
import { ElButton as M } from "element-plus";
|
|
3
|
+
import $ from "lodash/cloneDeep";
|
|
4
|
+
import N from "../form/FormSubmitPanel.vue.mjs";
|
|
5
|
+
const T = { class: "panel-edit-switch" }, R = /* @__PURE__ */ S({
|
|
8
6
|
name: "PanelEditSwitch",
|
|
9
7
|
__name: "PanelEditSwitch",
|
|
10
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ f({
|
|
11
9
|
data: {},
|
|
12
10
|
config: {},
|
|
13
11
|
editable: { type: Boolean },
|
|
@@ -16,28 +14,28 @@ const V = { class: "panel-edit-switch" }, A = /* @__PURE__ */ h({
|
|
|
16
14
|
editing: { type: Boolean, default: !1 },
|
|
17
15
|
editingModifiers: {}
|
|
18
16
|
}),
|
|
19
|
-
emits: /* @__PURE__ */
|
|
20
|
-
setup(i, { emit:
|
|
21
|
-
const n = i, g =
|
|
17
|
+
emits: /* @__PURE__ */ f(["submitSuccess"], ["update:editing"]),
|
|
18
|
+
setup(i, { emit: m }) {
|
|
19
|
+
const n = i, g = m, e = C(i, "editing"), a = h(
|
|
22
20
|
{}
|
|
23
|
-
),
|
|
21
|
+
), y = w(() => [n.config.editorConfig]), b = (t) => t, p = () => {
|
|
24
22
|
e.value = !0;
|
|
25
|
-
},
|
|
23
|
+
}, v = () => {
|
|
26
24
|
e.value = !1;
|
|
27
|
-
},
|
|
25
|
+
}, k = (t) => {
|
|
28
26
|
if (!n.submitFn)
|
|
29
27
|
throw new Error("可编辑 那么必须提供 submitFn");
|
|
30
28
|
return n.submitFn(t);
|
|
31
29
|
}, D = (t) => {
|
|
32
30
|
e.value = !1, g("submitSuccess", t);
|
|
33
31
|
};
|
|
34
|
-
return
|
|
32
|
+
return l(
|
|
35
33
|
e,
|
|
36
|
-
(t,
|
|
37
|
-
t && !
|
|
34
|
+
(t, o) => {
|
|
35
|
+
t && !o && (a.value = $(n.data));
|
|
38
36
|
},
|
|
39
37
|
{ immediate: !0 }
|
|
40
|
-
),
|
|
38
|
+
), l(
|
|
41
39
|
() => n.editable,
|
|
42
40
|
(t) => {
|
|
43
41
|
t || (e.value = !1);
|
|
@@ -45,47 +43,44 @@ const V = { class: "panel-edit-switch" }, A = /* @__PURE__ */ h({
|
|
|
45
43
|
{
|
|
46
44
|
immediate: !0
|
|
47
45
|
}
|
|
48
|
-
), (t,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
), (t, o) => (s(), u("div", T, [
|
|
47
|
+
i.editable && !e.value ? (s(), d(c(M), {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "panel-edit-switch-edit-btn",
|
|
50
|
+
type: "primary",
|
|
51
|
+
link: "",
|
|
52
|
+
size: "small",
|
|
53
|
+
onClick: p
|
|
54
|
+
}, {
|
|
55
|
+
default: F(() => [...o[0] || (o[0] = [
|
|
56
|
+
B(" 编辑", -1)
|
|
57
|
+
])]),
|
|
58
|
+
_: 1
|
|
59
|
+
})) : E("", !0),
|
|
60
|
+
e.value ? (s(), u(P, { key: 2 }, [
|
|
61
|
+
i.config.editorRender ? r(t.$slots, "editor", {
|
|
52
62
|
key: 0,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
link: "",
|
|
56
|
-
size: "small",
|
|
57
|
-
onClick: b
|
|
58
|
-
}, {
|
|
59
|
-
default: E(() => [...s[0] || (s[0] = [
|
|
60
|
-
P(" 编辑", -1)
|
|
61
|
-
])]),
|
|
62
|
-
_: 1
|
|
63
|
-
})) : M("", !0),
|
|
64
|
-
e.value ? (r(), u($, { key: 2 }, [
|
|
65
|
-
i.config.editorRender ? l(t.$slots, "editor", {
|
|
66
|
-
key: 0,
|
|
67
|
-
stringifyDraftData: o(a)
|
|
68
|
-
}, void 0, !0) : i.config.editorConfig ? (r(), d(o(T), {
|
|
69
|
-
key: 1,
|
|
70
|
-
list: o(p),
|
|
71
|
-
"stringify-data": y(o(a)),
|
|
72
|
-
"cancel-btn": "取消",
|
|
73
|
-
"operation-position": "bottom-right",
|
|
74
|
-
"submit-fn": v,
|
|
75
|
-
onCancel: k,
|
|
76
|
-
onSuccess: D
|
|
77
|
-
}, null, 8, ["list", "stringify-data"])) : l(t.$slots, "default", {
|
|
78
|
-
key: 2,
|
|
79
|
-
stringifyDraftData: o(a)
|
|
80
|
-
}, void 0, !0)
|
|
81
|
-
], 64)) : l(t.$slots, "default", {
|
|
63
|
+
stringifyDraftData: a.value
|
|
64
|
+
}, void 0, !0) : i.config.editorConfig ? (s(), d(c(N), {
|
|
82
65
|
key: 1,
|
|
83
|
-
|
|
66
|
+
list: y.value,
|
|
67
|
+
"stringify-data": b(a.value),
|
|
68
|
+
"cancel-btn": "取消",
|
|
69
|
+
"operation-position": "bottom-right",
|
|
70
|
+
"submit-fn": k,
|
|
71
|
+
onCancel: v,
|
|
72
|
+
onSuccess: D
|
|
73
|
+
}, null, 8, ["list", "stringify-data"])) : r(t.$slots, "default", {
|
|
74
|
+
key: 2,
|
|
75
|
+
stringifyDraftData: a.value
|
|
84
76
|
}, void 0, !0)
|
|
85
|
-
])
|
|
86
|
-
|
|
77
|
+
], 64)) : r(t.$slots, "default", {
|
|
78
|
+
key: 1,
|
|
79
|
+
stringifyDraftData: i.data
|
|
80
|
+
}, void 0, !0)
|
|
81
|
+
]));
|
|
87
82
|
}
|
|
88
83
|
});
|
|
89
84
|
export {
|
|
90
|
-
|
|
85
|
+
R as default
|
|
91
86
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PanelMain.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5cf5e2e7"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "element-plus
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
import $ from "./PanelItem.vue.mjs";
|
|
7
|
-
import { ElCard as f } from "element-plus";
|
|
8
|
-
import { resolveFormLayout as y } from "../form/utils.mjs";
|
|
9
|
-
const Q = /* @__PURE__ */ x({
|
|
1
|
+
import { defineComponent as B, useCssVars as _, ref as M, computed as l, watch as E, openBlock as o, createBlock as u, unref as d, withCtx as m, createElementBlock as x, Fragment as F, renderList as L, withDirectives as j, mergeProps as P, resolveDynamicComponent as D, normalizeClass as G, createVNode as H, vShow as O } from "vue";
|
|
2
|
+
import U from "./PanelItem.vue.mjs";
|
|
3
|
+
import { ElCard as f, ElRow as V, ElCol as W } from "element-plus";
|
|
4
|
+
import { resolveFormLayout as p } from "../form/utils.mjs";
|
|
5
|
+
const T = /* @__PURE__ */ B({
|
|
10
6
|
name: "PanelMain",
|
|
11
7
|
__name: "PanelMain",
|
|
12
8
|
props: {
|
|
@@ -18,79 +14,76 @@ const Q = /* @__PURE__ */ x({
|
|
|
18
14
|
refreshFn: {}
|
|
19
15
|
},
|
|
20
16
|
emits: ["submitSuccess"],
|
|
21
|
-
setup(s, { emit:
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
setup(s, { emit: y }) {
|
|
18
|
+
_((t) => ({
|
|
19
|
+
v5f184251: h.value
|
|
24
20
|
}));
|
|
25
|
-
const
|
|
26
|
-
() => `panel-main-item-col-wrap_${
|
|
27
|
-
),
|
|
28
|
-
() => typeof
|
|
29
|
-
),
|
|
30
|
-
const { hide:
|
|
31
|
-
if (typeof
|
|
32
|
-
const
|
|
33
|
-
data:
|
|
34
|
-
value:
|
|
35
|
-
config:
|
|
21
|
+
const r = s, v = y, n = M({}), c = l(() => r.itemCard ? f : "span"), C = l(
|
|
22
|
+
() => `panel-main-item-col-wrap_${c.value === f ? "card" : "span"}`
|
|
23
|
+
), h = l(
|
|
24
|
+
() => typeof r.itemCard == "object" && r.itemCard.lastMarginBottom ? r.itemCard.lastMarginBottom : 0
|
|
25
|
+
), k = (t) => {
|
|
26
|
+
const { hide: a } = t;
|
|
27
|
+
if (typeof a == "function") {
|
|
28
|
+
const e = {
|
|
29
|
+
data: r.data,
|
|
30
|
+
value: r.data[t.key],
|
|
31
|
+
config: t
|
|
36
32
|
};
|
|
37
|
-
return !!
|
|
33
|
+
return !!a(e);
|
|
38
34
|
}
|
|
39
|
-
return !!
|
|
40
|
-
},
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
}),
|
|
44
|
-
n.value = {},
|
|
45
|
-
},
|
|
46
|
-
var
|
|
47
|
-
return (
|
|
48
|
-
},
|
|
49
|
-
|
|
35
|
+
return !!a;
|
|
36
|
+
}, g = (t) => ({
|
|
37
|
+
...p(r.layout),
|
|
38
|
+
...p(t)
|
|
39
|
+
}), S = (t, a) => {
|
|
40
|
+
n.value = {}, a && (n.value[t] = a);
|
|
41
|
+
}, b = (t) => (a) => {
|
|
42
|
+
var e;
|
|
43
|
+
return (e = r.refreshFn) == null ? void 0 : e.call(r, a, t);
|
|
44
|
+
}, w = (t, a) => {
|
|
45
|
+
v("submitSuccess", a, t);
|
|
50
46
|
};
|
|
51
|
-
return
|
|
52
|
-
() =>
|
|
53
|
-
(
|
|
54
|
-
const
|
|
55
|
-
Object.keys(n.value).forEach((
|
|
56
|
-
|
|
47
|
+
return E(
|
|
48
|
+
() => r.list,
|
|
49
|
+
(t) => {
|
|
50
|
+
const a = t.map((e) => e.key);
|
|
51
|
+
Object.keys(n.value).forEach((e) => {
|
|
52
|
+
a.includes(e) || delete n.value[e];
|
|
57
53
|
});
|
|
58
54
|
},
|
|
59
55
|
{ immediate: !0 }
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
_: 1
|
|
90
|
-
}, 8, ["gutter"]);
|
|
91
|
-
};
|
|
56
|
+
), (t, a) => (o(), u(d(V), { gutter: s.rowGutter }, {
|
|
57
|
+
default: m(() => [
|
|
58
|
+
(o(!0), x(F, null, L(s.list, (e) => j((o(), u(d(W), P({
|
|
59
|
+
key: e.key
|
|
60
|
+
}, { ref_for: !0 }, g(e.layout), { class: "panel-main-item-col" }), {
|
|
61
|
+
default: m(() => [
|
|
62
|
+
(o(), u(D(c.value), {
|
|
63
|
+
class: G(C.value)
|
|
64
|
+
}, {
|
|
65
|
+
default: m(() => [
|
|
66
|
+
H(U, {
|
|
67
|
+
data: s.data,
|
|
68
|
+
config: e,
|
|
69
|
+
editing: n.value[e.key] ?? !1,
|
|
70
|
+
"refresh-fn": b(e.key),
|
|
71
|
+
"onUpdate:editing": (i) => S(e.key, i),
|
|
72
|
+
onSubmitSuccess: (i) => w(e.key, i)
|
|
73
|
+
}, null, 8, ["data", "config", "editing", "refresh-fn", "onUpdate:editing", "onSubmitSuccess"])
|
|
74
|
+
]),
|
|
75
|
+
_: 2
|
|
76
|
+
}, 1032, ["class"]))
|
|
77
|
+
]),
|
|
78
|
+
_: 2
|
|
79
|
+
}, 1040)), [
|
|
80
|
+
[O, !k(e)]
|
|
81
|
+
])), 128))
|
|
82
|
+
]),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["gutter"]));
|
|
92
85
|
}
|
|
93
86
|
});
|
|
94
87
|
export {
|
|
95
|
-
|
|
88
|
+
T as default
|
|
96
89
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableMain.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-132febbc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|