@done-coding/admin-core 0.17.0 → 0.17.1-alpha.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/components/app-layout/AppBody.vue.mjs +2 -2
- package/es/components/app-layout/AppBody.vue2.mjs +53 -54
- package/es/components/app-layout/keep-alive.mjs +22 -0
- package/es/components/data-view/DataListView.vue.mjs +2 -2
- package/es/components/data-view/DataListView.vue2.mjs +55 -53
- package/es/components/display/ActionConfirm.vue.mjs +2 -2
- package/es/components/display/ActionConfirm.vue2.mjs +1 -1
- package/es/components/display/TabsRefineFlow.vue.mjs +34 -32
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +74 -75
- package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
- package/es/components/misc/AutoRefreshGroup.vue2.mjs +42 -35
- package/es/components/modal/{ConfirmModal.vue.mjs → ModalConfirm.vue.mjs} +3 -3
- package/es/components/modal/{ConfirmModal.vue2.mjs → ModalConfirm.vue2.mjs} +34 -34
- package/es/components/modal/ModalDetail.vue.mjs +63 -0
- package/es/components/modal/ModalDetail.vue2.mjs +4 -0
- package/es/components/modal/ModalForm.vue.mjs +75 -0
- package/es/components/modal/ModalForm.vue2.mjs +4 -0
- package/es/components/panel/PanelItem.vue.mjs +5 -81
- package/es/components/panel/PanelItem.vue2.mjs +93 -2
- package/es/components/panel/PanelMain.vue2.mjs +14 -14
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +210 -174
- package/es/components/table/TableSkeleton.vue.mjs +7 -0
- package/es/components/table/TableSkeleton.vue2.mjs +89 -0
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +22 -21
- package/es/components/table/use-fill-height.mjs +14 -0
- package/es/components/table/use-table-skeleton.mjs +19 -0
- package/es/index.mjs +230 -223
- package/es/router/group-redirect.mjs +20 -0
- package/es/style.css +1 -1
- package/package.json +2 -2
- package/types/components/app-layout/keep-alive.d.ts +14 -0
- package/types/components/data-view/types.d.ts +1 -0
- package/types/components/misc/AutoRefreshGroup.vue.d.ts +2 -1
- package/types/components/misc/types.d.ts +1 -0
- package/types/components/modal/{ConfirmModal.vue.d.ts → ModalConfirm.vue.d.ts} +1 -1
- package/types/components/modal/{DetailModal.vue.d.ts → ModalDetail.vue.d.ts} +2 -2
- package/types/components/modal/ModalForm.vue.d.ts +24 -0
- package/types/components/modal/index.d.ts +4 -3
- package/types/components/modal/types.d.ts +26 -2
- package/types/components/panel/PanelItem.vue.d.ts +1 -1
- package/types/components/panel/types.d.ts +4 -1
- package/types/components/table/TableSkeleton.vue.d.ts +7 -0
- package/types/components/table/types.d.ts +10 -0
- package/types/components/table/use-fill-height.d.ts +11 -0
- package/types/components/table/use-table-skeleton.d.ts +17 -0
- package/types/injectInfo.json.d.ts +1 -1
- package/types/router/group-redirect.d.ts +5 -0
- package/types/router/index.d.ts +1 -0
- package/es/components/modal/DetailModal.vue.mjs +0 -74
- package/es/components/modal/DetailModal.vue2.mjs +0 -4
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineComponent as m, ref as c, computed as h, watch as w, openBlock as y, createBlock as v, withCtx as r, createVNode as D, unref as b, mergeProps as g, renderSlot as l } from "vue";
|
|
2
|
+
import B from "../form/FormMain.vue.mjs";
|
|
3
|
+
import M from "./ModalConfirm.vue.mjs";
|
|
4
|
+
const T = /* @__PURE__ */ m({
|
|
5
|
+
__name: "ModalForm",
|
|
6
|
+
props: {
|
|
7
|
+
show: { type: Boolean },
|
|
8
|
+
data: {},
|
|
9
|
+
list: {},
|
|
10
|
+
submitFn: {},
|
|
11
|
+
title: {},
|
|
12
|
+
width: { default: 600 },
|
|
13
|
+
layerType: {},
|
|
14
|
+
direction: {},
|
|
15
|
+
formLayout: { default: () => ({ span: 24 }) },
|
|
16
|
+
formProps: {},
|
|
17
|
+
formRowGutter: {},
|
|
18
|
+
labelWidth: { default: "auto" },
|
|
19
|
+
headerDivider: { type: Boolean, default: !0 },
|
|
20
|
+
footerDivider: { type: Boolean, default: !0 }
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:show", "submitSuccess"],
|
|
23
|
+
setup(e, { emit: n }) {
|
|
24
|
+
const i = e, d = n, a = c(), s = h(() => i.data), u = (t) => {
|
|
25
|
+
d("update:show", t);
|
|
26
|
+
}, f = () => {
|
|
27
|
+
var t;
|
|
28
|
+
return (t = a.value) == null ? void 0 : t.validate().then(async () => {
|
|
29
|
+
const o = a.value.stringify();
|
|
30
|
+
await i.submitFn(o), d("submitSuccess", o);
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return w(
|
|
34
|
+
() => i.show,
|
|
35
|
+
(t) => {
|
|
36
|
+
var o;
|
|
37
|
+
t || (o = a.value) == null || o.clearValidate();
|
|
38
|
+
}
|
|
39
|
+
), (t, o) => (y(), v(M, {
|
|
40
|
+
class: "dc-form-modal",
|
|
41
|
+
title: e.title,
|
|
42
|
+
show: e.show,
|
|
43
|
+
onConfirm: f,
|
|
44
|
+
useLoading: "",
|
|
45
|
+
width: e.width,
|
|
46
|
+
layerType: e.layerType,
|
|
47
|
+
direction: e.direction,
|
|
48
|
+
headerDivider: e.headerDivider,
|
|
49
|
+
footerDivider: e.footerDivider,
|
|
50
|
+
"onUpdate:show": u
|
|
51
|
+
}, {
|
|
52
|
+
"main-header": r(() => [
|
|
53
|
+
l(t.$slots, "header")
|
|
54
|
+
]),
|
|
55
|
+
"main-footer": r(() => [
|
|
56
|
+
l(t.$slots, "footer")
|
|
57
|
+
]),
|
|
58
|
+
default: r(() => [
|
|
59
|
+
D(b(B), g({
|
|
60
|
+
ref_key: "formMain",
|
|
61
|
+
ref: a,
|
|
62
|
+
list: e.list,
|
|
63
|
+
data: s.value,
|
|
64
|
+
layout: e.formLayout,
|
|
65
|
+
labelWidth: e.labelWidth,
|
|
66
|
+
"row-gutter": e.formRowGutter
|
|
67
|
+
}, e.formProps), null, 16, ["list", "data", "layout", "labelWidth", "row-gutter"])
|
|
68
|
+
]),
|
|
69
|
+
_: 3
|
|
70
|
+
}, 8, ["title", "show", "width", "layerType", "direction", "headerDivider", "footerDivider"]));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export {
|
|
74
|
+
T as default
|
|
75
|
+
};
|
|
@@ -1,83 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
__name: "PanelItem",
|
|
6
|
-
props: /* @__PURE__ */ m({
|
|
7
|
-
data: {},
|
|
8
|
-
config: {},
|
|
9
|
-
refreshFn: { type: Function }
|
|
10
|
-
}, {
|
|
11
|
-
editing: { type: Boolean, default: !1 },
|
|
12
|
-
editingModifiers: {}
|
|
13
|
-
}),
|
|
14
|
-
emits: /* @__PURE__ */ m(["submitSuccess"], ["update:editing"]),
|
|
15
|
-
setup(o, { emit: v }) {
|
|
16
|
-
const t = o, b = v, a = h(o, "editing"), d = (e) => {
|
|
17
|
-
const { config: n } = t;
|
|
18
|
-
return {
|
|
19
|
-
data: e,
|
|
20
|
-
value: e[n.key],
|
|
21
|
-
config: n
|
|
22
|
-
};
|
|
23
|
-
}, p = r(() => d(t.data)), y = r(() => {
|
|
24
|
-
const { editable: e } = t.config;
|
|
25
|
-
return typeof e == "function" ? !!e(p.value) : !!e;
|
|
26
|
-
}), S = (e) => {
|
|
27
|
-
const {
|
|
28
|
-
config: { key: n, label: i }
|
|
29
|
-
} = t;
|
|
30
|
-
if (e)
|
|
31
|
-
return {
|
|
32
|
-
...e,
|
|
33
|
-
key: n,
|
|
34
|
-
label: i,
|
|
35
|
-
layoutHide: !0,
|
|
36
|
-
layout: { span: 24 }
|
|
37
|
-
};
|
|
38
|
-
}, k = r(() => {
|
|
39
|
-
const {
|
|
40
|
-
config: { editorConfig: e, ...n }
|
|
41
|
-
} = t;
|
|
42
|
-
return {
|
|
43
|
-
...n,
|
|
44
|
-
editorConfig: S(e)
|
|
45
|
-
};
|
|
46
|
-
}), B = () => {
|
|
47
|
-
var e;
|
|
48
|
-
return (e = t.refreshFn) == null ? void 0 : e.call(t, t.data);
|
|
49
|
-
}, C = () => {
|
|
50
|
-
a.value = !1;
|
|
51
|
-
}, s = (e) => ({
|
|
52
|
-
...d(e),
|
|
53
|
-
editing: a.value,
|
|
54
|
-
refresh: B,
|
|
55
|
-
closeEdit: C
|
|
56
|
-
}), F = (e) => {
|
|
57
|
-
b("submitSuccess", {
|
|
58
|
-
...t.data,
|
|
59
|
-
...e
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
return (e, n) => (c(), u(R, {
|
|
63
|
-
editing: a.value,
|
|
64
|
-
"onUpdate:editing": n[0] || (n[0] = (i) => a.value = i),
|
|
65
|
-
config: k.value,
|
|
66
|
-
editable: y.value,
|
|
67
|
-
data: o.data,
|
|
68
|
-
"submit-fn": o.config.submitFn,
|
|
69
|
-
onSubmitSuccess: F
|
|
70
|
-
}, {
|
|
71
|
-
default: l(({ stringifyDraftData: i }) => [
|
|
72
|
-
o.config.render === void 0 ? (c(), x("span", w, I(s(i).value), 1)) : (c(), u(f(o.config.render), g(M({ key: 1 }, s(i))), null, 16))
|
|
73
|
-
]),
|
|
74
|
-
editor: l(({ stringifyDraftData: i }) => [
|
|
75
|
-
(c(), u(f(o.config.editorRender), g(E(s(i))), null, 16))
|
|
76
|
-
]),
|
|
77
|
-
_: 1
|
|
78
|
-
}, 8, ["editing", "config", "editable", "data", "submit-fn"]));
|
|
79
|
-
}
|
|
80
|
-
});
|
|
1
|
+
import o from "./PanelItem.vue2.mjs";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-70a9fee5"]]);
|
|
81
5
|
export {
|
|
82
|
-
|
|
6
|
+
r as default
|
|
83
7
|
};
|
|
@@ -1,4 +1,95 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as E, useModel as x, computed as s, openBlock as a, createElementBlock as d, normalizeClass as z, normalizeStyle as H, toDisplayString as u, createCommentVNode as I, createElementVNode as M, createVNode as N, withCtx as m, createBlock as f, resolveDynamicComponent as g, normalizeProps as b, guardReactiveProps as R, mergeProps as V, mergeModels as v } from "vue";
|
|
2
|
+
import w from "./PanelEditSwitch.vue.mjs";
|
|
3
|
+
const U = { class: "panel-item-content" }, j = { key: 0 }, D = /* @__PURE__ */ E({
|
|
4
|
+
name: "PanelItem",
|
|
5
|
+
__name: "PanelItem",
|
|
6
|
+
props: /* @__PURE__ */ v({
|
|
7
|
+
data: {},
|
|
8
|
+
config: {},
|
|
9
|
+
refreshFn: { type: Function }
|
|
10
|
+
}, {
|
|
11
|
+
editing: { type: Boolean, default: !1 },
|
|
12
|
+
editingModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: /* @__PURE__ */ v(["submitSuccess"], ["update:editing"]),
|
|
15
|
+
setup(t, { emit: y }) {
|
|
16
|
+
const n = t, S = y, l = x(t, "editing"), r = (e) => {
|
|
17
|
+
const { config: i } = n;
|
|
18
|
+
return {
|
|
19
|
+
data: e,
|
|
20
|
+
value: e[i.key],
|
|
21
|
+
config: i
|
|
22
|
+
};
|
|
23
|
+
}, k = s(() => r(n.data)), C = s(() => {
|
|
24
|
+
const { editable: e } = n.config;
|
|
25
|
+
return typeof e == "function" ? !!e(k.value) : !!e;
|
|
26
|
+
}), p = (e) => {
|
|
27
|
+
const {
|
|
28
|
+
config: { key: i, label: o }
|
|
29
|
+
} = n;
|
|
30
|
+
if (e)
|
|
31
|
+
return {
|
|
32
|
+
...e,
|
|
33
|
+
key: i,
|
|
34
|
+
label: o,
|
|
35
|
+
labelHide: !0,
|
|
36
|
+
layoutHide: !0,
|
|
37
|
+
layout: { span: 24 }
|
|
38
|
+
};
|
|
39
|
+
}, P = s(() => {
|
|
40
|
+
const {
|
|
41
|
+
config: { editorConfig: e, ...i }
|
|
42
|
+
} = n;
|
|
43
|
+
return {
|
|
44
|
+
...i,
|
|
45
|
+
editorConfig: p(e)
|
|
46
|
+
};
|
|
47
|
+
}), h = () => {
|
|
48
|
+
var e;
|
|
49
|
+
return (e = n.refreshFn) == null ? void 0 : e.call(n, n.data);
|
|
50
|
+
}, B = () => {
|
|
51
|
+
l.value = !1;
|
|
52
|
+
}, c = (e) => ({
|
|
53
|
+
...r(e),
|
|
54
|
+
editing: l.value,
|
|
55
|
+
refresh: h,
|
|
56
|
+
closeEdit: B
|
|
57
|
+
}), F = (e) => {
|
|
58
|
+
S("submitSuccess", {
|
|
59
|
+
...n.data,
|
|
60
|
+
...e
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return (e, i) => (a(), d("div", {
|
|
64
|
+
class: z(["dc-panel-item panel-item", { "panel-item--label-top": t.config.labelPosition === "top" }])
|
|
65
|
+
}, [
|
|
66
|
+
t.config.label && !t.config.labelHide ? (a(), d("label", {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: "panel-item-label",
|
|
69
|
+
style: H(t.config.labelStyle)
|
|
70
|
+
}, u(t.config.label), 5)) : I("", !0),
|
|
71
|
+
M("div", U, [
|
|
72
|
+
N(w, {
|
|
73
|
+
editing: l.value,
|
|
74
|
+
"onUpdate:editing": i[0] || (i[0] = (o) => l.value = o),
|
|
75
|
+
config: P.value,
|
|
76
|
+
editable: C.value,
|
|
77
|
+
data: t.data,
|
|
78
|
+
"submit-fn": t.config.submitFn,
|
|
79
|
+
onSubmitSuccess: F
|
|
80
|
+
}, {
|
|
81
|
+
default: m(({ stringifyDraftData: o }) => [
|
|
82
|
+
t.config.render === void 0 ? (a(), d("span", j, u(c(o).value), 1)) : (a(), f(g(t.config.render), b(V({ key: 1 }, c(o))), null, 16))
|
|
83
|
+
]),
|
|
84
|
+
editor: m(({ stringifyDraftData: o }) => [
|
|
85
|
+
(a(), f(g(t.config.editorRender), b(R(c(o))), null, 16))
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["editing", "config", "editable", "data", "submit-fn"])
|
|
89
|
+
])
|
|
90
|
+
], 2));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
2
93
|
export {
|
|
3
|
-
|
|
94
|
+
D as default
|
|
4
95
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as w, useCssVars as B, computed as
|
|
1
|
+
import { defineComponent as w, useCssVars as B, computed as s, provide as L, ref as M, watch as x, openBlock as l, createBlock as u, unref as d, withCtx as c, createElementBlock as F, Fragment as P, renderList as j, withDirectives as O, mergeProps as T, resolveDynamicComponent as U, normalizeClass as A, createVNode as D, vShow as G } from "vue";
|
|
2
2
|
import H from "./PanelItem.vue.mjs";
|
|
3
3
|
import { ElCard as f, ElRow as N, ElCol as V } from "element-plus";
|
|
4
4
|
import { NEST_LAYOUT_SCALE_KEY as W } from "../../inject/key.mjs";
|
|
5
5
|
import { resolveFormLayout as p } from "../form/utils.mjs";
|
|
6
|
-
const
|
|
6
|
+
const $ = /* @__PURE__ */ w({
|
|
7
7
|
name: "PanelMain",
|
|
8
8
|
__name: "PanelMain",
|
|
9
9
|
props: {
|
|
@@ -16,15 +16,15 @@ const q = /* @__PURE__ */ w({
|
|
|
16
16
|
refreshFn: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["submitSuccess"],
|
|
19
|
-
setup(
|
|
19
|
+
setup(o, { emit: y }) {
|
|
20
20
|
B((a) => ({
|
|
21
21
|
v6dd4af74: h.value
|
|
22
22
|
}));
|
|
23
|
-
const r =
|
|
23
|
+
const r = o, v = y, C = s(() => r.layoutScale ?? 1);
|
|
24
24
|
L(W, C);
|
|
25
|
-
const n = M({}), m =
|
|
25
|
+
const n = M({}), m = s(() => r.itemCard ? f : "div"), S = s(
|
|
26
26
|
() => `panel-main-item-col-wrap_${m.value === f ? "card" : "plain"}`
|
|
27
|
-
), h =
|
|
27
|
+
), h = s(
|
|
28
28
|
() => typeof r.itemCard == "object" && r.itemCard.lastMarginBottom ? r.itemCard.lastMarginBottom : 0
|
|
29
29
|
), k = (a) => {
|
|
30
30
|
const { hide: t } = a;
|
|
@@ -37,13 +37,13 @@ const q = /* @__PURE__ */ w({
|
|
|
37
37
|
return !!t(e);
|
|
38
38
|
}
|
|
39
39
|
return !!t;
|
|
40
|
-
},
|
|
40
|
+
}, E = (a) => {
|
|
41
41
|
const t = r.layoutScale ?? 1;
|
|
42
42
|
return {
|
|
43
43
|
...p(r.layout, t),
|
|
44
44
|
...p(a, t)
|
|
45
45
|
};
|
|
46
|
-
},
|
|
46
|
+
}, _ = (a, t) => {
|
|
47
47
|
n.value = {}, t && (n.value[a] = t);
|
|
48
48
|
}, b = (a) => (t) => {
|
|
49
49
|
var e;
|
|
@@ -62,23 +62,23 @@ const q = /* @__PURE__ */ w({
|
|
|
62
62
|
{ immediate: !0 }
|
|
63
63
|
), (a, t) => (l(), u(d(N), {
|
|
64
64
|
class: "dc-panel-main",
|
|
65
|
-
gutter:
|
|
65
|
+
gutter: o.rowGutter
|
|
66
66
|
}, {
|
|
67
67
|
default: c(() => [
|
|
68
|
-
(l(!0), F(
|
|
68
|
+
(l(!0), F(P, null, j(o.list, (e) => O((l(), u(d(V), T({
|
|
69
69
|
key: e.key
|
|
70
|
-
}, { ref_for: !0 },
|
|
70
|
+
}, { ref_for: !0 }, E(e.layout), { class: "panel-main-item-col" }), {
|
|
71
71
|
default: c(() => [
|
|
72
72
|
(l(), u(U(m.value), {
|
|
73
73
|
class: A(S.value)
|
|
74
74
|
}, {
|
|
75
75
|
default: c(() => [
|
|
76
76
|
D(H, {
|
|
77
|
-
data:
|
|
77
|
+
data: o.data,
|
|
78
78
|
config: e,
|
|
79
79
|
editing: n.value[e.key] ?? !1,
|
|
80
80
|
"refresh-fn": b(e.key),
|
|
81
|
-
"onUpdate:editing": (i) =>
|
|
81
|
+
"onUpdate:editing": (i) => _(e.key, i),
|
|
82
82
|
onSubmitSuccess: (i) => g(e.key, i)
|
|
83
83
|
}, null, 8, ["data", "config", "editing", "refresh-fn", "onUpdate:editing", "onSubmitSuccess"])
|
|
84
84
|
]),
|
|
@@ -95,5 +95,5 @@ const q = /* @__PURE__ */ w({
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
$ as default
|
|
99
99
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableMain.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-eae8d23b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|