@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,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "element-plus
|
|
5
|
-
import {
|
|
6
|
-
import N from "
|
|
7
|
-
|
|
8
|
-
import { ArrowRightBold as R } from "@element-plus/icons-vue";
|
|
9
|
-
import { APP_LAYOUT_APP_STORE_KEY as M } from "../../inject/key.mjs";
|
|
10
|
-
const O = { class: "app-sidebar-shim" }, J = /* @__PURE__ */ P({
|
|
1
|
+
import { defineComponent as w, useCssVars as A, inject as f, computed as e, ref as b, openBlock as g, createElementBlock as T, normalizeStyle as h, createVNode as l, unref as o, withCtx as u, renderSlot as C, createElementVNode as y, createBlock as H, createCommentVNode as L } from "vue";
|
|
2
|
+
import F from "../menu/MenuTree.vue.mjs";
|
|
3
|
+
import S from "../display/WatchSize.vue.mjs";
|
|
4
|
+
import { ElTooltip as I, ElIcon as V } from "element-plus";
|
|
5
|
+
import { ArrowRightBold as Y } from "@element-plus/icons-vue";
|
|
6
|
+
import { APP_LAYOUT_APP_STORE_KEY as N, APP_LAYOUT_BRIDGE_KEY as O } from "../../inject/key.mjs";
|
|
7
|
+
const R = { class: "app-sidebar-shim" }, G = /* @__PURE__ */ w({
|
|
11
8
|
__name: "AppSidebar",
|
|
12
9
|
props: {
|
|
13
10
|
show: { type: Boolean },
|
|
@@ -16,82 +13,82 @@ const O = { class: "app-sidebar-shim" }, J = /* @__PURE__ */ P({
|
|
|
16
13
|
menuFlatList: {}
|
|
17
14
|
},
|
|
18
15
|
setup(s) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
A((c) => ({
|
|
17
|
+
f2149ac0: d.value.left,
|
|
18
|
+
v6fb5779c: d.value.top,
|
|
19
|
+
e0532af8: d.value.bottom,
|
|
20
|
+
v36eef49e: E.value,
|
|
21
|
+
v7a209d86: _.value,
|
|
22
|
+
v0a70f74c: B.value,
|
|
23
|
+
v1ffafb76: a.value.bodyColor,
|
|
24
|
+
v738d1dcc: a.value.primaryColor
|
|
25
25
|
}));
|
|
26
|
-
const
|
|
27
|
-
() => `${Math.max(
|
|
28
|
-
),
|
|
26
|
+
const x = s, r = f(N), p = e(() => r.sidebarStyle), d = e(() => r.viewportPadding), m = b(0), v = b(0), P = e(() => parseFloat(p.value.paddingTop) || 0), _ = e(
|
|
27
|
+
() => `${Math.max(P.value, m.value)}px`
|
|
28
|
+
), B = e(() => `${v.value}px`), E = e(() => x.aboveHeader ? 2 : 0), n = e(() => r.sidebarIsCollapse), $ = e(() => ({
|
|
29
29
|
transform: `rotate(${n.value ? 0 : 180}deg)`
|
|
30
|
-
})),
|
|
31
|
-
return (c, t) => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
default: p(() => [
|
|
42
|
-
v(c.$slots, "top", {}, void 0, !0)
|
|
43
|
-
]),
|
|
44
|
-
_: 3
|
|
45
|
-
}),
|
|
46
|
-
h("div", O, [
|
|
47
|
-
a(o(N), {
|
|
48
|
-
collapse: o(n),
|
|
49
|
-
menus: s.menus,
|
|
50
|
-
style: { height: "100%" },
|
|
51
|
-
"background-color": o(l).bodyColor,
|
|
52
|
-
"text-color": o(l).baseColor,
|
|
53
|
-
"active-text-color": o(l).primaryColor,
|
|
54
|
-
menuFlatList: s.menuFlatList,
|
|
55
|
-
routerMode: ""
|
|
56
|
-
}, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
|
|
30
|
+
})), k = f(O), a = e(() => k.themeColors.value);
|
|
31
|
+
return (c, t) => (g(), T("div", {
|
|
32
|
+
class: "app-sidebar",
|
|
33
|
+
style: h(p.value)
|
|
34
|
+
}, [
|
|
35
|
+
l(o(S), {
|
|
36
|
+
class: "app-sidebar-top",
|
|
37
|
+
onHeightChange: t[0] || (t[0] = (i) => m.value = i)
|
|
38
|
+
}, {
|
|
39
|
+
default: u(() => [
|
|
40
|
+
C(c.$slots, "top", {}, void 0, !0)
|
|
57
41
|
]),
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
42
|
+
_: 3
|
|
43
|
+
}),
|
|
44
|
+
y("div", R, [
|
|
45
|
+
l(o(F), {
|
|
46
|
+
collapse: n.value,
|
|
47
|
+
menus: s.menus,
|
|
48
|
+
style: { height: "100%" },
|
|
49
|
+
"background-color": a.value.bodyColor,
|
|
50
|
+
"text-color": a.value.baseColor,
|
|
51
|
+
"active-text-color": a.value.primaryColor,
|
|
52
|
+
menuFlatList: s.menuFlatList,
|
|
53
|
+
routerMode: ""
|
|
54
|
+
}, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
|
|
55
|
+
]),
|
|
56
|
+
l(o(S), {
|
|
57
|
+
class: "app-sidebar-bottom",
|
|
58
|
+
onHeightChange: t[1] || (t[1] = (i) => v.value = i)
|
|
59
|
+
}, {
|
|
60
|
+
default: u(() => [
|
|
61
|
+
C(c.$slots, "bottom", {}, void 0, !0)
|
|
62
|
+
]),
|
|
63
|
+
_: 3
|
|
64
|
+
}),
|
|
65
|
+
s.show ? (g(), H(o(I), {
|
|
66
|
+
key: 0,
|
|
67
|
+
content: n.value ? "展开" : "收起",
|
|
68
|
+
placement: "right",
|
|
69
|
+
"show-after": 200
|
|
70
|
+
}, {
|
|
71
|
+
default: u(() => [
|
|
72
|
+
y("div", {
|
|
73
|
+
class: "app-sidebar-toggle",
|
|
74
|
+
onClick: t[2] || (t[2] = (i) => o(r).changeSidebarCollapseStatus(!n.value))
|
|
75
|
+
}, [
|
|
76
|
+
l(o(V), null, {
|
|
77
|
+
default: u(() => [
|
|
78
|
+
l(o(Y), {
|
|
79
|
+
class: "app-sidebar-toggle-icon",
|
|
80
|
+
style: h($.value)
|
|
81
|
+
}, null, 8, ["style"])
|
|
82
|
+
]),
|
|
83
|
+
_: 1
|
|
84
|
+
})
|
|
85
|
+
])
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["content"])) : L("", !0)
|
|
89
|
+
], 4));
|
|
93
90
|
}
|
|
94
91
|
});
|
|
95
92
|
export {
|
|
96
|
-
|
|
93
|
+
G as default
|
|
97
94
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as u, inject as p, computed as n, openBlock as a, createElementBlock as m, createBlock as r, unref as e, withCtx as v, Fragment as d, renderList as h, createCommentVNode as _, createVNode as f } from "vue";
|
|
2
|
+
import { ElSelect as k, ElOption as y, ElSwitch as E } from "element-plus";
|
|
3
|
+
import { Sunny as S, Moon as B } from "@element-plus/icons-vue";
|
|
4
|
+
import { APP_LAYOUT_BRIDGE_KEY as b } from "../../inject/key.mjs";
|
|
5
|
+
const g = { class: "app-theme" }, O = /* @__PURE__ */ u({
|
|
6
|
+
__name: "AppTheme",
|
|
7
|
+
setup(C) {
|
|
8
|
+
const l = p(b), c = n(() => l.themeIsDark.value), s = n(() => l.themeStyle.value), i = n(() => l.theme.list.value);
|
|
9
|
+
return (D, o) => (a(), m("div", g, [
|
|
10
|
+
i.value.length > 1 ? (a(), r(e(k), {
|
|
11
|
+
key: 0,
|
|
12
|
+
"model-value": s.value,
|
|
13
|
+
class: "app-theme__style-select",
|
|
14
|
+
size: "small",
|
|
15
|
+
onChange: o[0] || (o[0] = (t) => e(l).theme.setStyle(t))
|
|
16
|
+
}, {
|
|
17
|
+
default: v(() => [
|
|
18
|
+
(a(!0), m(d, null, h(i.value, (t) => (a(), r(e(y), {
|
|
19
|
+
key: t,
|
|
20
|
+
label: e(l).theme.labelOf(t),
|
|
21
|
+
value: t
|
|
22
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
23
|
+
]),
|
|
24
|
+
_: 1
|
|
25
|
+
}, 8, ["model-value"])) : _("", !0),
|
|
26
|
+
f(e(E), {
|
|
27
|
+
"model-value": c.value,
|
|
28
|
+
class: "app-theme__dark-switch",
|
|
29
|
+
"active-action-icon": e(B),
|
|
30
|
+
"inactive-action-icon": e(S),
|
|
31
|
+
"onUpdate:modelValue": o[1] || (o[1] = (t) => e(l).theme.setDark(!!t))
|
|
32
|
+
}, null, 8, ["model-value", "active-action-icon", "inactive-action-icon"])
|
|
33
|
+
]));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
O as default
|
|
38
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./DataListView.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const i = /* @__PURE__ */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-708af83f"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, computed as m, ref as R, watch as A, openBlock as i, createElementBlock as p, normalizeStyle as F, Fragment as H, renderList as z, createBlock as E, withCtx as K, renderSlot as h, createVNode as q, unref as I, markRaw as M, h as c } from "vue";
|
|
2
2
|
import { ElEmpty as N } from "element-plus";
|
|
3
3
|
import O from "./DataListViewItem.vue.mjs";
|
|
4
4
|
import { createDataListViewInstance as P } from "./utils.mjs";
|
|
5
5
|
const j = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "data-list-view-empty"
|
|
8
|
-
}, T = /* @__PURE__ */
|
|
8
|
+
}, T = /* @__PURE__ */ S({
|
|
9
9
|
__name: "DataListView",
|
|
10
10
|
props: {
|
|
11
11
|
data: {},
|
|
@@ -16,26 +16,26 @@ const j = {
|
|
|
16
16
|
getRenderCtxParams: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["selectionChange"],
|
|
19
|
-
setup(r, { expose:
|
|
20
|
-
const o = r,
|
|
19
|
+
setup(r, { expose: k, emit: C }) {
|
|
20
|
+
const o = r, b = C, s = (t) => {
|
|
21
21
|
const e = o.rowKey;
|
|
22
22
|
return typeof e == "function" ? e(t) : String(t[e]);
|
|
23
|
-
},
|
|
23
|
+
}, V = m(
|
|
24
24
|
() => o.maxHeight ? { maxHeight: `${o.maxHeight}px`, overflowY: "auto" } : void 0
|
|
25
|
-
), l =
|
|
26
|
-
|
|
27
|
-
},
|
|
25
|
+
), l = R(/* @__PURE__ */ new Set()), D = m(() => l.value.size === o.data.length), f = (t) => o.selectable && l.value.has(s(t)), d = () => {
|
|
26
|
+
b("selectionChange", g());
|
|
27
|
+
}, g = () => o.selectable ? o.data.filter((t) => l.value.has(s(t))) : [], y = () => {
|
|
28
28
|
l.value = /* @__PURE__ */ new Set(), d();
|
|
29
|
-
},
|
|
29
|
+
}, L = () => {
|
|
30
30
|
if (!o.selectable) return;
|
|
31
|
-
const t = !
|
|
31
|
+
const t = !D.value;
|
|
32
32
|
l.value = t ? new Set(o.data.map((e) => s(e))) : /* @__PURE__ */ new Set(), d();
|
|
33
|
-
},
|
|
33
|
+
}, v = (t) => {
|
|
34
34
|
if (!o.selectable) return;
|
|
35
35
|
const e = s(t), n = new Set(l.value);
|
|
36
36
|
n.has(e) ? n.delete(e) : n.add(e), l.value = n, d();
|
|
37
|
-
},
|
|
38
|
-
|
|
37
|
+
}, _ = (t) => M(
|
|
38
|
+
S({
|
|
39
39
|
name: "DataViewField",
|
|
40
40
|
props: {
|
|
41
41
|
row: { type: Object, required: !0 },
|
|
@@ -45,7 +45,7 @@ const j = {
|
|
|
45
45
|
},
|
|
46
46
|
setup(e) {
|
|
47
47
|
return () => {
|
|
48
|
-
const { type: n, render: a, prop:
|
|
48
|
+
const { type: n, render: a, prop: w } = t;
|
|
49
49
|
if (n === "index")
|
|
50
50
|
return c("span", String(e.index + 1));
|
|
51
51
|
if (n === "selection")
|
|
@@ -53,8 +53,8 @@ const j = {
|
|
|
53
53
|
type: "checkbox",
|
|
54
54
|
checked: e.selected,
|
|
55
55
|
onChange: () => {
|
|
56
|
-
var
|
|
57
|
-
return (
|
|
56
|
+
var x;
|
|
57
|
+
return (x = e.toggleSelect) == null ? void 0 : x.call(e);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
if (typeof a == "function")
|
|
@@ -66,12 +66,12 @@ const j = {
|
|
|
66
66
|
});
|
|
67
67
|
if (a)
|
|
68
68
|
return c(a);
|
|
69
|
-
const u =
|
|
69
|
+
const u = w ? e.row[w] : void 0;
|
|
70
70
|
return c("span", u == null ? "" : String(u));
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
})
|
|
74
|
-
),
|
|
74
|
+
), $ = m(() => {
|
|
75
75
|
const t = {};
|
|
76
76
|
for (const e of o.columns) {
|
|
77
77
|
if (e.type === "expand") continue;
|
|
@@ -83,42 +83,42 @@ const j = {
|
|
|
83
83
|
);
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
|
-
t[n] && console.warn(`[DataListView] 列 key 重复 "${n}",后者覆盖前者`), t[n] =
|
|
86
|
+
t[n] && console.warn(`[DataListView] 列 key 重复 "${n}",后者覆盖前者`), t[n] = _(e);
|
|
87
87
|
}
|
|
88
88
|
return t;
|
|
89
|
-
}),
|
|
90
|
-
clearSelection:
|
|
91
|
-
getSelectionRows:
|
|
92
|
-
toggleRowSelection:
|
|
93
|
-
toggleAllSelection:
|
|
89
|
+
}), B = P({
|
|
90
|
+
clearSelection: y,
|
|
91
|
+
getSelectionRows: g,
|
|
92
|
+
toggleRowSelection: v,
|
|
93
|
+
toggleAllSelection: L,
|
|
94
94
|
columns: o.columns
|
|
95
95
|
});
|
|
96
|
-
return
|
|
96
|
+
return k(B), A(
|
|
97
97
|
() => o.data,
|
|
98
98
|
() => {
|
|
99
|
-
l.value.size &&
|
|
99
|
+
l.value.size && y();
|
|
100
100
|
}
|
|
101
101
|
), (t, e) => (i(), p("div", {
|
|
102
102
|
class: "data-list-view",
|
|
103
|
-
style:
|
|
103
|
+
style: F(V.value)
|
|
104
104
|
}, [
|
|
105
|
-
r.data.length ? (i(!0), p(
|
|
105
|
+
r.data.length ? (i(!0), p(H, { key: 0 }, z(r.data, (n, a) => (i(), E(O, {
|
|
106
106
|
key: s(n),
|
|
107
|
-
selected:
|
|
107
|
+
selected: f(n)
|
|
108
108
|
}, {
|
|
109
|
-
default:
|
|
110
|
-
|
|
111
|
-
fieldComponentMap:
|
|
109
|
+
default: K(() => [
|
|
110
|
+
h(t.$slots, "item", {
|
|
111
|
+
fieldComponentMap: $.value,
|
|
112
112
|
row: n,
|
|
113
113
|
index: a,
|
|
114
|
-
selected:
|
|
115
|
-
toggleSelect: () =>
|
|
114
|
+
selected: f(n),
|
|
115
|
+
toggleSelect: () => v(n)
|
|
116
116
|
}, void 0, !0)
|
|
117
117
|
]),
|
|
118
118
|
_: 2
|
|
119
119
|
}, 1032, ["selected"]))), 128)) : (i(), p("div", j, [
|
|
120
|
-
|
|
121
|
-
I(
|
|
120
|
+
h(t.$slots, "empty", {}, () => [
|
|
121
|
+
q(I(N))
|
|
122
122
|
], !0)
|
|
123
123
|
]))
|
|
124
124
|
], 4));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElPopover as S, ElButton as
|
|
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
3
|
import A from "../modal/ConfirmModal.vue.mjs";
|
|
4
4
|
const U = { class: "action-confirm" }, j = {
|
|
5
5
|
key: 0,
|
|
@@ -7,7 +7,7 @@ const U = { class: "action-confirm" }, j = {
|
|
|
7
7
|
}, q = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "action-confirm__content"
|
|
10
|
-
}, G = { class: "action-confirm__actions" }, K = /* @__PURE__ */
|
|
10
|
+
}, G = { class: "action-confirm__actions" }, K = /* @__PURE__ */ _({
|
|
11
11
|
__name: "ActionConfirm",
|
|
12
12
|
props: /* @__PURE__ */ D({
|
|
13
13
|
mode: {},
|
|
@@ -29,7 +29,7 @@ const U = { class: "action-confirm" }, j = {
|
|
|
29
29
|
}, y = (e) => {
|
|
30
30
|
if (!(e == null || e === ""))
|
|
31
31
|
return typeof e == "string" ? () => r("span", e) : () => e;
|
|
32
|
-
}, p = s(() => y(l(n.title))), h = s(() => y(l(n.content))),
|
|
32
|
+
}, p = s(() => y(l(n.title))), h = s(() => y(l(n.content))), B = async () => {
|
|
33
33
|
a.value = !0;
|
|
34
34
|
try {
|
|
35
35
|
await Promise.resolve(n.submitFn()), i.value = !1;
|
|
@@ -39,7 +39,7 @@ const U = { class: "action-confirm" }, j = {
|
|
|
39
39
|
}
|
|
40
40
|
}, g = () => {
|
|
41
41
|
i.value = !1;
|
|
42
|
-
},
|
|
42
|
+
}, M = s(() => {
|
|
43
43
|
const e = l(n.title);
|
|
44
44
|
if (!(e === void 0 || e === ""))
|
|
45
45
|
return typeof e == "string" ? e : () => r("span", e);
|
|
@@ -64,32 +64,32 @@ const U = { class: "action-confirm" }, j = {
|
|
|
64
64
|
v(e.$slots, "default", {}, void 0, !0)
|
|
65
65
|
]),
|
|
66
66
|
default: c(() => [
|
|
67
|
-
|
|
67
|
+
C("div", U, [
|
|
68
68
|
p.value ? (o(), f("div", j, [
|
|
69
|
-
(o(), u(
|
|
69
|
+
(o(), u(x(p.value)))
|
|
70
70
|
])) : k("", !0),
|
|
71
71
|
h.value ? (o(), f("div", q, [
|
|
72
|
-
(o(), u(
|
|
72
|
+
(o(), u(x(h.value)))
|
|
73
73
|
])) : k("", !0),
|
|
74
|
-
|
|
75
|
-
m(d(
|
|
74
|
+
C("div", G, [
|
|
75
|
+
m(d(N), {
|
|
76
76
|
size: "small",
|
|
77
77
|
disabled: a.value,
|
|
78
78
|
onClick: g
|
|
79
79
|
}, {
|
|
80
80
|
default: c(() => [
|
|
81
|
-
T(
|
|
81
|
+
T(b(t.cancelText), 1)
|
|
82
82
|
]),
|
|
83
83
|
_: 1
|
|
84
84
|
}, 8, ["disabled"]),
|
|
85
|
-
m(d(
|
|
85
|
+
m(d(N), {
|
|
86
86
|
size: "small",
|
|
87
87
|
type: t.type,
|
|
88
88
|
loading: a.value,
|
|
89
|
-
onClick:
|
|
89
|
+
onClick: B
|
|
90
90
|
}, {
|
|
91
91
|
default: c(() => [
|
|
92
|
-
T(
|
|
92
|
+
T(b(t.confirmText), 1)
|
|
93
93
|
]),
|
|
94
94
|
_: 1
|
|
95
95
|
}, 8, ["type", "loading"])
|
|
@@ -101,8 +101,8 @@ const U = { class: "action-confirm" }, j = {
|
|
|
101
101
|
v(e.$slots, "default", {}, void 0, !0),
|
|
102
102
|
m(A, {
|
|
103
103
|
show: i.value,
|
|
104
|
-
"onUpdate:show": w[0] || (w[0] = (
|
|
105
|
-
title:
|
|
104
|
+
"onUpdate:show": w[0] || (w[0] = (V) => i.value = V),
|
|
105
|
+
title: M.value,
|
|
106
106
|
content: E.value,
|
|
107
107
|
"confirm-text": t.confirmText,
|
|
108
108
|
"cancel-text": t.cancelText,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as p, ref as u, computed as a, watch as d, openBlock as i, createElementBlock as g, Fragment as f, createBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as p, ref as u, computed as a, watch as d, openBlock as i, createElementBlock as g, Fragment as f, createBlock as v, withCtx as H, renderSlot as n, createCommentVNode as w, normalizeProps as C, guardReactiveProps as _ } from "vue";
|
|
2
|
+
import k from "./WatchSize.vue.mjs";
|
|
3
|
+
const V = /* @__PURE__ */ p({
|
|
4
4
|
__name: "HeightProvider",
|
|
5
5
|
props: {
|
|
6
6
|
viewportHeight: {},
|
|
7
7
|
minHeight: { default: 0 }
|
|
8
8
|
},
|
|
9
9
|
emits: ["childViewportHeightChange"],
|
|
10
|
-
setup(
|
|
11
|
-
const t =
|
|
10
|
+
setup(l, { emit: s }) {
|
|
11
|
+
const t = l, h = s, o = u(0), r = a(
|
|
12
12
|
() => Math.max(t.viewportHeight - o.value, t.minHeight)
|
|
13
13
|
), m = (e) => {
|
|
14
14
|
o.value = e;
|
|
@@ -19,20 +19,20 @@ const S = /* @__PURE__ */ p({
|
|
|
19
19
|
);
|
|
20
20
|
return d(r, (e) => h("childViewportHeightChange", e), {
|
|
21
21
|
immediate: !0
|
|
22
|
-
}), (e,
|
|
23
|
-
e.$slots.header ? (i(),
|
|
22
|
+
}), (e, P) => (i(), g(f, null, [
|
|
23
|
+
e.$slots.header ? (i(), v(k, {
|
|
24
24
|
key: 0,
|
|
25
25
|
onHeightChange: m
|
|
26
26
|
}, {
|
|
27
|
-
default:
|
|
27
|
+
default: H(() => [
|
|
28
28
|
n(e.$slots, "header")
|
|
29
29
|
]),
|
|
30
30
|
_: 3
|
|
31
31
|
})) : w("", !0),
|
|
32
|
-
n(e.$slots, "default", C(_(
|
|
32
|
+
n(e.$slots, "default", C(_(c.value)))
|
|
33
33
|
], 64));
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
V as default
|
|
38
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./TabsHeader.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const e = /* @__PURE__ */ o(a, [["__scopeId", "data-v-3faa57f5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const X = ["onClick"], q = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as L, toRefs as $, useModel as z, ref as K, computed as n, onMounted as T, onBeforeUnmount as g, watch as B, openBlock as s, createElementBlock as l, normalizeClass as y, Fragment as R, renderList as S, unref as D, renderSlot as H, createTextVNode as I, toDisplayString as N, normalizeStyle as V, createCommentVNode as F, mergeModels as U, nextTick as W } from "vue";
|
|
2
|
+
const X = ["onClick"], q = /* @__PURE__ */ L({
|
|
3
3
|
__name: "TabsHeader",
|
|
4
4
|
props: /* @__PURE__ */ U({
|
|
5
5
|
tabs: {},
|
|
@@ -10,63 +10,63 @@ const X = ["onClick"], q = /* @__PURE__ */ $({
|
|
|
10
10
|
activeKeyModifiers: {}
|
|
11
11
|
}),
|
|
12
12
|
emits: ["update:activeKey"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
() => Math.min(Math.max(Math.floor(
|
|
16
|
-
),
|
|
13
|
+
setup(u) {
|
|
14
|
+
const v = u, { tabs: b, level: k, variant: h } = $(v), o = z(u, "activeKey"), i = /* @__PURE__ */ new Map(), d = K(0), m = n(
|
|
15
|
+
() => Math.min(Math.max(Math.floor(k.value), 1), 4)
|
|
16
|
+
), M = n(() => `tabs-main-bar--l${m.value}`), w = {
|
|
17
17
|
1: "card",
|
|
18
18
|
2: "indicator",
|
|
19
19
|
3: "indicator-compact",
|
|
20
20
|
4: "plain"
|
|
21
|
-
},
|
|
22
|
-
() =>
|
|
21
|
+
}, r = n(
|
|
22
|
+
() => h.value ?? w[m.value]
|
|
23
|
+
), C = n(
|
|
24
|
+
() => `tabs-main-bar--variant-${r.value}`
|
|
23
25
|
), x = n(
|
|
24
|
-
() =>
|
|
25
|
-
), _ = n(
|
|
26
|
-
|
|
27
|
-
), E = n(() => {
|
|
28
|
-
const [, t] = [m.value, s.value], a = t ? l.get(t) : void 0;
|
|
26
|
+
() => r.value === "indicator" || r.value === "indicator-compact"
|
|
27
|
+
), _ = n(() => {
|
|
28
|
+
const [, t] = [d.value, o.value], a = t ? i.get(t) : void 0;
|
|
29
29
|
return a ? {
|
|
30
30
|
width: `${a.offsetWidth}px`,
|
|
31
31
|
transform: `translateX(${a.offsetLeft}px)`
|
|
32
32
|
} : { width: "0px" };
|
|
33
|
-
}),
|
|
34
|
-
a instanceof HTMLElement ?
|
|
35
|
-
},
|
|
33
|
+
}), E = (t, a) => {
|
|
34
|
+
a instanceof HTMLElement ? i.set(t, a) : i.delete(t);
|
|
35
|
+
}, c = () => {
|
|
36
36
|
W(() => {
|
|
37
|
-
|
|
37
|
+
d.value++;
|
|
38
38
|
});
|
|
39
|
-
},
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
}),
|
|
43
|
-
window.removeEventListener("resize",
|
|
44
|
-
}),
|
|
45
|
-
() =>
|
|
46
|
-
() =>
|
|
39
|
+
}, f = () => c();
|
|
40
|
+
return T(() => {
|
|
41
|
+
c(), window.addEventListener("resize", f);
|
|
42
|
+
}), g(() => {
|
|
43
|
+
window.removeEventListener("resize", f);
|
|
44
|
+
}), B(
|
|
45
|
+
() => v.tabs,
|
|
46
|
+
() => c(),
|
|
47
47
|
{ flush: "post" }
|
|
48
|
-
), (t, a) => (
|
|
49
|
-
class:
|
|
48
|
+
), (t, a) => (s(), l("div", {
|
|
49
|
+
class: y(["tabs-main-bar", [M.value, C.value]])
|
|
50
50
|
}, [
|
|
51
|
-
(
|
|
51
|
+
(s(!0), l(R, null, S(D(b), (e) => (s(), l("button", {
|
|
52
52
|
key: e.key,
|
|
53
53
|
ref_for: !0,
|
|
54
|
-
ref: (
|
|
54
|
+
ref: (p) => E(e.key, p),
|
|
55
55
|
type: "button",
|
|
56
|
-
class:
|
|
57
|
-
onClick: (
|
|
56
|
+
class: y(["tabs-main-bar-item", { "tabs-main-bar-item_active": e.key === o.value }]),
|
|
57
|
+
onClick: (p) => o.value = e.key
|
|
58
58
|
}, [
|
|
59
59
|
H(t.$slots, e.key, {
|
|
60
60
|
tab: e,
|
|
61
|
-
active: e.key ===
|
|
61
|
+
active: e.key === o.value
|
|
62
62
|
}, () => [
|
|
63
63
|
I(N(e.title), 1)
|
|
64
64
|
], !0)
|
|
65
65
|
], 10, X))), 128)),
|
|
66
|
-
|
|
66
|
+
x.value ? (s(), l("div", {
|
|
67
67
|
key: 0,
|
|
68
68
|
class: "tabs-main-bar-indicator",
|
|
69
|
-
style: V(
|
|
69
|
+
style: V(_.value)
|
|
70
70
|
}, null, 4)) : F("", !0)
|
|
71
71
|
], 2));
|
|
72
72
|
}
|