@duxweb/dvha-pro 1.0.32 → 1.0.34
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/chart/echart.cjs +1 -1
- 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/designEditor/components/grid.cjs +1 -1
- package/dist/cjs/components/designEditor/editor/hook.cjs +1 -1
- package/dist/cjs/components/designEditor/editor/setting.cjs +1 -1
- package/dist/cjs/components/designEditor/editor.cjs +1 -1
- package/dist/cjs/components/form/drawerForm.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/pageTabForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/formEditor/base/base.cjs +1 -1
- package/dist/cjs/components/formEditor/base/setting.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascader.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -1
- package/dist/cjs/components/formEditor/components/color.cjs +1 -1
- package/dist/cjs/components/formEditor/components/date.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -1
- package/dist/cjs/components/formEditor/components/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/components/fileUpload.cjs +1 -0
- package/dist/cjs/components/formEditor/components/imageUpload.cjs +1 -0
- package/dist/cjs/components/formEditor/components/input.cjs +1 -1
- package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -1
- package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/radio.cjs +1 -1
- package/dist/cjs/components/formEditor/components/region.cjs +1 -1
- package/dist/cjs/components/formEditor/components/select.cjs +1 -1
- package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/sider.cjs +1 -1
- package/dist/cjs/components/formEditor/components/switch.cjs +1 -1
- package/dist/cjs/components/formEditor/components/time.cjs +1 -1
- package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/renderer.cjs +1 -1
- package/dist/cjs/components/icon/icon.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/level/level.cjs +1 -1
- package/dist/cjs/components/posterEditor/pages/RightPanel.cjs +1 -1
- package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- 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/config/echart.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/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/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/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +2 -1
- package/dist/esm/component.js +11 -11
- package/dist/esm/components/chart/echart.js +17 -3
- package/dist/esm/components/crop/imageCrop.js +27 -13
- package/dist/esm/components/data/dynamicSelect.js +34 -20
- package/dist/esm/components/data/selectModal.js +42 -28
- package/dist/esm/components/designEditor/components/grid.js +40 -26
- package/dist/esm/components/designEditor/editor/hook.js +17 -17
- package/dist/esm/components/designEditor/editor/setting.js +36 -22
- package/dist/esm/components/designEditor/editor.js +6 -6
- package/dist/esm/components/form/drawerForm.js +32 -18
- package/dist/esm/components/form/modalForm.js +31 -17
- package/dist/esm/components/form/pageForm.js +41 -27
- package/dist/esm/components/form/pageTabForm.js +31 -17
- package/dist/esm/components/form/settingForm.js +33 -19
- package/dist/esm/components/formEditor/base/base.js +30 -16
- package/dist/esm/components/formEditor/base/setting.js +21 -7
- package/dist/esm/components/formEditor/components/cascader.js +66 -52
- package/dist/esm/components/formEditor/components/cascaderAsync.js +96 -82
- package/dist/esm/components/formEditor/components/checkbox.js +44 -30
- package/dist/esm/components/formEditor/components/color.js +35 -21
- package/dist/esm/components/formEditor/components/date.js +52 -38
- package/dist/esm/components/formEditor/components/dynamicInput.js +43 -29
- package/dist/esm/components/formEditor/components/dynamicTags.js +40 -26
- package/dist/esm/components/formEditor/components/editor.js +24 -10
- package/dist/esm/components/formEditor/components/fileUpload.js +191 -0
- package/dist/esm/components/formEditor/components/imageUpload.js +182 -0
- package/dist/esm/components/formEditor/components/input.js +67 -53
- package/dist/esm/components/formEditor/components/inputNumber.js +38 -24
- package/dist/esm/components/formEditor/components/mentionAsync.js +61 -47
- package/dist/esm/components/formEditor/components/radio.js +29 -15
- package/dist/esm/components/formEditor/components/region.js +38 -24
- package/dist/esm/components/formEditor/components/select.js +17 -3
- package/dist/esm/components/formEditor/components/selectAsync.js +73 -59
- package/dist/esm/components/formEditor/components/sider.js +41 -27
- package/dist/esm/components/formEditor/components/switch.js +34 -20
- package/dist/esm/components/formEditor/components/time.js +61 -47
- package/dist/esm/components/formEditor/components/transferAsync.js +50 -36
- package/dist/esm/components/formEditor/components/treeSelect.js +55 -41
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +75 -61
- package/dist/esm/components/formEditor/editor.js +40 -24
- package/dist/esm/components/formEditor/renderer.js +57 -41
- package/dist/esm/components/icon/icon.js +24 -10
- package/dist/esm/components/layout/list.js +70 -56
- package/dist/esm/components/layout/table.js +38 -24
- package/dist/esm/components/level/level.js +38 -24
- package/dist/esm/components/posterEditor/pages/RightPanel.js +46 -32
- package/dist/esm/components/posterEditor/posterEditor.js +26 -12
- package/dist/esm/components/table/table.js +22 -8
- package/dist/esm/components/upload/file.js +17 -3
- package/dist/esm/components/upload/image.js +44 -30
- package/dist/esm/components/upload/manage/item.js +27 -13
- package/dist/esm/components/upload/manager.js +18 -4
- package/dist/esm/config/echart.js +1 -1
- package/dist/esm/hooks/dialog.js +16 -2
- package/dist/esm/hooks/drawer.js +16 -2
- package/dist/esm/hooks/modal.js +16 -2
- package/dist/esm/hooks/table/image.js +20 -6
- package/dist/esm/hooks/table/media.js +20 -6
- package/dist/esm/langs/en-US.json.js +5 -5
- package/dist/esm/langs/zh-CN.json.js +6 -6
- package/dist/esm/pages/authLayout.js +1 -1
- package/dist/esm/pages/layout/global.js +52 -37
- package/dist/esm/pages/layout/page.js +27 -13
- package/dist/esm/pages/login.js +33 -19
- package/dist/esm/pages/menu/avatar.js +46 -32
- package/dist/esm/pages/menu/button.js +23 -9
- package/dist/esm/pages/menu/cmd.js +52 -38
- package/dist/esm/pages/menu/main.js +43 -29
- package/dist/esm/pages/menu/mobile.js +17 -3
- package/dist/esm/pages/page404.js +14 -0
- package/dist/esm/pages/pageStatus.js +18 -4
- package/dist/esm/theme/uno.css.js +2 -1
- package/dist/types/components/formEditor/components/fileUpload.d.ts +2 -0
- package/dist/types/components/formEditor/components/imageUpload.d.ts +2 -0
- package/dist/types/components/formEditor/components/index.d.ts +4 -2
- package/package.json +5 -3
|
@@ -1,59 +1,74 @@
|
|
|
1
|
-
import { defineComponent as C, inject as T, onBeforeMount as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { setLocale as
|
|
4
|
-
import { hex2hsl as
|
|
5
|
-
import { registerTheme as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as C, inject as T, onBeforeMount as j, computed as i, watch as m, onMounted as y, createVNode as o } from "vue";
|
|
2
|
+
import { useTheme as b, useI18n as k } from "@duxweb/dvha-core";
|
|
3
|
+
import { setLocale as x } from "@vee-validate/i18n";
|
|
4
|
+
import { hex2hsl as w } from "colorizr";
|
|
5
|
+
import { registerTheme as P } from "echarts";
|
|
6
|
+
import e from "highlight.js/lib/core";
|
|
7
|
+
import D from "highlight.js/lib/languages/bash";
|
|
8
|
+
import M from "highlight.js/lib/languages/css";
|
|
9
|
+
import O from "highlight.js/lib/languages/go";
|
|
10
|
+
import z from "highlight.js/lib/languages/java";
|
|
11
|
+
import B from "highlight.js/lib/languages/javascript";
|
|
12
|
+
import S from "highlight.js/lib/languages/json";
|
|
13
|
+
import q from "highlight.js/lib/languages/markdown";
|
|
14
|
+
import G from "highlight.js/lib/languages/php";
|
|
15
|
+
import I from "highlight.js/lib/languages/python";
|
|
16
|
+
import U from "highlight.js/lib/languages/shell";
|
|
17
|
+
import E from "highlight.js/lib/languages/sql";
|
|
18
|
+
import F from "highlight.js/lib/languages/typescript";
|
|
19
|
+
import R from "highlight.js/lib/languages/xml";
|
|
20
|
+
import { useLoadingBar as V, zhCN as Z, enUS as _, dateZhCN as A, dateEnUS as H, NConfigProvider as J, darkTheme as K, lightTheme as Q, NModalProvider as W, NDialogProvider as X, NNotificationProvider as Y, NMessageProvider as $ } from "naive-ui";
|
|
21
|
+
import { generateRainbowFromColor as ee, getTheme as re } from "../../config/echart.js";
|
|
8
22
|
import "@unocss/preset-icons/browser";
|
|
9
23
|
import "@unocss/preset-typography";
|
|
10
24
|
import "unocss/preset-wind4";
|
|
11
|
-
import { themeOverrides as
|
|
25
|
+
import { themeOverrides as oe } from "../../theme/naiveTheme.js";
|
|
12
26
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
13
27
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
14
28
|
import "vee-validate";
|
|
15
|
-
const
|
|
29
|
+
const ze = /* @__PURE__ */ C({
|
|
16
30
|
name: "DuxGlobalLayout",
|
|
17
|
-
setup(
|
|
31
|
+
setup(te, {
|
|
18
32
|
slots: n
|
|
19
33
|
}) {
|
|
20
34
|
const {
|
|
21
35
|
isDark: t,
|
|
22
|
-
cssInit:
|
|
23
|
-
getSceneColor:
|
|
24
|
-
} =
|
|
25
|
-
lightTheme:
|
|
26
|
-
darkTheme:
|
|
27
|
-
} =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
36
|
+
cssInit: s,
|
|
37
|
+
getSceneColor: g
|
|
38
|
+
} = b(), l = T("pageLoading"), u = V(), {
|
|
39
|
+
lightTheme: p,
|
|
40
|
+
darkTheme: f
|
|
41
|
+
} = oe();
|
|
42
|
+
j(() => {
|
|
43
|
+
s();
|
|
44
|
+
}), e.registerLanguage("javascript", B), e.registerLanguage("typescript", F), e.registerLanguage("css", M), e.registerLanguage("xml", R), e.registerLanguage("json", S), e.registerLanguage("markdown", q), e.registerLanguage("bash", D), e.registerLanguage("shell", U), e.registerLanguage("sql", E), e.registerLanguage("java", z), e.registerLanguage("php", G), e.registerLanguage("go", O), e.registerLanguage("python", I);
|
|
31
45
|
const {
|
|
32
|
-
getLocale:
|
|
33
|
-
} =
|
|
34
|
-
return
|
|
35
|
-
|
|
46
|
+
getLocale: a
|
|
47
|
+
} = k(), d = i(() => a() === "zh-CN" ? Z : _), h = i(() => a() === "zh-CN" ? A : H);
|
|
48
|
+
return m(a, (r) => {
|
|
49
|
+
x(r);
|
|
36
50
|
}, {
|
|
37
51
|
immediate: !0
|
|
38
52
|
}), y(async () => {
|
|
39
53
|
setTimeout(() => {
|
|
40
|
-
|
|
54
|
+
u.finish(), l.value = !1;
|
|
41
55
|
}, 500);
|
|
42
|
-
}),
|
|
43
|
-
const
|
|
44
|
-
|
|
56
|
+
}), m(t, (r) => {
|
|
57
|
+
const c = g("primary"), L = w(c), v = ee(L, 10), N = re(v, r);
|
|
58
|
+
P("default", N);
|
|
45
59
|
}, {
|
|
46
60
|
immediate: !0
|
|
47
|
-
}), () => o(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
61
|
+
}), () => o(J, {
|
|
62
|
+
hljs: e,
|
|
63
|
+
locale: d.value,
|
|
64
|
+
dateLocale: h.value,
|
|
65
|
+
theme: t.value ? K : Q,
|
|
66
|
+
themeOverrides: t.value ? f.value : p.value
|
|
52
67
|
}, {
|
|
53
|
-
default: () => [o(
|
|
54
|
-
default: () => [o(
|
|
55
|
-
default: () => [o(
|
|
56
|
-
default: () => [o(
|
|
68
|
+
default: () => [o(W, null, {
|
|
69
|
+
default: () => [o(X, null, {
|
|
70
|
+
default: () => [o(Y, null, {
|
|
71
|
+
default: () => [o($, null, {
|
|
57
72
|
default: () => [n.default?.()]
|
|
58
73
|
})]
|
|
59
74
|
})]
|
|
@@ -63,5 +78,5 @@ const ae = /* @__PURE__ */ C({
|
|
|
63
78
|
}
|
|
64
79
|
});
|
|
65
80
|
export {
|
|
66
|
-
|
|
81
|
+
ze as DuxGlobalLayout
|
|
67
82
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as l, onMounted as n, onUnmounted as s, createVNode as t } from "vue";
|
|
2
2
|
import { useManage as u, useCheck as a, DuxTabRouterView as c } from "@duxweb/dvha-core";
|
|
3
3
|
import { useIntervalFn as f } from "@vueuse/core";
|
|
4
4
|
import { NButton as d } from "naive-ui";
|
|
@@ -24,6 +24,20 @@ import "vue-draggable-plus";
|
|
|
24
24
|
import "@vee-validate/i18n";
|
|
25
25
|
import "colorizr";
|
|
26
26
|
import "echarts";
|
|
27
|
+
import "highlight.js/lib/core";
|
|
28
|
+
import "highlight.js/lib/languages/bash";
|
|
29
|
+
import "highlight.js/lib/languages/css";
|
|
30
|
+
import "highlight.js/lib/languages/go";
|
|
31
|
+
import "highlight.js/lib/languages/java";
|
|
32
|
+
import "highlight.js/lib/languages/javascript";
|
|
33
|
+
import "highlight.js/lib/languages/json";
|
|
34
|
+
import "highlight.js/lib/languages/markdown";
|
|
35
|
+
import "highlight.js/lib/languages/php";
|
|
36
|
+
import "highlight.js/lib/languages/python";
|
|
37
|
+
import "highlight.js/lib/languages/shell";
|
|
38
|
+
import "highlight.js/lib/languages/sql";
|
|
39
|
+
import "highlight.js/lib/languages/typescript";
|
|
40
|
+
import "highlight.js/lib/languages/xml";
|
|
27
41
|
import "@ant-design/colors";
|
|
28
42
|
import "@unocss/preset-icons/browser";
|
|
29
43
|
import "@unocss/preset-typography";
|
|
@@ -38,32 +52,32 @@ import { DuxPageTab as g } from "./tab.js";
|
|
|
38
52
|
import "../page404.js";
|
|
39
53
|
import "short-unique-id";
|
|
40
54
|
import "aieditor";
|
|
55
|
+
import "mime";
|
|
41
56
|
import "@iconify-json/tabler/icons.json";
|
|
42
57
|
import "../../components/posterEditor/elements/index.js";
|
|
43
58
|
import "fabric";
|
|
44
|
-
import "mime";
|
|
45
59
|
import "dayjs";
|
|
46
60
|
import "@tanstack/vue-query";
|
|
47
61
|
import { useUI as v } from "../../hooks/ui.js";
|
|
48
|
-
const
|
|
62
|
+
const kt = /* @__PURE__ */ l({
|
|
49
63
|
name: "DuxLayoutPage",
|
|
50
64
|
props: {},
|
|
51
65
|
setup() {
|
|
52
66
|
const {
|
|
53
|
-
menuMobileCollapsed:
|
|
54
|
-
setMenuMobileCollapsed:
|
|
67
|
+
menuMobileCollapsed: i,
|
|
68
|
+
setMenuMobileCollapsed: r
|
|
55
69
|
} = v(), {
|
|
56
|
-
config:
|
|
70
|
+
config: e
|
|
57
71
|
} = u(), {
|
|
58
|
-
mutate:
|
|
72
|
+
mutate: o
|
|
59
73
|
} = a(), {
|
|
60
74
|
pause: m,
|
|
61
|
-
resume:
|
|
75
|
+
resume: p
|
|
62
76
|
} = f(() => {
|
|
63
|
-
|
|
77
|
+
o();
|
|
64
78
|
}, 1e3 * 60 * 10);
|
|
65
79
|
return n(() => {
|
|
66
|
-
|
|
80
|
+
o(), p();
|
|
67
81
|
}), s(() => {
|
|
68
82
|
m();
|
|
69
83
|
}), () => t("div", {
|
|
@@ -74,14 +88,14 @@ const at = /* @__PURE__ */ p({
|
|
|
74
88
|
class: "flex lg:hidden justify-between items-center px-2 py-2 bg-default dark:bg-muted shadow-xs relative"
|
|
75
89
|
}, [t(d, {
|
|
76
90
|
text: !0,
|
|
77
|
-
onClick: () =>
|
|
91
|
+
onClick: () => r(!i.value)
|
|
78
92
|
}, {
|
|
79
93
|
default: () => [t("div", {
|
|
80
94
|
class: "i-tabler:menu-2 size-6"
|
|
81
95
|
}, null)]
|
|
82
96
|
}), t("div", {
|
|
83
97
|
class: "w-full absolute inset-0 flex items-center justify-center text-base pointer-events-none"
|
|
84
|
-
}, [
|
|
98
|
+
}, [e.title]), t("div", null, [t(x, {
|
|
85
99
|
collapsed: !0
|
|
86
100
|
}, null)])]), t("div", {
|
|
87
101
|
class: "flex-1 py-2"
|
|
@@ -91,5 +105,5 @@ const at = /* @__PURE__ */ p({
|
|
|
91
105
|
}
|
|
92
106
|
});
|
|
93
107
|
export {
|
|
94
|
-
|
|
108
|
+
kt as DuxLayoutPage
|
|
95
109
|
};
|
package/dist/esm/pages/login.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as h, ref as v, reactive as w, createVNode as e, isVNode as x } from "vue";
|
|
2
2
|
import { useTheme as b, useManage as y, useI18n as k, useLogin as j, DuxLogo as D } from "@duxweb/dvha-core";
|
|
3
3
|
import L from "clsx";
|
|
4
|
-
import { useMessage as N, NForm as F, NFormItem as
|
|
4
|
+
import { useMessage as N, NForm as F, NFormItem as p, NInput as n, NButton as P } from "naive-ui";
|
|
5
5
|
import "vue-echarts";
|
|
6
6
|
import "vue-router";
|
|
7
7
|
import "@overlastic/vue";
|
|
@@ -30,6 +30,20 @@ import { DuxDrawApps as S } from "../components/draw/drawApps.js";
|
|
|
30
30
|
import "@vee-validate/i18n";
|
|
31
31
|
import "colorizr";
|
|
32
32
|
import "echarts";
|
|
33
|
+
import "highlight.js/lib/core";
|
|
34
|
+
import "highlight.js/lib/languages/bash";
|
|
35
|
+
import "highlight.js/lib/languages/css";
|
|
36
|
+
import "highlight.js/lib/languages/go";
|
|
37
|
+
import "highlight.js/lib/languages/java";
|
|
38
|
+
import "highlight.js/lib/languages/javascript";
|
|
39
|
+
import "highlight.js/lib/languages/json";
|
|
40
|
+
import "highlight.js/lib/languages/markdown";
|
|
41
|
+
import "highlight.js/lib/languages/php";
|
|
42
|
+
import "highlight.js/lib/languages/python";
|
|
43
|
+
import "highlight.js/lib/languages/shell";
|
|
44
|
+
import "highlight.js/lib/languages/sql";
|
|
45
|
+
import "highlight.js/lib/languages/typescript";
|
|
46
|
+
import "highlight.js/lib/languages/xml";
|
|
33
47
|
import "@ant-design/colors";
|
|
34
48
|
import "@unocss/preset-icons/browser";
|
|
35
49
|
import "@unocss/preset-typography";
|
|
@@ -44,16 +58,16 @@ import "aieditor";
|
|
|
44
58
|
import "@iconify-json/tabler/icons.json";
|
|
45
59
|
import "../components/posterEditor/elements/index.js";
|
|
46
60
|
import "fabric";
|
|
47
|
-
function V(
|
|
48
|
-
return typeof
|
|
61
|
+
function V(l) {
|
|
62
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !x(l);
|
|
49
63
|
}
|
|
50
|
-
const
|
|
64
|
+
const _e = /* @__PURE__ */ h({
|
|
51
65
|
name: "DuxLoginPage",
|
|
52
|
-
setup(
|
|
66
|
+
setup(l, {
|
|
53
67
|
slots: u
|
|
54
68
|
}) {
|
|
55
69
|
const r = b(), o = y(), {
|
|
56
|
-
t:
|
|
70
|
+
t: i
|
|
57
71
|
} = k(), c = v(), m = N(), t = w({
|
|
58
72
|
username: "",
|
|
59
73
|
password: ""
|
|
@@ -62,16 +76,16 @@ const je = /* @__PURE__ */ h({
|
|
|
62
76
|
isLoading: g
|
|
63
77
|
} = j({
|
|
64
78
|
onSuccess: () => {
|
|
65
|
-
m.success(
|
|
79
|
+
m.success(i("pages.login.success"));
|
|
66
80
|
},
|
|
67
|
-
onError: (
|
|
68
|
-
m.error(
|
|
81
|
+
onError: (s) => {
|
|
82
|
+
m.error(s?.message || i("pages.login.error"));
|
|
69
83
|
}
|
|
70
84
|
}), f = () => {
|
|
71
85
|
d(t);
|
|
72
86
|
};
|
|
73
87
|
return () => {
|
|
74
|
-
let
|
|
88
|
+
let s;
|
|
75
89
|
return e("div", {
|
|
76
90
|
class: L(["h-screen w-screen flex items-start justify-center text-secondary md:items-center", r.isDark.value ? "app-login-dark-bg" : "app-login-bg"])
|
|
77
91
|
}, [e("div", {
|
|
@@ -110,33 +124,33 @@ const je = /* @__PURE__ */ h({
|
|
|
110
124
|
model: t,
|
|
111
125
|
class: "flex flex-col gap-4"
|
|
112
126
|
}, {
|
|
113
|
-
default: () => [e(
|
|
127
|
+
default: () => [e(p, {
|
|
114
128
|
showLabel: !1,
|
|
115
129
|
path: "username",
|
|
116
130
|
showFeedback: !1
|
|
117
131
|
}, {
|
|
118
|
-
default: () => [e(
|
|
132
|
+
default: () => [e(n, {
|
|
119
133
|
value: t.username,
|
|
120
134
|
onUpdateValue: (a) => t.username = a,
|
|
121
135
|
type: "text",
|
|
122
|
-
placeholder:
|
|
136
|
+
placeholder: i("pages.login.placeholder.username"),
|
|
123
137
|
size: "large"
|
|
124
138
|
}, {
|
|
125
139
|
default: () => e("div", {
|
|
126
140
|
class: "text-lg i-tabler:user"
|
|
127
141
|
}, null)
|
|
128
142
|
})]
|
|
129
|
-
}), e(
|
|
143
|
+
}), e(p, {
|
|
130
144
|
showLabel: !1,
|
|
131
145
|
path: "password",
|
|
132
146
|
showFeedback: !1
|
|
133
147
|
}, {
|
|
134
|
-
default: () => [e(
|
|
148
|
+
default: () => [e(n, {
|
|
135
149
|
value: t.password,
|
|
136
150
|
onUpdateValue: (a) => t.password = a,
|
|
137
151
|
type: "password",
|
|
138
152
|
showPasswordOn: "mousedown",
|
|
139
|
-
placeholder:
|
|
153
|
+
placeholder: i("pages.login.placeholder.password"),
|
|
140
154
|
size: "large",
|
|
141
155
|
inputProps: {
|
|
142
156
|
autocomplete: "new-password"
|
|
@@ -154,8 +168,8 @@ const je = /* @__PURE__ */ h({
|
|
|
154
168
|
block: !0,
|
|
155
169
|
loading: g.value,
|
|
156
170
|
onClick: f
|
|
157
|
-
}, V(
|
|
158
|
-
default: () => [
|
|
171
|
+
}, V(s = i("pages.login.buttons.login")) ? s : {
|
|
172
|
+
default: () => [s]
|
|
159
173
|
})])]
|
|
160
174
|
})]), e("div", {
|
|
161
175
|
class: "text-center text-sm text-muted"
|
|
@@ -164,5 +178,5 @@ const je = /* @__PURE__ */ h({
|
|
|
164
178
|
}
|
|
165
179
|
});
|
|
166
180
|
export {
|
|
167
|
-
|
|
181
|
+
_e as DuxLoginPage
|
|
168
182
|
};
|
|
@@ -30,6 +30,20 @@ import "vue-draggable-plus";
|
|
|
30
30
|
import "@vee-validate/i18n";
|
|
31
31
|
import "colorizr";
|
|
32
32
|
import "echarts";
|
|
33
|
+
import "highlight.js/lib/core";
|
|
34
|
+
import "highlight.js/lib/languages/bash";
|
|
35
|
+
import "highlight.js/lib/languages/css";
|
|
36
|
+
import "highlight.js/lib/languages/go";
|
|
37
|
+
import "highlight.js/lib/languages/java";
|
|
38
|
+
import "highlight.js/lib/languages/javascript";
|
|
39
|
+
import "highlight.js/lib/languages/json";
|
|
40
|
+
import "highlight.js/lib/languages/markdown";
|
|
41
|
+
import "highlight.js/lib/languages/php";
|
|
42
|
+
import "highlight.js/lib/languages/python";
|
|
43
|
+
import "highlight.js/lib/languages/shell";
|
|
44
|
+
import "highlight.js/lib/languages/sql";
|
|
45
|
+
import "highlight.js/lib/languages/typescript";
|
|
46
|
+
import "highlight.js/lib/languages/xml";
|
|
33
47
|
import "@ant-design/colors";
|
|
34
48
|
import "@unocss/preset-icons/browser";
|
|
35
49
|
import "@unocss/preset-typography";
|
|
@@ -45,7 +59,7 @@ import "aieditor";
|
|
|
45
59
|
import "@iconify-json/tabler/icons.json";
|
|
46
60
|
import "../../components/posterEditor/elements/index.js";
|
|
47
61
|
import "fabric";
|
|
48
|
-
const
|
|
62
|
+
const Fe = /* @__PURE__ */ A({
|
|
49
63
|
name: "DuxMenuAvatar",
|
|
50
64
|
props: {
|
|
51
65
|
collapsed: {
|
|
@@ -65,23 +79,23 @@ const Le = /* @__PURE__ */ A({
|
|
|
65
79
|
mode: m,
|
|
66
80
|
primaryColors: x,
|
|
67
81
|
neutralColors: C,
|
|
68
|
-
colorMapping:
|
|
69
|
-
setColor:
|
|
82
|
+
colorMapping: u,
|
|
83
|
+
setColor: c,
|
|
70
84
|
setMode: M
|
|
71
|
-
} = I(),
|
|
85
|
+
} = I(), l = (o, r) => e("div", {
|
|
72
86
|
class: "flex gap-2 items-center w-30"
|
|
73
87
|
}, [e("div", {
|
|
74
88
|
class: "flex-1 min-w-0"
|
|
75
|
-
}, [o]), e("div", null, [
|
|
89
|
+
}, [o]), e("div", null, [r && e("div", {
|
|
76
90
|
class: "i-tabler:check"
|
|
77
|
-
}, null)])]),
|
|
91
|
+
}, null)])]), i = (o) => e("div", {
|
|
78
92
|
class: `${o} size-4`
|
|
79
93
|
}, null), w = d(() => {
|
|
80
|
-
const o = h.userMenus?.map((
|
|
81
|
-
label: t(
|
|
82
|
-
key:
|
|
83
|
-
icon: () =>
|
|
84
|
-
path:
|
|
94
|
+
const o = h.userMenus?.map((r) => ({
|
|
95
|
+
label: t(r.label || "", {}, r.label),
|
|
96
|
+
key: r.key,
|
|
97
|
+
icon: () => i(r.icon),
|
|
98
|
+
path: r.path
|
|
85
99
|
}));
|
|
86
100
|
return o?.length > 0 ? [...o, {
|
|
87
101
|
type: "divider"
|
|
@@ -107,15 +121,15 @@ const Le = /* @__PURE__ */ A({
|
|
|
107
121
|
}, ...w.value, {
|
|
108
122
|
label: t("components.menu.language"),
|
|
109
123
|
key: "locale",
|
|
110
|
-
icon: () =>
|
|
124
|
+
icon: () => i("i-tabler:language"),
|
|
111
125
|
children: [...(s.getLocales() || []).map((o) => ({
|
|
112
|
-
label: () =>
|
|
126
|
+
label: () => l(t(`locale.${o}`), s.getLocale() === o),
|
|
113
127
|
key: `locale.${o}`
|
|
114
128
|
}))]
|
|
115
129
|
}, {
|
|
116
130
|
label: t("components.menu.color"),
|
|
117
131
|
key: "color",
|
|
118
|
-
icon: () =>
|
|
132
|
+
icon: () => i("i-tabler:palette"),
|
|
119
133
|
children: [{
|
|
120
134
|
label: () => e("div", {
|
|
121
135
|
class: "flex gap-2 items-center w-30"
|
|
@@ -127,14 +141,14 @@ const Le = /* @__PURE__ */ A({
|
|
|
127
141
|
}, null), e("div", null, [t("components.menu.primaryColor")])]),
|
|
128
142
|
key: "color.primary",
|
|
129
143
|
children: x.value?.map((o) => ({
|
|
130
|
-
label: () =>
|
|
144
|
+
label: () => l(e("div", {
|
|
131
145
|
class: "flex gap-2 items-center"
|
|
132
146
|
}, [e("div", {
|
|
133
147
|
class: "size-2 rounded-full",
|
|
134
148
|
style: {
|
|
135
149
|
backgroundColor: `rgb(var(--base-color-${o}-500))`
|
|
136
150
|
}
|
|
137
|
-
}, null), e("div", null, [o])]),
|
|
151
|
+
}, null), e("div", null, [o])]), u.value.primary === o),
|
|
138
152
|
key: `color.primary.${o}`
|
|
139
153
|
}))
|
|
140
154
|
}, {
|
|
@@ -148,29 +162,29 @@ const Le = /* @__PURE__ */ A({
|
|
|
148
162
|
}, null), e("div", null, [t("components.menu.neutralColor")])]),
|
|
149
163
|
key: "color.neutral",
|
|
150
164
|
children: C.value?.map((o) => ({
|
|
151
|
-
label: () =>
|
|
165
|
+
label: () => l(e("div", {
|
|
152
166
|
class: "flex gap-2 items-center"
|
|
153
167
|
}, [e("div", {
|
|
154
168
|
class: "size-2 rounded-full",
|
|
155
169
|
style: {
|
|
156
170
|
backgroundColor: `rgb(var(--base-color-${o}-600))`
|
|
157
171
|
}
|
|
158
|
-
}, null), e("div", null, [o])]),
|
|
172
|
+
}, null), e("div", null, [o])]), u.value.gray === o),
|
|
159
173
|
key: `color.neutral.${o}`
|
|
160
174
|
}))
|
|
161
175
|
}]
|
|
162
176
|
}, {
|
|
163
177
|
label: t("components.menu.theme"),
|
|
164
178
|
key: "theme",
|
|
165
|
-
icon: () =>
|
|
179
|
+
icon: () => i("i-tabler:brightness-half"),
|
|
166
180
|
children: [{
|
|
167
|
-
label: () =>
|
|
181
|
+
label: () => l(t("components.menu.followSystem"), m.value === "auto"),
|
|
168
182
|
key: "theme.auto"
|
|
169
183
|
}, {
|
|
170
|
-
label: () =>
|
|
184
|
+
label: () => l(t("components.menu.lightMode"), m.value === "light"),
|
|
171
185
|
key: "theme.light"
|
|
172
186
|
}, {
|
|
173
|
-
label: () =>
|
|
187
|
+
label: () => l(t("components.menu.darkMode"), m.value === "dark"),
|
|
174
188
|
key: "theme.dark"
|
|
175
189
|
}]
|
|
176
190
|
}, {
|
|
@@ -178,30 +192,30 @@ const Le = /* @__PURE__ */ A({
|
|
|
178
192
|
}, {
|
|
179
193
|
label: t("components.menu.logout"),
|
|
180
194
|
key: "logout",
|
|
181
|
-
icon: () =>
|
|
195
|
+
icon: () => i("i-tabler:logout")
|
|
182
196
|
}]);
|
|
183
|
-
function $(o,
|
|
184
|
-
const
|
|
197
|
+
function $(o, r) {
|
|
198
|
+
const p = o.lastIndexOf("."), [D, n] = p === -1 ? [o, ""] : [o.substring(0, p), o.substring(p + 1)];
|
|
185
199
|
switch (D) {
|
|
186
200
|
case "locale":
|
|
187
|
-
s.changeLocale(
|
|
201
|
+
s.changeLocale(n);
|
|
188
202
|
break;
|
|
189
203
|
case "color.primary":
|
|
190
|
-
|
|
204
|
+
c("primary", n);
|
|
191
205
|
break;
|
|
192
206
|
case "color.neutral":
|
|
193
|
-
|
|
207
|
+
c("gray", n);
|
|
194
208
|
break;
|
|
195
209
|
case "theme":
|
|
196
|
-
M(
|
|
210
|
+
M(n);
|
|
197
211
|
break;
|
|
198
212
|
case "logout":
|
|
199
213
|
k();
|
|
200
214
|
break;
|
|
201
215
|
default:
|
|
202
|
-
if (!
|
|
216
|
+
if (!r?.path)
|
|
203
217
|
return;
|
|
204
|
-
b.push(y(
|
|
218
|
+
b.push(y(r.path));
|
|
205
219
|
}
|
|
206
220
|
}
|
|
207
221
|
return () => e(B, {
|
|
@@ -232,5 +246,5 @@ const Le = /* @__PURE__ */ A({
|
|
|
232
246
|
}
|
|
233
247
|
});
|
|
234
248
|
export {
|
|
235
|
-
|
|
249
|
+
Fe as default
|
|
236
250
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, createVNode as
|
|
1
|
+
import { defineComponent as p, createVNode as e } from "vue";
|
|
2
2
|
import "@duxweb/dvha-core";
|
|
3
3
|
import "naive-ui";
|
|
4
4
|
import "vue-router";
|
|
@@ -24,6 +24,20 @@ import "vue-draggable-plus";
|
|
|
24
24
|
import "@vee-validate/i18n";
|
|
25
25
|
import "colorizr";
|
|
26
26
|
import "echarts";
|
|
27
|
+
import "highlight.js/lib/core";
|
|
28
|
+
import "highlight.js/lib/languages/bash";
|
|
29
|
+
import "highlight.js/lib/languages/css";
|
|
30
|
+
import "highlight.js/lib/languages/go";
|
|
31
|
+
import "highlight.js/lib/languages/java";
|
|
32
|
+
import "highlight.js/lib/languages/javascript";
|
|
33
|
+
import "highlight.js/lib/languages/json";
|
|
34
|
+
import "highlight.js/lib/languages/markdown";
|
|
35
|
+
import "highlight.js/lib/languages/php";
|
|
36
|
+
import "highlight.js/lib/languages/python";
|
|
37
|
+
import "highlight.js/lib/languages/shell";
|
|
38
|
+
import "highlight.js/lib/languages/sql";
|
|
39
|
+
import "highlight.js/lib/languages/typescript";
|
|
40
|
+
import "highlight.js/lib/languages/xml";
|
|
27
41
|
import "@ant-design/colors";
|
|
28
42
|
import "@unocss/preset-icons/browser";
|
|
29
43
|
import "@unocss/preset-typography";
|
|
@@ -36,14 +50,14 @@ import "@duxweb/dvha-naiveui";
|
|
|
36
50
|
import "../page404.js";
|
|
37
51
|
import "short-unique-id";
|
|
38
52
|
import "aieditor";
|
|
53
|
+
import "mime";
|
|
39
54
|
import "@iconify-json/tabler/icons.json";
|
|
40
55
|
import "../../components/posterEditor/elements/index.js";
|
|
41
56
|
import "fabric";
|
|
42
|
-
import "mime";
|
|
43
57
|
import "dayjs";
|
|
44
58
|
import "@tanstack/vue-query";
|
|
45
59
|
import { useUI as m } from "../../hooks/ui.js";
|
|
46
|
-
const
|
|
60
|
+
const st = /* @__PURE__ */ p({
|
|
47
61
|
name: "DuxMenuButton",
|
|
48
62
|
props: {
|
|
49
63
|
class: {
|
|
@@ -68,19 +82,19 @@ const _ = /* @__PURE__ */ p({
|
|
|
68
82
|
slots: o
|
|
69
83
|
}) {
|
|
70
84
|
const {
|
|
71
|
-
menuCollapsed:
|
|
72
|
-
menuMobileCollapsed:
|
|
85
|
+
menuCollapsed: r,
|
|
86
|
+
menuMobileCollapsed: i
|
|
73
87
|
} = m();
|
|
74
|
-
return () =>
|
|
88
|
+
return () => e("div", {
|
|
75
89
|
onClick: () => {
|
|
76
90
|
t.onClick?.();
|
|
77
91
|
},
|
|
78
|
-
class: ["flex items-center gap-1 justify-center py-1 px-2 cursor-pointer gap-2", t.class,
|
|
79
|
-
}, [o.icon?.(), t.collapsed === !1 && !
|
|
92
|
+
class: ["flex items-center gap-1 justify-center py-1 px-2 cursor-pointer gap-2", t.class, r.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"]
|
|
93
|
+
}, [o.icon?.(), t.collapsed === !1 && !r.value && !i.value && e("div", {
|
|
80
94
|
class: ["overflow-hidden ease-in-out whitespace-nowrap text-left min-w-0 flex-1", t.inverted ? "text-default" : ""]
|
|
81
95
|
}, [o.default?.()])]);
|
|
82
96
|
}
|
|
83
97
|
});
|
|
84
98
|
export {
|
|
85
|
-
|
|
99
|
+
st as default
|
|
86
100
|
};
|