@duxweb/dvha-pro 0.0.6 → 0.0.8
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/dist/cjs/component.cjs +1 -1
- package/dist/cjs/components/card/card.cjs +1 -1
- package/dist/cjs/components/chart/echart.cjs +1 -0
- package/dist/cjs/components/dialog/dialog.cjs +1 -1
- package/dist/cjs/components/drawer/drawer.cjs +1 -1
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/list/card.cjs +1 -1
- package/dist/cjs/components/list/list.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/modal/modalPage.cjs +1 -1
- package/dist/cjs/components/modal/modalTab.cjs +1 -1
- package/dist/cjs/components/select/cardSelect.cjs +1 -0
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/config/echart.cjs +1 -0
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/hooks/action.cjs +1 -1
- package/dist/cjs/hooks/dialog.cjs +1 -1
- package/dist/cjs/hooks/drawer.cjs +1 -1
- package/dist/cjs/hooks/echart.cjs +1 -0
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/main.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/global.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/naiveTheme.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +28 -7
- package/dist/esm/component.js +43 -41
- package/dist/esm/components/card/card.js +1 -1
- package/dist/esm/components/chart/echart.js +75 -0
- package/dist/esm/components/dialog/dialog.js +87 -93
- package/dist/esm/components/drawer/drawer.js +34 -32
- package/dist/esm/components/form/modalForm.js +1 -1
- package/dist/esm/components/form/pageForm.js +23 -19
- package/dist/esm/components/form/settingForm.js +22 -18
- package/dist/esm/components/layout/list.js +203 -142
- package/dist/esm/components/layout/table.js +210 -145
- package/dist/esm/components/list/card.js +42 -32
- package/dist/esm/components/list/list.js +27 -16
- package/dist/esm/components/modal/modal.js +46 -86
- package/dist/esm/components/modal/modalPage.js +23 -18
- package/dist/esm/components/modal/modalTab.js +11 -11
- package/dist/esm/components/select/cardSelect.js +103 -0
- package/dist/esm/components/table/tablePage.js +21 -18
- package/dist/esm/config/echart.js +456 -0
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +46 -45
- package/dist/esm/hooks/dialog.js +24 -7
- package/dist/esm/hooks/drawer.js +12 -8
- package/dist/esm/hooks/echart.js +469 -0
- package/dist/esm/hooks/modal.js +25 -9
- package/dist/esm/hooks/table/media.js +18 -14
- package/dist/esm/index.js +158 -135
- package/dist/esm/main.js +11 -8
- package/dist/esm/pages/authLayout.js +3 -2
- package/dist/esm/pages/layout/global.js +46 -33
- package/dist/esm/pages/layout/page.js +13 -9
- package/dist/esm/pages/login.js +25 -21
- package/dist/esm/pages/menu/avatar.js +14 -14
- package/dist/esm/pages/menu/button.js +14 -10
- package/dist/esm/pages/menu/cmd.js +26 -22
- package/dist/esm/pages/menu/main.js +26 -22
- package/dist/esm/pages/menu/mobile.js +11 -7
- package/dist/esm/pages/page.js +16 -16
- package/dist/esm/pages/page404.js +24 -20
- package/dist/esm/pages/pageStatus.js +12 -8
- package/dist/esm/theme/naiveTheme.js +57 -51
- package/dist/esm/theme/uno.css.js +28 -7
- package/dist/types/components/chart/echart.d.ts +284 -0
- package/dist/types/components/chart/index.d.ts +1 -0
- package/dist/types/components/dialog/dialog.d.ts +1 -20
- package/dist/types/components/drawer/drawer.d.ts +14 -4
- package/dist/types/components/form/formLayout.d.ts +1 -1
- package/dist/types/components/form/modalForm.d.ts +1 -1
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/layout/list.d.ts +18 -0
- package/dist/types/components/layout/table.d.ts +22 -1
- package/dist/types/components/list/card.d.ts +38 -0
- package/dist/types/components/list/list.d.ts +43 -2
- package/dist/types/components/modal/modal.d.ts +13 -31
- package/dist/types/components/modal/modalPage.d.ts +3 -6
- package/dist/types/components/panel/alert.d.ts +1 -1
- package/dist/types/components/select/cardSelect.d.ts +88 -0
- package/dist/types/components/select/index.d.ts +1 -0
- package/dist/types/components/table/tablePage.d.ts +28 -2
- package/dist/types/config/echart.d.ts +4 -0
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/hooks/drawer.d.ts +3 -2
- package/dist/types/hooks/echart.d.ts +166 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/modal.d.ts +10 -5
- package/dist/types/hooks/table/types.d.ts +1 -0
- package/dist/types/main.d.ts +1 -0
- package/dist/types/pages/layout/global.d.ts +1 -0
- package/dist/types/pages/menu/avatar.d.ts +3 -3
- package/dist/types/pages/menu/button.d.ts +3 -3
- package/dist/types/pages/menu/main.d.ts +3 -3
- package/dist/types/pages/page.d.ts +1 -1
- package/package.json +8 -3
- package/dist/cjs/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.cjs +0 -5
- package/dist/cjs/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.cjs +0 -4
- package/dist/esm/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.js +0 -43
- package/dist/esm/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.js +0 -6
- package/dist/esm/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.js +0 -473
- package/dist/esm/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js +0 -202
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as D, computed as p, createVNode as e, createTextVNode as
|
|
1
|
+
import { defineComponent as D, computed as p, createVNode as e, createTextVNode as s } from "vue";
|
|
2
2
|
import { useI18n as N, useManage as $, useLogout as j, useTheme as L } from "@duxweb/dvha-core";
|
|
3
3
|
import { NAvatar as m, NDropdown as R } from "naive-ui";
|
|
4
4
|
import { useRouter as S } from "vue-router";
|
|
@@ -6,7 +6,7 @@ import A from "./button.js";
|
|
|
6
6
|
const V = /* @__PURE__ */ D({
|
|
7
7
|
name: "DuxMenuAvatar",
|
|
8
8
|
props: {
|
|
9
|
-
|
|
9
|
+
collapsed: {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
default: !1
|
|
12
12
|
}
|
|
@@ -58,9 +58,9 @@ const V = /* @__PURE__ */ D({
|
|
|
58
58
|
class: "flex flex-col"
|
|
59
59
|
}, [e("div", {
|
|
60
60
|
class: "text-sm font-medium"
|
|
61
|
-
}, [
|
|
61
|
+
}, [s("admin")]), e("div", {
|
|
62
62
|
class: "text-xs text-muted"
|
|
63
|
-
}, [
|
|
63
|
+
}, [s("admin@example.com")])])])
|
|
64
64
|
}, {
|
|
65
65
|
type: "divider"
|
|
66
66
|
}, ...C.value, {
|
|
@@ -86,7 +86,7 @@ const V = /* @__PURE__ */ D({
|
|
|
86
86
|
style: {
|
|
87
87
|
backgroundColor: "rgb(var(--ui-color-primary))"
|
|
88
88
|
}
|
|
89
|
-
}, null), e("div", null, [
|
|
89
|
+
}, null), e("div", null, [s("主题色")])]),
|
|
90
90
|
key: "color.primary",
|
|
91
91
|
children: (a = y.value) == null ? void 0 : a.map((l) => ({
|
|
92
92
|
label: () => o(e("div", {
|
|
@@ -107,7 +107,7 @@ const V = /* @__PURE__ */ D({
|
|
|
107
107
|
style: {
|
|
108
108
|
backgroundColor: "rgb(var(--ui-color-gray-600))"
|
|
109
109
|
}
|
|
110
|
-
}, null), e("div", null, [
|
|
110
|
+
}, null), e("div", null, [s("中性色")])]),
|
|
111
111
|
key: "color.neutral",
|
|
112
112
|
children: (t = k.value) == null ? void 0 : t.map((l) => ({
|
|
113
113
|
label: () => o(e("div", {
|
|
@@ -150,19 +150,19 @@ const V = /* @__PURE__ */ D({
|
|
|
150
150
|
}];
|
|
151
151
|
});
|
|
152
152
|
function w(a, t) {
|
|
153
|
-
const l = a.lastIndexOf("."), [M,
|
|
153
|
+
const l = a.lastIndexOf("."), [M, n] = l === -1 ? [a, ""] : [a.substring(0, l), a.substring(l + 1)];
|
|
154
154
|
switch (M) {
|
|
155
155
|
case "locale":
|
|
156
|
-
i.changeLocale(
|
|
156
|
+
i.changeLocale(n);
|
|
157
157
|
break;
|
|
158
158
|
case "color.primary":
|
|
159
|
-
d("primary",
|
|
159
|
+
d("primary", n);
|
|
160
160
|
break;
|
|
161
161
|
case "color.neutral":
|
|
162
|
-
d("gray",
|
|
162
|
+
d("gray", n);
|
|
163
163
|
break;
|
|
164
164
|
case "theme":
|
|
165
|
-
x(
|
|
165
|
+
x(n);
|
|
166
166
|
break;
|
|
167
167
|
case "logout":
|
|
168
168
|
h();
|
|
@@ -181,7 +181,7 @@ const V = /* @__PURE__ */ D({
|
|
|
181
181
|
width: 200
|
|
182
182
|
}, {
|
|
183
183
|
default: () => [e(A, {
|
|
184
|
-
|
|
184
|
+
collapsed: g.collapsed
|
|
185
185
|
}, {
|
|
186
186
|
icon: () => e(m, {
|
|
187
187
|
class: "group-hover:shadow-lg",
|
|
@@ -193,9 +193,9 @@ const V = /* @__PURE__ */ D({
|
|
|
193
193
|
class: "flex flex-col"
|
|
194
194
|
}, [e("div", {
|
|
195
195
|
class: "text-sm font-medium"
|
|
196
|
-
}, [
|
|
196
|
+
}, [s("admin")]), e("div", {
|
|
197
197
|
class: "text-xs text-muted"
|
|
198
|
-
}, [
|
|
198
|
+
}, [s("admin@example.com")])])
|
|
199
199
|
})]
|
|
200
200
|
});
|
|
201
201
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as u, createVNode as l } from "vue";
|
|
2
2
|
import "@duxweb/dvha-core";
|
|
3
3
|
import "naive-ui";
|
|
4
4
|
import "vue-router";
|
|
5
5
|
import "@overlastic/vue";
|
|
6
|
+
import "vue-echarts";
|
|
6
7
|
import "clsx";
|
|
7
8
|
import "jinrishici";
|
|
8
9
|
import "lodash-es";
|
|
@@ -10,11 +11,14 @@ import "@vueuse/core";
|
|
|
10
11
|
import "vee-validate";
|
|
11
12
|
import "@vee-validate/i18n";
|
|
12
13
|
import "colorizr";
|
|
14
|
+
import "echarts";
|
|
15
|
+
import "@ant-design/colors";
|
|
16
|
+
import "@unocss/preset-typography";
|
|
13
17
|
import "vue-command-palette";
|
|
14
18
|
import "@duxweb/dvha-naiveui";
|
|
15
19
|
import "../page404.js";
|
|
16
20
|
import { useUI as d } from "../../hooks/ui.js";
|
|
17
|
-
const
|
|
21
|
+
const N = /* @__PURE__ */ u({
|
|
18
22
|
name: "DuxMenuButton",
|
|
19
23
|
props: {
|
|
20
24
|
class: {
|
|
@@ -26,9 +30,9 @@ const D = /* @__PURE__ */ l({
|
|
|
26
30
|
default: () => {
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
|
-
|
|
33
|
+
collapsed: {
|
|
30
34
|
type: Boolean,
|
|
31
|
-
default: !
|
|
35
|
+
default: !0
|
|
32
36
|
},
|
|
33
37
|
inverted: {
|
|
34
38
|
type: Boolean,
|
|
@@ -43,19 +47,19 @@ const D = /* @__PURE__ */ l({
|
|
|
43
47
|
menuMobileCollapsed: i
|
|
44
48
|
} = d();
|
|
45
49
|
return () => {
|
|
46
|
-
var
|
|
47
|
-
return
|
|
50
|
+
var r, a;
|
|
51
|
+
return l("div", {
|
|
48
52
|
onClick: () => {
|
|
49
|
-
var
|
|
50
|
-
(
|
|
53
|
+
var n;
|
|
54
|
+
(n = e.onClick) == null || n.call(e);
|
|
51
55
|
},
|
|
52
56
|
class: ["flex items-center gap-1 justify-center py-1 px-2 cursor-pointer gap-2", e.class, o.value && !i.value ? "group" : "hover:shadow-xs hover:bg-default flex-1 w-full", e.inverted ? "transition-all duration-300 bg-inverted/5 rounded-full hover:bg-default hover:shadow-xs" : " rounded-md"]
|
|
53
|
-
}, [(
|
|
57
|
+
}, [(r = t.icon) == null ? void 0 : r.call(t), e.collapsed === !1 && !o.value && !i.value && l("div", {
|
|
54
58
|
class: ["overflow-hidden ease-in-out whitespace-nowrap text-left min-w-0 flex-1", e.inverted ? "text-default" : ""]
|
|
55
59
|
}, [(a = t.default) == null ? void 0 : a.call(t)])]);
|
|
56
60
|
};
|
|
57
61
|
}
|
|
58
62
|
});
|
|
59
63
|
export {
|
|
60
|
-
|
|
64
|
+
N as default
|
|
61
65
|
};
|
|
@@ -2,58 +2,62 @@ import { defineComponent as M, ref as d, watch as s, computed as w, createVNode
|
|
|
2
2
|
import { useRouteStore as D, useTheme as T, useI18n as K } from "@duxweb/dvha-core";
|
|
3
3
|
import { useMagicKeys as R, watchThrottled as j } from "@vueuse/core";
|
|
4
4
|
import { cloneDeep as E } from "lodash-es";
|
|
5
|
-
import { NTag as
|
|
5
|
+
import { NTag as p, NButton as G } from "naive-ui";
|
|
6
6
|
import { Command as n } from "vue-command-palette";
|
|
7
7
|
import { useRouter as L } from "vue-router";
|
|
8
8
|
import "@overlastic/vue";
|
|
9
|
+
import "vue-echarts";
|
|
9
10
|
import "clsx";
|
|
10
11
|
import "jinrishici";
|
|
11
12
|
import "vee-validate";
|
|
12
13
|
import "@vee-validate/i18n";
|
|
13
14
|
import "colorizr";
|
|
15
|
+
import "echarts";
|
|
16
|
+
import "@ant-design/colors";
|
|
17
|
+
import "@unocss/preset-typography";
|
|
14
18
|
import "@duxweb/dvha-naiveui";
|
|
15
19
|
import "../page404.js";
|
|
16
20
|
import { useUI as q } from "../../hooks/ui.js";
|
|
17
|
-
const
|
|
21
|
+
const oe = /* @__PURE__ */ M({
|
|
18
22
|
name: "DuxMenuCmd",
|
|
19
23
|
setup() {
|
|
20
24
|
const {
|
|
21
25
|
cmdVisible: b,
|
|
22
26
|
setCmdVisible: c
|
|
23
|
-
} = q(), f = R(),
|
|
27
|
+
} = q(), f = R(), S = f["Meta+K"], m = d(), i = d([]), C = L(), o = D(), {
|
|
24
28
|
setMode: g
|
|
25
|
-
} = T(),
|
|
29
|
+
} = T(), u = d(""), {
|
|
26
30
|
t: a
|
|
27
31
|
} = K(), x = d(), k = (e) => {
|
|
28
|
-
const l =
|
|
32
|
+
const l = o.routes.filter((r) => r.parent === e);
|
|
29
33
|
m.value = e, i.value = l;
|
|
30
34
|
}, N = () => {
|
|
31
35
|
c(!0);
|
|
32
36
|
}, z = () => {
|
|
33
37
|
c(!1);
|
|
34
38
|
}, I = (e) => {
|
|
35
|
-
e ? i.value = [...E(
|
|
36
|
-
var
|
|
37
|
-
return (
|
|
38
|
-
})] : i.value =
|
|
39
|
+
e ? i.value = [...E(o.routes).filter((l) => {
|
|
40
|
+
var r;
|
|
41
|
+
return (r = l.label) == null ? void 0 : r.includes(e);
|
|
42
|
+
})] : i.value = o.routes.filter((l) => !l.parent);
|
|
39
43
|
};
|
|
40
44
|
s(b, (e) => {
|
|
41
|
-
e ? i.value =
|
|
42
|
-
}), j(
|
|
43
|
-
I(
|
|
45
|
+
e ? i.value = o.routes.filter((l) => !l.parent) : i.value = o.routes.filter((l) => !l.parent);
|
|
46
|
+
}), j(u, () => {
|
|
47
|
+
I(u.value);
|
|
44
48
|
}, {
|
|
45
49
|
throttle: 500
|
|
46
50
|
});
|
|
47
51
|
const y = () => {
|
|
48
|
-
const e =
|
|
52
|
+
const e = o.routes.find((l) => l.name === m.value);
|
|
49
53
|
k(e == null ? void 0 : e.parent);
|
|
50
54
|
};
|
|
51
|
-
s(
|
|
55
|
+
s(S, (e) => {
|
|
52
56
|
e && N();
|
|
53
57
|
}), s(f.Escape, (e) => {
|
|
54
58
|
e && c(!1);
|
|
55
59
|
}), s(f.Backspace, (e) => {
|
|
56
|
-
e &&
|
|
60
|
+
e && u.value === "" && m.value && y();
|
|
57
61
|
}), s(x, (e) => {
|
|
58
62
|
e && e.focus();
|
|
59
63
|
});
|
|
@@ -66,7 +70,7 @@ const le = /* @__PURE__ */ M({
|
|
|
66
70
|
class: "flex items-center gap-2"
|
|
67
71
|
}, [t("div", {
|
|
68
72
|
class: ["size-4", e == null ? void 0 : e.icon]
|
|
69
|
-
}, null), t("div", null, [e == null ? void 0 : e.label])]), t("div", null, [(e == null ? void 0 : e.keyName) && t(
|
|
73
|
+
}, null), t("div", null, [e == null ? void 0 : e.label])]), t("div", null, [(e == null ? void 0 : e.keyName) && t(p, {
|
|
70
74
|
size: "small"
|
|
71
75
|
}, {
|
|
72
76
|
default: () => [e == null ? void 0 : e.keyName]
|
|
@@ -82,7 +86,7 @@ const le = /* @__PURE__ */ M({
|
|
|
82
86
|
ref: x,
|
|
83
87
|
placeholder: a("common.search"),
|
|
84
88
|
onInput: (e) => {
|
|
85
|
-
|
|
89
|
+
u.value = e.target.value;
|
|
86
90
|
},
|
|
87
91
|
class: "w-full h-12 text-base/5 rounded-md border-0 placeholder:text-dimmed outline-0 px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-transparent ps-10 pe-10"
|
|
88
92
|
}, null), t("span", {
|
|
@@ -92,7 +96,7 @@ const le = /* @__PURE__ */ M({
|
|
|
92
96
|
"aria-hidden": "true"
|
|
93
97
|
}, null)]), t("span", {
|
|
94
98
|
class: "absolute inset-y-0 end-0 flex items-center gap-2 pe-3"
|
|
95
|
-
}, [t(
|
|
99
|
+
}, [t(p, {
|
|
96
100
|
size: "small"
|
|
97
101
|
}, {
|
|
98
102
|
default: () => [B("Esc")]
|
|
@@ -107,7 +111,7 @@ const le = /* @__PURE__ */ M({
|
|
|
107
111
|
"aria-hidden": "true"
|
|
108
112
|
}, null)
|
|
109
113
|
})])]),
|
|
110
|
-
body: () => t(V, null, [h.value.length === 0 &&
|
|
114
|
+
body: () => t(V, null, [h.value.length === 0 && u.value && t("div", {
|
|
111
115
|
class: "flex items-center justify-center h-20 border-t border-muted"
|
|
112
116
|
}, [a("common.empty")]), h.value.length > 0 && t(n.List, null, {
|
|
113
117
|
default: () => [t(n.Group, {
|
|
@@ -115,8 +119,8 @@ const le = /* @__PURE__ */ M({
|
|
|
115
119
|
}, {
|
|
116
120
|
default: () => {
|
|
117
121
|
var e;
|
|
118
|
-
return [(e = h.value) == null ? void 0 : e.map((l,
|
|
119
|
-
key:
|
|
122
|
+
return [(e = h.value) == null ? void 0 : e.map((l, r) => t(n.Item, {
|
|
123
|
+
key: r,
|
|
120
124
|
onSelect: () => {
|
|
121
125
|
l.path ? (C.push(l.path), z()) : k(l.name);
|
|
122
126
|
}
|
|
@@ -153,5 +157,5 @@ const le = /* @__PURE__ */ M({
|
|
|
153
157
|
}
|
|
154
158
|
});
|
|
155
159
|
export {
|
|
156
|
-
|
|
160
|
+
oe as DuxMenuCmd
|
|
157
161
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineComponent as c, createVNode as e, createTextVNode as i } from "vue";
|
|
2
2
|
import { useManage as f, useI18n as v, DuxLogoIcon as x } from "@duxweb/dvha-core";
|
|
3
3
|
import { useNaiveMenu as g } from "@duxweb/dvha-naiveui";
|
|
4
|
-
import { NTag as
|
|
4
|
+
import { NTag as a, NMenu as h } from "naive-ui";
|
|
5
5
|
import "vue-router";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
|
+
import "vue-echarts";
|
|
7
8
|
import "clsx";
|
|
8
9
|
import "jinrishici";
|
|
9
10
|
import "lodash-es";
|
|
@@ -11,40 +12,43 @@ import "@vueuse/core";
|
|
|
11
12
|
import "vee-validate";
|
|
12
13
|
import "@vee-validate/i18n";
|
|
13
14
|
import "colorizr";
|
|
15
|
+
import "echarts";
|
|
16
|
+
import "@ant-design/colors";
|
|
17
|
+
import "@unocss/preset-typography";
|
|
14
18
|
import b from "./avatar.js";
|
|
15
|
-
import
|
|
19
|
+
import s from "./button.js";
|
|
16
20
|
import "vue-command-palette";
|
|
17
21
|
import "../page404.js";
|
|
18
22
|
import { useUI as M } from "../../hooks/ui.js";
|
|
19
|
-
const
|
|
23
|
+
const H = /* @__PURE__ */ c({
|
|
20
24
|
name: "DuxMenuMain",
|
|
21
25
|
props: {
|
|
22
|
-
|
|
26
|
+
collapsed: {
|
|
23
27
|
type: Boolean,
|
|
24
28
|
default: !1
|
|
25
29
|
}
|
|
26
30
|
},
|
|
27
31
|
setup(l) {
|
|
28
32
|
const {
|
|
29
|
-
options:
|
|
30
|
-
active:
|
|
33
|
+
options: r,
|
|
34
|
+
active: n
|
|
31
35
|
} = g({}), {
|
|
32
36
|
menuCollapsed: o,
|
|
33
37
|
setCmdVisible: p,
|
|
34
38
|
menuMobileCollapsed: t,
|
|
35
|
-
setMenuCollapsed:
|
|
39
|
+
setMenuCollapsed: d
|
|
36
40
|
} = M(), {
|
|
37
|
-
config:
|
|
41
|
+
config: m
|
|
38
42
|
} = f(), {
|
|
39
|
-
t:
|
|
43
|
+
t: u
|
|
40
44
|
} = v();
|
|
41
45
|
return () => e("div", {
|
|
42
46
|
class: "flex flex-col h-screen"
|
|
43
47
|
}, [e("div", {
|
|
44
48
|
class: "h-13 px-2 hidden lg:flex justify-center items-center"
|
|
45
|
-
}, [e(
|
|
46
|
-
onClick: () =>
|
|
47
|
-
|
|
49
|
+
}, [e(s, {
|
|
50
|
+
onClick: () => d(!o.value),
|
|
51
|
+
collapsed: l.collapsed
|
|
48
52
|
}, {
|
|
49
53
|
icon: () => e("div", {
|
|
50
54
|
class: "bg-white dark:bg-primary-950 rounded-full p-2 shadow group-hover:shadow-lg"
|
|
@@ -52,11 +56,11 @@ const q = /* @__PURE__ */ c({
|
|
|
52
56
|
highlight: "fill-primary",
|
|
53
57
|
class: "size-4"
|
|
54
58
|
}, null)]),
|
|
55
|
-
default: () => e("div", null, [
|
|
59
|
+
default: () => e("div", null, [m.title])
|
|
56
60
|
})]), e("div", {
|
|
57
61
|
class: "px-2 py-1 hidden lg:block"
|
|
58
|
-
}, [e(
|
|
59
|
-
|
|
62
|
+
}, [e(s, {
|
|
63
|
+
collapsed: l.collapsed,
|
|
60
64
|
inverted: !0,
|
|
61
65
|
class: "relative py-1.5 px-3",
|
|
62
66
|
onClick: () => p(!0)
|
|
@@ -66,15 +70,15 @@ const q = /* @__PURE__ */ c({
|
|
|
66
70
|
}, null),
|
|
67
71
|
default: () => e("div", {
|
|
68
72
|
class: "text-muted text-sm"
|
|
69
|
-
}, [
|
|
73
|
+
}, [u("common.search"), !o.value && e("div", {
|
|
70
74
|
class: "flex items-center gap-1 absolute right-2.5 top-1.3"
|
|
71
|
-
}, [e(
|
|
75
|
+
}, [e(a, {
|
|
72
76
|
size: "small",
|
|
73
77
|
bordered: !1,
|
|
74
78
|
type: "primary"
|
|
75
79
|
}, {
|
|
76
80
|
default: () => [i("⌘")]
|
|
77
|
-
}), e(
|
|
81
|
+
}), e(a, {
|
|
78
82
|
size: "small",
|
|
79
83
|
bordered: !1,
|
|
80
84
|
type: "primary"
|
|
@@ -84,8 +88,8 @@ const q = /* @__PURE__ */ c({
|
|
|
84
88
|
})]), e("div", {
|
|
85
89
|
class: ["flex-1 min-h-0", t.value ? "border-t border-muted" : ""]
|
|
86
90
|
}, [e(h, {
|
|
87
|
-
options:
|
|
88
|
-
value:
|
|
91
|
+
options: r.value,
|
|
92
|
+
value: n.value,
|
|
89
93
|
collapsed: o.value && !t.value,
|
|
90
94
|
indent: 20,
|
|
91
95
|
collapsedWidth: 60,
|
|
@@ -93,10 +97,10 @@ const q = /* @__PURE__ */ c({
|
|
|
93
97
|
}, null)]), e("div", {
|
|
94
98
|
class: "flex-none hidden lg:flex flex-col items-center gap-2 p-2"
|
|
95
99
|
}, [e(b, {
|
|
96
|
-
|
|
100
|
+
collapsed: l.collapsed
|
|
97
101
|
}, null)])]);
|
|
98
102
|
}
|
|
99
103
|
});
|
|
100
104
|
export {
|
|
101
|
-
|
|
105
|
+
H as DuxMenuMain
|
|
102
106
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NDrawer as
|
|
1
|
+
import { defineComponent as p, createVNode as r } from "vue";
|
|
2
|
+
import { NDrawer as e } from "naive-ui";
|
|
3
3
|
import "@duxweb/dvha-core";
|
|
4
4
|
import "vue-router";
|
|
5
5
|
import "@overlastic/vue";
|
|
6
|
+
import "vue-echarts";
|
|
6
7
|
import "clsx";
|
|
7
8
|
import "jinrishici";
|
|
8
9
|
import "lodash-es";
|
|
@@ -10,30 +11,33 @@ import "@vueuse/core";
|
|
|
10
11
|
import "vee-validate";
|
|
11
12
|
import "@vee-validate/i18n";
|
|
12
13
|
import "colorizr";
|
|
14
|
+
import "echarts";
|
|
15
|
+
import "@ant-design/colors";
|
|
16
|
+
import "@unocss/preset-typography";
|
|
13
17
|
import "vue-command-palette";
|
|
14
18
|
import { DuxMenuMain as m } from "./main.js";
|
|
15
19
|
import "@duxweb/dvha-naiveui";
|
|
16
20
|
import "../page404.js";
|
|
17
21
|
import { useUI as i } from "../../hooks/ui.js";
|
|
18
|
-
const
|
|
22
|
+
const g = /* @__PURE__ */ p({
|
|
19
23
|
name: "DuxMobileMenu",
|
|
20
24
|
props: {},
|
|
21
|
-
setup(
|
|
25
|
+
setup(l) {
|
|
22
26
|
const {
|
|
23
27
|
menuMobileCollapsed: o
|
|
24
28
|
} = i();
|
|
25
|
-
return () => r(
|
|
29
|
+
return () => r(e, {
|
|
26
30
|
show: o.value,
|
|
27
31
|
onUpdateShow: (t) => o.value = t,
|
|
28
32
|
width: 250,
|
|
29
33
|
placement: "left"
|
|
30
34
|
}, {
|
|
31
35
|
default: () => [r(m, {
|
|
32
|
-
|
|
36
|
+
collapsed: !1
|
|
33
37
|
}, null)]
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
});
|
|
37
41
|
export {
|
|
38
|
-
|
|
42
|
+
g as DuxMobileMenu
|
|
39
43
|
};
|
package/dist/esm/pages/page.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NScrollbar as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as g, createVNode as d } from "vue";
|
|
2
|
+
import { NScrollbar as l } from "naive-ui";
|
|
3
|
+
const x = /* @__PURE__ */ g({
|
|
4
4
|
name: "DuxPage",
|
|
5
5
|
props: {
|
|
6
6
|
padding: {
|
|
@@ -20,28 +20,28 @@ const m = /* @__PURE__ */ u({
|
|
|
20
20
|
default: !0
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
slots:
|
|
23
|
+
setup(a, {
|
|
24
|
+
slots: e
|
|
25
25
|
}) {
|
|
26
26
|
return () => {
|
|
27
|
-
var
|
|
28
|
-
const r =
|
|
27
|
+
var u, f, i;
|
|
28
|
+
const r = a.card ? "bg-default dark:bg-muted rounded-md shadow-xs lg:dark:border lg:dark:border-muted" : "", n = a.card && a.padding ? "p-3" : "", c = a.scrollbar ? "" : "h-full";
|
|
29
29
|
return d("div", {
|
|
30
|
-
class: "h-full"
|
|
31
|
-
}, [e.scrollbar ? d(
|
|
32
|
-
class: r,
|
|
33
|
-
contentClass: `${
|
|
30
|
+
class: "h-full flex-1 flex gap-2"
|
|
31
|
+
}, [(u = e == null ? void 0 : e.sideLeft) == null ? void 0 : u.call(e), a.scrollbar ? d(l, {
|
|
32
|
+
class: [r, "flex-1 min-w-0"],
|
|
33
|
+
contentClass: `${n} ${c}`
|
|
34
34
|
}, {
|
|
35
35
|
default: () => {
|
|
36
|
-
var
|
|
37
|
-
return [(
|
|
36
|
+
var t;
|
|
37
|
+
return [(t = e.default) == null ? void 0 : t.call(e)];
|
|
38
38
|
}
|
|
39
39
|
}) : d("div", {
|
|
40
|
-
class: `${r} ${
|
|
41
|
-
}, [(
|
|
40
|
+
class: `${r} ${n} ${c} flex-1 min-w-0`
|
|
41
|
+
}, [(f = e.default) == null ? void 0 : f.call(e)]), (i = e == null ? void 0 : e.sideRight) == null ? void 0 : i.call(e)]);
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
x as DuxPage
|
|
47
47
|
};
|
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, createVNode as t, isVNode as u } from "vue";
|
|
2
2
|
import { useI18n as s } from "@duxweb/dvha-core";
|
|
3
3
|
import { NButton as a } from "naive-ui";
|
|
4
4
|
import { useRoute as l, useRouter as c } from "vue-router";
|
|
5
|
+
import "vue-echarts";
|
|
6
|
+
import "@overlastic/vue";
|
|
7
|
+
import "lodash-es";
|
|
8
|
+
import "@duxweb/dvha-naiveui";
|
|
9
|
+
import "@vueuse/core";
|
|
10
|
+
import "pinia";
|
|
5
11
|
import "clsx";
|
|
6
12
|
import "jinrishici";
|
|
7
|
-
import "lodash-es";
|
|
8
13
|
import { DuxDrawEmpty as f } from "../components/draw/drawEmpty.js";
|
|
9
|
-
import "@overlastic/vue";
|
|
10
|
-
import "@vueuse/core";
|
|
11
14
|
import "vee-validate";
|
|
12
|
-
import "@duxweb/dvha-naiveui";
|
|
13
|
-
import "pinia";
|
|
14
15
|
import "@vee-validate/i18n";
|
|
15
16
|
import "colorizr";
|
|
17
|
+
import "echarts";
|
|
18
|
+
import "@ant-design/colors";
|
|
19
|
+
import "@unocss/preset-typography";
|
|
16
20
|
import "vue-command-palette";
|
|
17
21
|
import { DuxPageStatus as d } from "./pageStatus.js";
|
|
18
22
|
function g(o) {
|
|
19
|
-
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !
|
|
23
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !u(o);
|
|
20
24
|
}
|
|
21
|
-
const D = /* @__PURE__ */
|
|
25
|
+
const D = /* @__PURE__ */ m({
|
|
22
26
|
name: "DuxPage404",
|
|
23
27
|
setup(o) {
|
|
24
|
-
const
|
|
25
|
-
t:
|
|
28
|
+
const i = l(), p = c(), {
|
|
29
|
+
t: r
|
|
26
30
|
} = s();
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
path:
|
|
31
|
+
function n() {
|
|
32
|
+
p.push({
|
|
33
|
+
path: i.path,
|
|
30
34
|
query: {
|
|
31
|
-
...
|
|
35
|
+
...i.query,
|
|
32
36
|
t: Date.now()
|
|
33
37
|
}
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
return () => t(d, {
|
|
37
|
-
title:
|
|
38
|
-
desc:
|
|
41
|
+
title: r("pages.404.title"),
|
|
42
|
+
desc: r("pages.404.desc")
|
|
39
43
|
}, {
|
|
40
44
|
default: () => t("div", null, [t(f, null, null)]),
|
|
41
45
|
action: () => {
|
|
42
|
-
let
|
|
46
|
+
let e;
|
|
43
47
|
return t(a, {
|
|
44
|
-
onClick:
|
|
48
|
+
onClick: n,
|
|
45
49
|
renderIcon: () => t("div", {
|
|
46
50
|
class: "n-icon i-tabler:refresh"
|
|
47
51
|
}, null)
|
|
48
|
-
}, g(
|
|
49
|
-
default: () => [
|
|
52
|
+
}, g(e = r("components.button.refresh")) ? e : {
|
|
53
|
+
default: () => [e]
|
|
50
54
|
});
|
|
51
55
|
}
|
|
52
56
|
});
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { defineComponent as c, createVNode as t } from "vue";
|
|
2
2
|
import { DuxCard as a } from "../components/card/card.js";
|
|
3
3
|
import "naive-ui";
|
|
4
|
-
import "
|
|
5
|
-
import "jinrishici";
|
|
6
|
-
import "lodash-es";
|
|
7
|
-
import "@overlastic/vue";
|
|
8
|
-
import "@vueuse/core";
|
|
9
|
-
import "vee-validate";
|
|
4
|
+
import "vue-echarts";
|
|
10
5
|
import "@duxweb/dvha-core";
|
|
11
6
|
import "vue-router";
|
|
7
|
+
import "@overlastic/vue";
|
|
8
|
+
import "lodash-es";
|
|
12
9
|
import "@duxweb/dvha-naiveui";
|
|
10
|
+
import "@vueuse/core";
|
|
13
11
|
import "pinia";
|
|
12
|
+
import "clsx";
|
|
13
|
+
import "jinrishici";
|
|
14
|
+
import "vee-validate";
|
|
14
15
|
import "@vee-validate/i18n";
|
|
15
16
|
import "colorizr";
|
|
17
|
+
import "echarts";
|
|
18
|
+
import "@ant-design/colors";
|
|
19
|
+
import "@unocss/preset-typography";
|
|
16
20
|
import "vue-command-palette";
|
|
17
21
|
import "./page404.js";
|
|
18
|
-
const
|
|
22
|
+
const V = /* @__PURE__ */ c({
|
|
19
23
|
name: "DuxPageStatus",
|
|
20
24
|
props: {
|
|
21
25
|
title: String,
|
|
@@ -47,5 +51,5 @@ const b = /* @__PURE__ */ c({
|
|
|
47
51
|
}
|
|
48
52
|
});
|
|
49
53
|
export {
|
|
50
|
-
|
|
54
|
+
V as DuxPageStatus
|
|
51
55
|
};
|