@done-coding/admin-core 0.8.3-alpha.0 → 0.9.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/docs/nested-config-paradigm.md +80 -0
- 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 +65 -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/FormItemNestForm.vue.mjs +7 -0
- package/es/components/form/FormItemNestForm.vue2.mjs +49 -0
- package/es/components/form/FormItemNestFormList.vue.mjs +7 -0
- package/es/components/form/FormItemNestFormList.vue2.mjs +137 -0
- package/es/components/form/FormMain.vue.mjs +5 -147
- package/es/components/form/FormMain.vue2.mjs +160 -2
- package/es/components/form/FormRadioGroup.vue.mjs +42 -49
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +122 -128
- package/es/components/form/FormSelect.vue.mjs +34 -40
- package/es/components/form/FormSubmitBtn.vue.mjs +23 -28
- package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue2.mjs +29 -28
- 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/nest-form-item-list.mjs +71 -0
- package/es/components/form/nest-form-item.mjs +42 -0
- package/es/components/form/nest-registry.mjs +7 -0
- package/es/components/form/use-nest-form-list.mjs +22 -0
- package/es/components/form/use-nest-form.mjs +34 -0
- package/es/components/form/use-nest-layout-scale.mjs +14 -0
- package/es/components/form/utils.mjs +77 -61
- 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 -4
- package/es/components/modal/ConfirmModal.vue2.mjs +83 -111
- 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/PanelItemNestForm.vue.mjs +7 -0
- package/es/components/panel/PanelItemNestForm.vue2.mjs +69 -0
- package/es/components/panel/PanelItemNestPanel.vue.mjs +34 -0
- package/es/components/panel/PanelItemNestPanel.vue2.mjs +4 -0
- package/es/components/panel/PanelMain.vue.mjs +1 -1
- package/es/components/panel/PanelMain.vue2.mjs +72 -72
- package/es/components/panel/nest-panel-form.mjs +53 -0
- package/es/components/panel/nest-panel-item.mjs +25 -0
- 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 +190 -153
- package/es/inject/key.mjs +15 -6
- 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 +108 -8
- package/types/bridge/plugin.d.ts +39 -0
- package/types/bridge/theme.d.ts +85 -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/FormItemNestForm.vue.d.ts +36 -0
- package/types/components/form/FormItemNestFormList.vue.d.ts +63 -0
- package/types/components/form/FormMain.vue.d.ts +2 -2
- package/types/components/form/FormSearch.vue.d.ts +2 -2
- package/types/components/form/FormTree.vue.d.ts +50 -50
- package/types/components/form/index.d.ts +9 -1
- package/types/components/form/nest-form-item-list.d.ts +63 -0
- package/types/components/form/nest-form-item.d.ts +36 -0
- package/types/components/form/nest-registry.d.ts +22 -0
- package/types/components/form/types.d.ts +2 -0
- package/types/components/form/use-nest-form-list.d.ts +20 -0
- package/types/components/form/use-nest-form.d.ts +26 -0
- package/types/components/form/use-nest-layout-scale.d.ts +17 -0
- package/types/components/form/utils.d.ts +26 -1
- package/types/components/menu/MenuTree.vue.d.ts +10 -10
- package/types/components/modal/ModalShelf.vue.d.ts +1 -1
- package/types/components/panel/PanelItemNestForm.vue.d.ts +35 -0
- package/types/components/panel/PanelItemNestPanel.vue.d.ts +22 -0
- package/types/components/panel/index.d.ts +5 -1
- package/types/components/panel/nest-panel-form.d.ts +38 -0
- package/types/components/panel/nest-panel-item.d.ts +28 -0
- package/types/components/panel/types.d.ts +2 -0
- package/types/components/table/TableMain.vue.d.ts +3 -3
- 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 +46 -1
- package/types/store/app.d.ts +138 -59
- package/types/utils/index.d.ts +1 -0
- package/types/utils/theme-scale.d.ts +35 -0
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "element-plus
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
|
|
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 w, useCssVars as B, computed as s, provide as M, ref as L, watch as x, openBlock as l, createBlock as u, unref as d, withCtx as c, createElementBlock as F, Fragment as j, renderList as O, withDirectives as P, mergeProps as T, resolveDynamicComponent as U, normalizeClass as A, createVNode as D, vShow as G } from "vue";
|
|
2
|
+
import H from "./PanelItem.vue.mjs";
|
|
3
|
+
import { ElCard as f, ElRow as N, ElCol as V } from "element-plus";
|
|
4
|
+
import { NEST_LAYOUT_SCALE_KEY as W } from "../../inject/key.mjs";
|
|
5
|
+
import { resolveFormLayout as p } from "../form/utils.mjs";
|
|
6
|
+
const q = /* @__PURE__ */ w({
|
|
10
7
|
name: "PanelMain",
|
|
11
8
|
__name: "PanelMain",
|
|
12
9
|
props: {
|
|
13
10
|
data: {},
|
|
14
11
|
rowGutter: { default: 8 },
|
|
15
12
|
layout: { default: () => ({ span: 24 }) },
|
|
13
|
+
layoutScale: { default: 1 },
|
|
16
14
|
list: {},
|
|
17
15
|
itemCard: { type: [Boolean, Object], default: () => ({ lastMarginBottom: "8px" }) },
|
|
18
16
|
refreshFn: {}
|
|
19
17
|
},
|
|
20
18
|
emits: ["submitSuccess"],
|
|
21
|
-
setup(
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
setup(o, { emit: y }) {
|
|
20
|
+
B((a) => ({
|
|
21
|
+
v5b714e11: h.value
|
|
24
22
|
}));
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
),
|
|
28
|
-
() =>
|
|
29
|
-
),
|
|
30
|
-
|
|
23
|
+
const r = o, v = y, C = s(() => r.layoutScale ?? 1);
|
|
24
|
+
M(W, C);
|
|
25
|
+
const n = L({}), m = s(() => r.itemCard ? f : "span"), S = s(
|
|
26
|
+
() => `panel-main-item-col-wrap_${m.value === f ? "card" : "span"}`
|
|
27
|
+
), h = s(
|
|
28
|
+
() => typeof r.itemCard == "object" && r.itemCard.lastMarginBottom ? r.itemCard.lastMarginBottom : 0
|
|
29
|
+
), k = (a) => {
|
|
30
|
+
const { hide: t } = a;
|
|
31
31
|
if (typeof t == "function") {
|
|
32
|
-
const
|
|
33
|
-
data:
|
|
34
|
-
value:
|
|
35
|
-
config:
|
|
32
|
+
const e = {
|
|
33
|
+
data: r.data,
|
|
34
|
+
value: r.data[a.key],
|
|
35
|
+
config: a
|
|
36
36
|
};
|
|
37
|
-
return !!t(
|
|
37
|
+
return !!t(e);
|
|
38
38
|
}
|
|
39
39
|
return !!t;
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
40
|
+
}, _ = (a) => {
|
|
41
|
+
const t = r.layoutScale ?? 1;
|
|
42
|
+
return {
|
|
43
|
+
...p(r.layout, t),
|
|
44
|
+
...p(a, t)
|
|
45
|
+
};
|
|
46
|
+
}, b = (a, t) => {
|
|
47
|
+
n.value = {}, t && (n.value[a] = t);
|
|
48
|
+
}, g = (a) => (t) => {
|
|
49
|
+
var e;
|
|
50
|
+
return (e = r.refreshFn) == null ? void 0 : e.call(r, t, a);
|
|
51
|
+
}, E = (a, t) => {
|
|
52
|
+
v("submitSuccess", t, a);
|
|
50
53
|
};
|
|
51
|
-
return
|
|
52
|
-
() =>
|
|
53
|
-
(
|
|
54
|
-
const t =
|
|
55
|
-
Object.keys(n.value).forEach((
|
|
56
|
-
t.includes(
|
|
54
|
+
return x(
|
|
55
|
+
() => r.list,
|
|
56
|
+
(a) => {
|
|
57
|
+
const t = a.map((e) => e.key);
|
|
58
|
+
Object.keys(n.value).forEach((e) => {
|
|
59
|
+
t.includes(e) || delete n.value[e];
|
|
57
60
|
});
|
|
58
61
|
},
|
|
59
62
|
{ 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
|
-
};
|
|
63
|
+
), (a, t) => (l(), u(d(N), { gutter: o.rowGutter }, {
|
|
64
|
+
default: c(() => [
|
|
65
|
+
(l(!0), F(j, null, O(o.list, (e) => P((l(), u(d(V), T({
|
|
66
|
+
key: e.key
|
|
67
|
+
}, { ref_for: !0 }, _(e.layout), { class: "panel-main-item-col" }), {
|
|
68
|
+
default: c(() => [
|
|
69
|
+
(l(), u(U(m.value), {
|
|
70
|
+
class: A(S.value)
|
|
71
|
+
}, {
|
|
72
|
+
default: c(() => [
|
|
73
|
+
D(H, {
|
|
74
|
+
data: o.data,
|
|
75
|
+
config: e,
|
|
76
|
+
editing: n.value[e.key] ?? !1,
|
|
77
|
+
"refresh-fn": g(e.key),
|
|
78
|
+
"onUpdate:editing": (i) => b(e.key, i),
|
|
79
|
+
onSubmitSuccess: (i) => E(e.key, i)
|
|
80
|
+
}, null, 8, ["data", "config", "editing", "refresh-fn", "onUpdate:editing", "onSubmitSuccess"])
|
|
81
|
+
]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, 1032, ["class"]))
|
|
84
|
+
]),
|
|
85
|
+
_: 2
|
|
86
|
+
}, 1040)), [
|
|
87
|
+
[G, !k(e)]
|
|
88
|
+
])), 128))
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, ["gutter"]));
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
export {
|
|
95
|
-
|
|
95
|
+
q as default
|
|
96
96
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { h as w } from "vue";
|
|
2
|
+
import E from "./PanelItemNestForm.vue.mjs";
|
|
3
|
+
import { resolveLayoutSpan as P } from "../form/utils.mjs";
|
|
4
|
+
function s(u) {
|
|
5
|
+
const {
|
|
6
|
+
key: m,
|
|
7
|
+
label: d,
|
|
8
|
+
list: o,
|
|
9
|
+
layout: n,
|
|
10
|
+
rowGutter: b,
|
|
11
|
+
submitText: f,
|
|
12
|
+
cancelText: y,
|
|
13
|
+
editable: v,
|
|
14
|
+
submitFn: F,
|
|
15
|
+
render: k,
|
|
16
|
+
rebase: x
|
|
17
|
+
} = u, g = P(n);
|
|
18
|
+
return {
|
|
19
|
+
key: m,
|
|
20
|
+
label: d,
|
|
21
|
+
layout: n,
|
|
22
|
+
render: k,
|
|
23
|
+
editable: v ?? !0,
|
|
24
|
+
submitFn: F,
|
|
25
|
+
editorRender: (t) => {
|
|
26
|
+
const r = t.data, e = t.config.key;
|
|
27
|
+
return (t.value === void 0 || t.value === null) && (r[e] = {}), [
|
|
28
|
+
w(E, {
|
|
29
|
+
data: r[e],
|
|
30
|
+
list: o,
|
|
31
|
+
rowGutter: b,
|
|
32
|
+
submitText: f,
|
|
33
|
+
cancelText: y,
|
|
34
|
+
// P3:父 item 代表 span + rebase 开关,供薄壳算子 FormMain 的 layoutScale
|
|
35
|
+
parentSpan: g,
|
|
36
|
+
rebase: x,
|
|
37
|
+
// wire:校验通过后由组件调 submit → submitFn(草稿) 回流父数据 → closeEdit 关编辑态
|
|
38
|
+
submit: async () => {
|
|
39
|
+
var a, i, l;
|
|
40
|
+
await ((i = (a = t.config).submitFn) == null ? void 0 : i.call(a, t.data)), (l = t.closeEdit) == null || l.call(t);
|
|
41
|
+
},
|
|
42
|
+
cancel: () => {
|
|
43
|
+
var a;
|
|
44
|
+
return (a = t.closeEdit) == null ? void 0 : a.call(t);
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
s as nestPanelForm
|
|
53
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { h as s } from "vue";
|
|
2
|
+
import u from "./PanelItemNestPanel.vue.mjs";
|
|
3
|
+
import { resolveLayoutSpan as f } from "../form/utils.mjs";
|
|
4
|
+
function b(e) {
|
|
5
|
+
const { key: r, label: o, list: a, layout: t, itemCard: n, rowGutter: m, rebase: i } = e, l = f(t);
|
|
6
|
+
return {
|
|
7
|
+
key: r,
|
|
8
|
+
label: o,
|
|
9
|
+
layout: t,
|
|
10
|
+
render: (p) => [
|
|
11
|
+
s(u, {
|
|
12
|
+
data: p.value ?? {},
|
|
13
|
+
list: a,
|
|
14
|
+
itemCard: n,
|
|
15
|
+
rowGutter: m,
|
|
16
|
+
// P3:父 item 代表 span + rebase 开关,供薄壳算子 PanelMain 的 layoutScale
|
|
17
|
+
parentSpan: l,
|
|
18
|
+
rebase: i
|
|
19
|
+
})
|
|
20
|
+
]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
b as nestPanelItem
|
|
25
|
+
};
|
|
@@ -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
|
};
|