@duxweb/dvha-pro 1.0.18 → 1.0.19
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 -1
- package/dist/cjs/components/code/code.cjs +1 -0
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
- package/dist/cjs/components/data/selectModal.cjs +1 -1
- package/dist/cjs/components/drawer/drawer.cjs +1 -1
- package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
- package/dist/cjs/components/form/formItem.cjs +1 -1
- package/dist/cjs/components/form/formLayout.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/icon/icon.cjs +1 -1
- package/dist/cjs/components/layout/filter.cjs +1 -1
- package/dist/cjs/components/layout/filterLayout.cjs +1 -0
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/level/level.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/panel/collapse.cjs +1 -0
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/status/listEmpty.cjs +1 -0
- package/dist/cjs/components/table/table.cjs +1 -0
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/components/tree/treeFilter.cjs +1 -1
- package/dist/cjs/components/upload/config.cjs +1 -0
- package/dist/cjs/components/upload/file.cjs +1 -1
- package/dist/cjs/components/upload/image.cjs +1 -1
- package/dist/cjs/components/upload/manage/item.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- 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/modal.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/authLayout.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 +23 -7
- package/dist/esm/component.js +36 -34
- package/dist/esm/components/card/card.js +6 -6
- package/dist/esm/components/chart/echart.js +17 -6
- package/dist/esm/components/code/code.js +53 -0
- package/dist/esm/components/crop/imageCrop.js +37 -26
- package/dist/esm/components/data/dynamicSelect.js +29 -18
- package/dist/esm/components/data/selectModal.js +49 -38
- package/dist/esm/components/drawer/drawer.js +17 -28
- package/dist/esm/components/drawer/drawerPage.js +54 -17
- package/dist/esm/components/form/formItem.js +17 -17
- package/dist/esm/components/form/formLayout.js +8 -8
- package/dist/esm/components/form/modalForm.js +44 -35
- package/dist/esm/components/form/pageForm.js +81 -43
- package/dist/esm/components/form/settingForm.js +28 -17
- package/dist/esm/components/icon/icon.js +23 -12
- package/dist/esm/components/layout/filter.js +15 -11
- package/dist/esm/components/layout/filterLayout.js +34 -0
- package/dist/esm/components/layout/list.js +206 -160
- package/dist/esm/components/layout/table.js +212 -185
- package/dist/esm/components/level/level.js +28 -17
- package/dist/esm/components/modal/modal.js +9 -9
- package/dist/esm/components/modal/modalPage.js +2 -2
- package/dist/esm/components/panel/collapse.js +49 -0
- package/dist/esm/components/panel/setting.js +3 -3
- package/dist/esm/components/status/listEmpty.js +26 -0
- package/dist/esm/components/table/table.js +110 -0
- package/dist/esm/components/table/tablePage.js +24 -18
- package/dist/esm/components/tree/treeFilter.js +44 -39
- package/dist/esm/components/upload/config.js +32 -0
- package/dist/esm/components/upload/file.js +142 -116
- package/dist/esm/components/upload/image.js +95 -66
- package/dist/esm/components/upload/manage/item.js +17 -6
- package/dist/esm/components/upload/manager.js +202 -164
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +77 -75
- package/dist/esm/hooks/dialog.js +13 -2
- package/dist/esm/hooks/drawer.js +13 -2
- package/dist/esm/hooks/modal.js +13 -2
- package/dist/esm/hooks/table/image.js +21 -10
- package/dist/esm/hooks/table/media.js +20 -9
- package/dist/esm/hooks/table.js +16 -13
- package/dist/esm/index.js +174 -164
- package/dist/esm/langs/en-US.json.js +1 -1
- package/dist/esm/langs/zh-CN.json.js +1 -1
- package/dist/esm/pages/authLayout.js +19 -8
- package/dist/esm/pages/layout/page.js +17 -6
- package/dist/esm/pages/login.js +40 -29
- package/dist/esm/pages/menu/avatar.js +45 -34
- package/dist/esm/pages/menu/button.js +23 -12
- package/dist/esm/pages/menu/cmd.js +45 -34
- package/dist/esm/pages/menu/main.js +40 -27
- package/dist/esm/pages/menu/mobile.js +13 -2
- package/dist/esm/pages/page.js +1 -1
- package/dist/esm/pages/page404.js +20 -9
- package/dist/esm/pages/pageStatus.js +31 -15
- package/dist/esm/theme/naiveTheme.js +6 -6
- package/dist/esm/theme/uno.css.js +23 -7
- package/dist/types/components/code/code.d.ts +44 -0
- package/dist/types/components/code/index.d.ts +1 -0
- package/dist/types/components/drawer/drawer.d.ts +2 -0
- package/dist/types/components/drawer/drawerPage.d.ts +20 -1
- package/dist/types/components/form/formItem.d.ts +2 -2
- package/dist/types/components/form/formLayout.d.ts +3 -3
- package/dist/types/components/form/modalForm.d.ts +3 -3
- package/dist/types/components/form/pageForm.d.ts +12 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/layout/filterLayout.d.ts +32 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/table.d.ts +3 -0
- package/dist/types/components/panel/collapse.d.ts +14 -0
- package/dist/types/components/panel/index.d.ts +1 -0
- package/dist/types/components/select/cardSelect.d.ts +1 -1
- package/dist/types/components/status/index.d.ts +1 -0
- package/dist/types/components/status/listEmpty.d.ts +11 -0
- package/dist/types/components/table/index.d.ts +1 -0
- package/dist/types/components/table/table.d.ts +6552 -0
- package/dist/types/components/table/tablePage.d.ts +3 -0
- package/dist/types/components/tree/treeFilter.d.ts +13 -12
- package/dist/types/components/upload/config.d.ts +13 -0
- package/dist/types/components/upload/file.d.ts +4 -0
- package/dist/types/components/upload/image.d.ts +30 -2
- package/dist/types/components/upload/manager.d.ts +4 -0
- package/dist/types/hooks/drawer.d.ts +1 -0
- package/dist/types/hooks/table/types.d.ts +1 -0
- package/dist/types/main.d.ts +6 -0
- package/dist/types/pages/pageStatus.d.ts +11 -1
- package/package.json +6 -4
package/dist/esm/pages/login.js
CHANGED
|
@@ -30,17 +30,28 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
30
30
|
import "vue-command-palette";
|
|
31
31
|
import "./page404.js";
|
|
32
32
|
import "@iconify-json/tabler/icons.json";
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
import "vue3-ace-editor";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
36
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
37
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
38
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
39
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
40
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
41
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
42
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
43
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
44
|
+
function O(i) {
|
|
45
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !L(i);
|
|
35
46
|
}
|
|
36
|
-
const
|
|
47
|
+
const Ne = /* @__PURE__ */ k({
|
|
37
48
|
name: "DuxLoginPage",
|
|
38
|
-
setup(
|
|
39
|
-
slots:
|
|
49
|
+
setup(i, {
|
|
50
|
+
slots: a
|
|
40
51
|
}) {
|
|
41
|
-
const
|
|
42
|
-
t:
|
|
43
|
-
} = P(), w = j(),
|
|
52
|
+
const l = N(), r = F(), {
|
|
53
|
+
t: s
|
|
54
|
+
} = P(), w = j(), n = A(), t = D({
|
|
44
55
|
username: "",
|
|
45
56
|
password: ""
|
|
46
57
|
}), {
|
|
@@ -48,50 +59,50 @@ const fe = /* @__PURE__ */ k({
|
|
|
48
59
|
isLoading: b
|
|
49
60
|
} = S({
|
|
50
61
|
onSuccess: () => {
|
|
51
|
-
|
|
62
|
+
n.success(s("pages.login.success"));
|
|
52
63
|
},
|
|
53
64
|
onError: (o) => {
|
|
54
|
-
|
|
65
|
+
n.error((o == null ? void 0 : o.message) || s("pages.login.error"));
|
|
55
66
|
}
|
|
56
67
|
}), y = () => {
|
|
57
68
|
x(t);
|
|
58
69
|
};
|
|
59
70
|
return () => {
|
|
60
|
-
var
|
|
71
|
+
var p, u, c, d, g;
|
|
61
72
|
let o;
|
|
62
73
|
return e("div", {
|
|
63
74
|
"un-cloak": !0,
|
|
64
|
-
class: z(["h-screen w-screen flex items-start justify-center text-secondary md:items-center",
|
|
75
|
+
class: z(["h-screen w-screen flex items-start justify-center text-secondary md:items-center", l.isDark.value ? "app-login-dark-bg" : "app-login-bg"])
|
|
65
76
|
}, [e("div", {
|
|
66
77
|
class: "relative md:m-4 max-w-180 w-full h-full md:h-auto grid-cols-1 md:grid-cols-2 gap-12 overflow-hidden md:rounded-lg p-8 md:shadow bg-default dark:bg-muted grid"
|
|
67
78
|
}, [e("div", {
|
|
68
79
|
class: "flex justify-center tex absolute h-30 w-30 rotate-45 cursor-pointer items-end p-3 text-white bg-primary -right-15 -top-15 hover:bg-primary-hover",
|
|
69
|
-
onClick: () =>
|
|
70
|
-
}, [
|
|
80
|
+
onClick: () => l.toggle()
|
|
81
|
+
}, [l.mode.value === "auto" && e("div", {
|
|
71
82
|
class: "i-tabler:brightness-half h-5 w-5"
|
|
72
|
-
}, null),
|
|
83
|
+
}, null), l.mode.value === "light" && e("div", {
|
|
73
84
|
class: "h-5 w-5 i-tabler:sun"
|
|
74
|
-
}, null),
|
|
85
|
+
}, null), l.mode.value === "dark" && e("div", {
|
|
75
86
|
class: "h-5 w-5 i-tabler:moon"
|
|
76
87
|
}, null)]), e("div", {
|
|
77
88
|
class: "justify-center hidden md:flex flex-row items-center"
|
|
78
|
-
}, [(
|
|
89
|
+
}, [(p = r.config.theme) != null && p.banner ? e("img", {
|
|
79
90
|
class: "w-full h-auto",
|
|
80
|
-
src: (
|
|
91
|
+
src: (u = r.config.theme) == null ? void 0 : u.banner
|
|
81
92
|
}, null) : e("div", {
|
|
82
93
|
class: "w-full h-auto"
|
|
83
94
|
}, [e(M, null, null)])]), e("div", {
|
|
84
95
|
class: "flex flex-col"
|
|
85
96
|
}, [e("div", {
|
|
86
97
|
class: "flex flex-col items-center justify-center mt-4"
|
|
87
|
-
}, [e("div", null, [(c =
|
|
98
|
+
}, [e("div", null, [(c = r.config.theme) != null && c.logo ? e("img", {
|
|
88
99
|
class: "w-auto h-16",
|
|
89
|
-
src: (d =
|
|
100
|
+
src: (d = r.config.theme) == null ? void 0 : d.logo
|
|
90
101
|
}, null) : e("div", {
|
|
91
102
|
class: "h-10"
|
|
92
103
|
}, [e(V, null, null)])]), e("div", {
|
|
93
104
|
class: "mt-4 text-lg text-muted"
|
|
94
|
-
}, [
|
|
105
|
+
}, [r.config.title || "Dux Admin Manage"])]), e("div", {
|
|
95
106
|
class: "my-6"
|
|
96
107
|
}, [e(C, {
|
|
97
108
|
ref: w,
|
|
@@ -107,9 +118,9 @@ const fe = /* @__PURE__ */ k({
|
|
|
107
118
|
}, {
|
|
108
119
|
default: () => [e(v, {
|
|
109
120
|
value: t.username,
|
|
110
|
-
onUpdateValue: (
|
|
121
|
+
onUpdateValue: (m) => t.username = m,
|
|
111
122
|
type: "text",
|
|
112
|
-
placeholder:
|
|
123
|
+
placeholder: s("pages.login.placeholder.username"),
|
|
113
124
|
size: "large"
|
|
114
125
|
}, {
|
|
115
126
|
default: () => e("div", {
|
|
@@ -123,10 +134,10 @@ const fe = /* @__PURE__ */ k({
|
|
|
123
134
|
}, {
|
|
124
135
|
default: () => [e(v, {
|
|
125
136
|
value: t.password,
|
|
126
|
-
onUpdateValue: (
|
|
137
|
+
onUpdateValue: (m) => t.password = m,
|
|
127
138
|
type: "password",
|
|
128
139
|
showPasswordOn: "mousedown",
|
|
129
|
-
placeholder:
|
|
140
|
+
placeholder: s("pages.login.placeholder.password"),
|
|
130
141
|
size: "large",
|
|
131
142
|
inputProps: {
|
|
132
143
|
autocomplete: "new-password"
|
|
@@ -136,7 +147,7 @@ const fe = /* @__PURE__ */ k({
|
|
|
136
147
|
class: "text-lg i-tabler:lock"
|
|
137
148
|
}, null)
|
|
138
149
|
})]
|
|
139
|
-
}), (f =
|
|
150
|
+
}), (f = a.default) == null ? void 0 : f.call(a, t), e("div", {
|
|
140
151
|
class: "mb-2 mt-4"
|
|
141
152
|
}, [e(I, {
|
|
142
153
|
type: "primary",
|
|
@@ -144,16 +155,16 @@ const fe = /* @__PURE__ */ k({
|
|
|
144
155
|
block: !0,
|
|
145
156
|
loading: b.value,
|
|
146
157
|
onClick: y
|
|
147
|
-
}, O(o =
|
|
158
|
+
}, O(o = s("pages.login.buttons.login")) ? o : {
|
|
148
159
|
default: () => [o]
|
|
149
160
|
})])];
|
|
150
161
|
}
|
|
151
162
|
})]), e("div", {
|
|
152
163
|
class: "text-center text-sm text-gray-5"
|
|
153
|
-
}, [((g =
|
|
164
|
+
}, [((g = r.config) == null ? void 0 : g.copyright) || "All rights reserved © duxweb 2024"])])])]);
|
|
154
165
|
};
|
|
155
166
|
}
|
|
156
167
|
});
|
|
157
168
|
export {
|
|
158
|
-
|
|
169
|
+
Ne as DuxLoginPage
|
|
159
170
|
};
|
|
@@ -31,7 +31,18 @@ import U from "./button.js";
|
|
|
31
31
|
import "vue-command-palette";
|
|
32
32
|
import "../page404.js";
|
|
33
33
|
import "@iconify-json/tabler/icons.json";
|
|
34
|
-
|
|
34
|
+
import "vue3-ace-editor";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
36
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
37
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
38
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
40
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
41
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
42
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
43
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
44
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
45
|
+
const Ne = /* @__PURE__ */ $({
|
|
35
46
|
name: "DuxMenuAvatar",
|
|
36
47
|
props: {
|
|
37
48
|
collapsed: {
|
|
@@ -54,52 +65,52 @@ const fe = /* @__PURE__ */ $({
|
|
|
54
65
|
colorMapping: p,
|
|
55
66
|
setColor: d,
|
|
56
67
|
setMode: z
|
|
57
|
-
} = R(), a = (
|
|
68
|
+
} = R(), a = (l, r) => e("div", {
|
|
58
69
|
class: "flex gap-2 items-center w-30"
|
|
59
70
|
}, [e("div", {
|
|
60
71
|
class: "flex-1 min-w-0"
|
|
61
|
-
}, [
|
|
72
|
+
}, [l]), e("div", null, [r && e("div", {
|
|
62
73
|
class: "i-tabler:check"
|
|
63
|
-
}, null)])]),
|
|
64
|
-
class: `${
|
|
74
|
+
}, null)])]), i = (l) => e("div", {
|
|
75
|
+
class: `${l} size-4`
|
|
65
76
|
}, null), D = g(() => {
|
|
66
77
|
var r;
|
|
67
|
-
const
|
|
68
|
-
label: t(
|
|
69
|
-
key:
|
|
70
|
-
icon: () =>
|
|
71
|
-
path:
|
|
78
|
+
const l = (r = x.userMenus) == null ? void 0 : r.map((o) => ({
|
|
79
|
+
label: t(o.label || "", {}, o.label),
|
|
80
|
+
key: o.key,
|
|
81
|
+
icon: () => i(o.icon),
|
|
82
|
+
path: o.path
|
|
72
83
|
}));
|
|
73
|
-
return (
|
|
84
|
+
return (l == null ? void 0 : l.length) > 0 ? [...l, {
|
|
74
85
|
type: "divider"
|
|
75
86
|
}] : [];
|
|
76
|
-
}),
|
|
77
|
-
var
|
|
87
|
+
}), s = I(), N = g(() => {
|
|
88
|
+
var l, r;
|
|
78
89
|
return [{
|
|
79
90
|
key: "header",
|
|
80
91
|
type: "render",
|
|
81
92
|
render: () => {
|
|
82
|
-
var
|
|
93
|
+
var o, c, n;
|
|
83
94
|
return e("div", {
|
|
84
95
|
class: "flex gap-2 px-3 pb-1 pt-1 items-center "
|
|
85
96
|
}, [e(b, {
|
|
86
97
|
round: !0,
|
|
87
98
|
size: 28,
|
|
88
|
-
src: (
|
|
99
|
+
src: (o = s.info) == null ? void 0 : o.avatar
|
|
89
100
|
}, null), e("div", {
|
|
90
101
|
class: "flex flex-col"
|
|
91
102
|
}, [e("div", {
|
|
92
103
|
class: "text-sm font-medium"
|
|
93
|
-
}, [(c =
|
|
104
|
+
}, [(c = s.info) == null ? void 0 : c.nickname]), e("div", {
|
|
94
105
|
class: "text-xs text-muted"
|
|
95
|
-
}, [(n =
|
|
106
|
+
}, [(n = s.info) == null ? void 0 : n.username])])]);
|
|
96
107
|
}
|
|
97
108
|
}, {
|
|
98
109
|
type: "divider"
|
|
99
110
|
}, ...D.value, {
|
|
100
111
|
label: t("components.menu.language"),
|
|
101
112
|
key: "locale",
|
|
102
|
-
icon: () =>
|
|
113
|
+
icon: () => i("i-tabler:language"),
|
|
103
114
|
children: [{
|
|
104
115
|
label: () => a(t("components.menu.chinese"), u.getLocale() === "zh-CN"),
|
|
105
116
|
key: "locale.zh-CN"
|
|
@@ -110,7 +121,7 @@ const fe = /* @__PURE__ */ $({
|
|
|
110
121
|
}, {
|
|
111
122
|
label: t("components.menu.color"),
|
|
112
123
|
key: "color",
|
|
113
|
-
icon: () =>
|
|
124
|
+
icon: () => i("i-tabler:palette"),
|
|
114
125
|
children: [{
|
|
115
126
|
label: () => e("div", {
|
|
116
127
|
class: "flex gap-2 items-center w-30"
|
|
@@ -121,16 +132,16 @@ const fe = /* @__PURE__ */ $({
|
|
|
121
132
|
}
|
|
122
133
|
}, null), e("div", null, [t("components.menu.primaryColor")])]),
|
|
123
134
|
key: "color.primary",
|
|
124
|
-
children: (
|
|
135
|
+
children: (l = M.value) == null ? void 0 : l.map((o) => ({
|
|
125
136
|
label: () => a(e("div", {
|
|
126
137
|
class: "flex gap-2 items-center"
|
|
127
138
|
}, [e("div", {
|
|
128
139
|
class: "size-2 rounded-full",
|
|
129
140
|
style: {
|
|
130
|
-
backgroundColor: `rgb(var(--base-color-${
|
|
141
|
+
backgroundColor: `rgb(var(--base-color-${o}-500))`
|
|
131
142
|
}
|
|
132
|
-
}, null), e("div", null, [
|
|
133
|
-
key: `color.primary.${
|
|
143
|
+
}, null), e("div", null, [o])]), p.value.primary === o),
|
|
144
|
+
key: `color.primary.${o}`
|
|
134
145
|
}))
|
|
135
146
|
}, {
|
|
136
147
|
label: () => e("div", {
|
|
@@ -142,22 +153,22 @@ const fe = /* @__PURE__ */ $({
|
|
|
142
153
|
}
|
|
143
154
|
}, null), e("div", null, [t("components.menu.neutralColor")])]),
|
|
144
155
|
key: "color.neutral",
|
|
145
|
-
children: (r = w.value) == null ? void 0 : r.map((
|
|
156
|
+
children: (r = w.value) == null ? void 0 : r.map((o) => ({
|
|
146
157
|
label: () => a(e("div", {
|
|
147
158
|
class: "flex gap-2 items-center"
|
|
148
159
|
}, [e("div", {
|
|
149
160
|
class: "size-2 rounded-full",
|
|
150
161
|
style: {
|
|
151
|
-
backgroundColor: `rgb(var(--base-color-${
|
|
162
|
+
backgroundColor: `rgb(var(--base-color-${o}-600))`
|
|
152
163
|
}
|
|
153
|
-
}, null), e("div", null, [
|
|
154
|
-
key: `color.neutral.${
|
|
164
|
+
}, null), e("div", null, [o])]), p.value.gray === o),
|
|
165
|
+
key: `color.neutral.${o}`
|
|
155
166
|
}))
|
|
156
167
|
}]
|
|
157
168
|
}, {
|
|
158
169
|
label: t("components.menu.theme"),
|
|
159
170
|
key: "theme",
|
|
160
|
-
icon: () =>
|
|
171
|
+
icon: () => i("i-tabler:brightness-half"),
|
|
161
172
|
children: [{
|
|
162
173
|
label: () => a(t("components.menu.followSystem"), m.value === "auto"),
|
|
163
174
|
key: "theme.auto"
|
|
@@ -173,11 +184,11 @@ const fe = /* @__PURE__ */ $({
|
|
|
173
184
|
}, {
|
|
174
185
|
label: t("components.menu.logout"),
|
|
175
186
|
key: "logout",
|
|
176
|
-
icon: () =>
|
|
187
|
+
icon: () => i("i-tabler:logout")
|
|
177
188
|
}];
|
|
178
189
|
});
|
|
179
|
-
function S(
|
|
180
|
-
const
|
|
190
|
+
function S(l, r) {
|
|
191
|
+
const o = l.lastIndexOf("."), [c, n] = o === -1 ? [l, ""] : [l.substring(0, o), l.substring(o + 1)];
|
|
181
192
|
switch (c) {
|
|
182
193
|
case "locale":
|
|
183
194
|
u.changeLocale(n);
|
|
@@ -211,12 +222,12 @@ const fe = /* @__PURE__ */ $({
|
|
|
211
222
|
collapsed: h.collapsed
|
|
212
223
|
}, {
|
|
213
224
|
icon: () => {
|
|
214
|
-
var
|
|
225
|
+
var l;
|
|
215
226
|
return e(b, {
|
|
216
227
|
class: "group-hover:shadow-lg",
|
|
217
228
|
round: !0,
|
|
218
229
|
size: 28,
|
|
219
|
-
src: (
|
|
230
|
+
src: (l = s.info) == null ? void 0 : l.avatar
|
|
220
231
|
}, null);
|
|
221
232
|
},
|
|
222
233
|
default: () => e("div", {
|
|
@@ -231,5 +242,5 @@ const fe = /* @__PURE__ */ $({
|
|
|
231
242
|
}
|
|
232
243
|
});
|
|
233
244
|
export {
|
|
234
|
-
|
|
245
|
+
Ne as default
|
|
235
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as n, createVNode as a } from "vue";
|
|
2
2
|
import "@duxweb/dvha-core";
|
|
3
3
|
import "naive-ui";
|
|
4
4
|
import "vue-router";
|
|
@@ -26,10 +26,21 @@ import "@duxweb/dvha-naiveui";
|
|
|
26
26
|
import "../page404.js";
|
|
27
27
|
import "@iconify-json/tabler/icons.json";
|
|
28
28
|
import "mime";
|
|
29
|
+
import "vue3-ace-editor";
|
|
30
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
35
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
37
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
29
40
|
import "dayjs";
|
|
30
41
|
import "@tanstack/vue-query";
|
|
31
42
|
import { useUI as l } from "../../hooks/ui.js";
|
|
32
|
-
const
|
|
43
|
+
const _ = /* @__PURE__ */ n({
|
|
33
44
|
name: "DuxMenuButton",
|
|
34
45
|
props: {
|
|
35
46
|
class: {
|
|
@@ -50,8 +61,8 @@ const K = /* @__PURE__ */ p({
|
|
|
50
61
|
default: !1
|
|
51
62
|
}
|
|
52
63
|
},
|
|
53
|
-
setup(
|
|
54
|
-
slots:
|
|
64
|
+
setup(t, {
|
|
65
|
+
slots: e
|
|
55
66
|
}) {
|
|
56
67
|
const {
|
|
57
68
|
menuCollapsed: o,
|
|
@@ -59,18 +70,18 @@ const K = /* @__PURE__ */ p({
|
|
|
59
70
|
} = l();
|
|
60
71
|
return () => {
|
|
61
72
|
var r, m;
|
|
62
|
-
return
|
|
73
|
+
return a("div", {
|
|
63
74
|
onClick: () => {
|
|
64
|
-
var
|
|
65
|
-
(
|
|
75
|
+
var p;
|
|
76
|
+
(p = t.onClick) == null || p.call(t);
|
|
66
77
|
},
|
|
67
|
-
class: ["flex items-center gap-1 justify-center py-1 px-2 cursor-pointer gap-2",
|
|
68
|
-
}, [(r =
|
|
69
|
-
class: ["overflow-hidden ease-in-out whitespace-nowrap text-left min-w-0 flex-1",
|
|
70
|
-
}, [(m =
|
|
78
|
+
class: ["flex items-center gap-1 justify-center py-1 px-2 cursor-pointer gap-2", t.class, o.value && !i.value ? "group" : "hover:shadow-xs hover:bg-default flex-1 w-full", t.inverted ? "transition-all duration-300 bg-inverted/5 rounded-full hover:bg-default hover:shadow-xs" : " rounded-md"]
|
|
79
|
+
}, [(r = e.icon) == null ? void 0 : r.call(e), t.collapsed === !1 && !o.value && !i.value && a("div", {
|
|
80
|
+
class: ["overflow-hidden ease-in-out whitespace-nowrap text-left min-w-0 flex-1", t.inverted ? "text-default" : ""]
|
|
81
|
+
}, [(m = e.default) == null ? void 0 : m.call(e)])]);
|
|
71
82
|
};
|
|
72
83
|
}
|
|
73
84
|
});
|
|
74
85
|
export {
|
|
75
|
-
|
|
86
|
+
_ as default
|
|
76
87
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as M, ref as d, watch as
|
|
1
|
+
import { defineComponent as M, ref as d, watch as u, computed as w, createVNode as t, Fragment as V, createTextVNode as B } from "vue";
|
|
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
5
|
import { NTag as y, NButton as G } from "naive-ui";
|
|
6
|
-
import { Command as
|
|
6
|
+
import { Command as i } from "vue-command-palette";
|
|
7
7
|
import { useRouter as L } from "vue-router";
|
|
8
8
|
import "@overlastic/vue";
|
|
9
9
|
import "clsx";
|
|
@@ -26,36 +26,47 @@ import "@duxweb/dvha-naiveui";
|
|
|
26
26
|
import "../page404.js";
|
|
27
27
|
import "@iconify-json/tabler/icons.json";
|
|
28
28
|
import "mime";
|
|
29
|
+
import "vue3-ace-editor";
|
|
30
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
35
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
37
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
29
40
|
import "dayjs";
|
|
30
41
|
import "@tanstack/vue-query";
|
|
31
42
|
import { useUI as q } from "../../hooks/ui.js";
|
|
32
|
-
const
|
|
43
|
+
const we = /* @__PURE__ */ M({
|
|
33
44
|
name: "DuxMenuCmd",
|
|
34
45
|
setup() {
|
|
35
46
|
const {
|
|
36
|
-
cmdVisible:
|
|
47
|
+
cmdVisible: v,
|
|
37
48
|
setCmdVisible: s
|
|
38
|
-
} = q(), f = R(), S = f["Meta+K"], c = d(),
|
|
39
|
-
setMode:
|
|
40
|
-
} = T(),
|
|
49
|
+
} = q(), f = R(), S = f["Meta+K"], c = d(), n = d([]), C = L(), o = D(), {
|
|
50
|
+
setMode: b
|
|
51
|
+
} = T(), m = d(""), {
|
|
41
52
|
t: a
|
|
42
53
|
} = K(), g = d(), x = (e) => {
|
|
43
54
|
const l = o.routes.filter((r) => r.parent === e);
|
|
44
|
-
c.value = e,
|
|
55
|
+
c.value = e, n.value = l;
|
|
45
56
|
}, N = () => {
|
|
46
57
|
s(!0);
|
|
47
58
|
}, z = () => {
|
|
48
59
|
s(!1);
|
|
49
60
|
}, I = (e) => {
|
|
50
|
-
e ?
|
|
61
|
+
e ? n.value = [...E(o.routes).filter((l) => {
|
|
51
62
|
var r;
|
|
52
63
|
return (r = l.label) == null ? void 0 : r.includes(e);
|
|
53
|
-
})] :
|
|
64
|
+
})] : n.value = o.routes.filter((l) => !l.parent);
|
|
54
65
|
};
|
|
55
|
-
|
|
56
|
-
e ?
|
|
57
|
-
}), j(
|
|
58
|
-
I(
|
|
66
|
+
u(v, (e) => {
|
|
67
|
+
e ? n.value = o.routes.filter((l) => !l.parent) : n.value = o.routes.filter((l) => !l.parent);
|
|
68
|
+
}), j(m, () => {
|
|
69
|
+
I(m.value);
|
|
59
70
|
}, {
|
|
60
71
|
throttle: 500
|
|
61
72
|
});
|
|
@@ -63,16 +74,16 @@ const pe = /* @__PURE__ */ M({
|
|
|
63
74
|
const e = o.routes.find((l) => l.name === c.value);
|
|
64
75
|
x(e == null ? void 0 : e.parent);
|
|
65
76
|
};
|
|
66
|
-
|
|
77
|
+
u(S, (e) => {
|
|
67
78
|
e && N();
|
|
68
|
-
}),
|
|
79
|
+
}), u(f.Escape, (e) => {
|
|
69
80
|
e && s(!1);
|
|
70
|
-
}),
|
|
71
|
-
e &&
|
|
72
|
-
}),
|
|
81
|
+
}), u(f.Backspace, (e) => {
|
|
82
|
+
e && m.value === "" && c.value && k();
|
|
83
|
+
}), u(g, (e) => {
|
|
73
84
|
e && e.focus();
|
|
74
85
|
});
|
|
75
|
-
const h = w(() =>
|
|
86
|
+
const h = w(() => n.value.filter((e) => e.hidden === void 0 || e.hidden === !1)), p = (e) => t(i.Item, {
|
|
76
87
|
onSelect: e == null ? void 0 : e.onSelect
|
|
77
88
|
}, {
|
|
78
89
|
default: () => [t("div", {
|
|
@@ -87,8 +98,8 @@ const pe = /* @__PURE__ */ M({
|
|
|
87
98
|
default: () => [e == null ? void 0 : e.keyName]
|
|
88
99
|
})])])]
|
|
89
100
|
});
|
|
90
|
-
return () => t(
|
|
91
|
-
visible:
|
|
101
|
+
return () => t(i.Dialog, {
|
|
102
|
+
visible: v.value,
|
|
92
103
|
theme: "command-palette"
|
|
93
104
|
}, {
|
|
94
105
|
header: () => t("div", {
|
|
@@ -97,7 +108,7 @@ const pe = /* @__PURE__ */ M({
|
|
|
97
108
|
ref: g,
|
|
98
109
|
placeholder: a("common.search"),
|
|
99
110
|
onInput: (e) => {
|
|
100
|
-
|
|
111
|
+
m.value = e.target.value;
|
|
101
112
|
},
|
|
102
113
|
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"
|
|
103
114
|
}, null), t("span", {
|
|
@@ -122,15 +133,15 @@ const pe = /* @__PURE__ */ M({
|
|
|
122
133
|
"aria-hidden": "true"
|
|
123
134
|
}, null)
|
|
124
135
|
})])]),
|
|
125
|
-
body: () => t(V, null, [h.value.length === 0 &&
|
|
136
|
+
body: () => t(V, null, [h.value.length === 0 && m.value && t("div", {
|
|
126
137
|
class: "flex items-center justify-center h-20 border-t border-muted"
|
|
127
|
-
}, [a("common.empty")]), h.value.length > 0 && t(
|
|
128
|
-
default: () => [t(
|
|
138
|
+
}, [a("common.empty")]), h.value.length > 0 && t(i.List, null, {
|
|
139
|
+
default: () => [t(i.Group, {
|
|
129
140
|
heading: a("common.menu")
|
|
130
141
|
}, {
|
|
131
142
|
default: () => {
|
|
132
143
|
var e;
|
|
133
|
-
return [(e = h.value) == null ? void 0 : e.map((l, r) => t(
|
|
144
|
+
return [(e = h.value) == null ? void 0 : e.map((l, r) => t(i.Item, {
|
|
134
145
|
key: r,
|
|
135
146
|
onSelect: () => {
|
|
136
147
|
l.path ? (C.push(l.path), z()) : x(l.name);
|
|
@@ -141,25 +152,25 @@ const pe = /* @__PURE__ */ M({
|
|
|
141
152
|
}, null), l.label]
|
|
142
153
|
}))];
|
|
143
154
|
}
|
|
144
|
-
}), t(
|
|
155
|
+
}), t(i.Separator, null, null), c.value ? t(p, {
|
|
145
156
|
icon: "i-tabler:arrow-left",
|
|
146
157
|
label: a("common.back"),
|
|
147
158
|
onSelect: k,
|
|
148
159
|
keyName: "Backspace"
|
|
149
|
-
}, null) : t(
|
|
160
|
+
}, null) : t(i.Group, {
|
|
150
161
|
heading: a("common.theme")
|
|
151
162
|
}, {
|
|
152
|
-
default: () => [t(
|
|
163
|
+
default: () => [t(p, {
|
|
153
164
|
icon: "i-tabler:moon",
|
|
154
165
|
label: a("common.dark"),
|
|
155
166
|
onSelect: () => {
|
|
156
|
-
|
|
167
|
+
b("dark");
|
|
157
168
|
}
|
|
158
|
-
}, null), t(
|
|
169
|
+
}, null), t(p, {
|
|
159
170
|
icon: "i-tabler:sun",
|
|
160
171
|
label: a("common.light"),
|
|
161
172
|
onSelect: () => {
|
|
162
|
-
|
|
173
|
+
b("light");
|
|
163
174
|
}
|
|
164
175
|
}, null)]
|
|
165
176
|
})]
|
|
@@ -168,5 +179,5 @@ const pe = /* @__PURE__ */ M({
|
|
|
168
179
|
}
|
|
169
180
|
});
|
|
170
181
|
export {
|
|
171
|
-
|
|
182
|
+
we as DuxMenuCmd
|
|
172
183
|
};
|