@duxweb/dvha-pro 1.0.22 → 1.0.24
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/card/store.cjs +1 -1
- package/dist/cjs/components/carousel/carousel.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/crop/imageCropModal.cjs +1 -1
- package/dist/cjs/components/dashboard/hello.cjs +1 -1
- package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
- package/dist/cjs/components/dashboard/quick.cjs +1 -1
- package/dist/cjs/components/data/dynamicData.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/dialog/dialog.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/editor/aiEditor.cjs +1 -1
- package/dist/cjs/components/form/drawerForm.cjs +1 -0
- 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/iconPicker.cjs +1 -1
- package/dist/cjs/components/layout/filter.cjs +1 -1
- package/dist/cjs/components/layout/filterLayout.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/layout/tools.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/media/media.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/panel/alert.cjs +1 -1
- package/dist/cjs/components/panel/collapse.cjs +1 -1
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/select/cardSelect.cjs +1 -1
- package/dist/cjs/components/status/listEmpty.cjs +1 -1
- 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 -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/components/widget/connect.cjs +1 -1
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/hooks/action.cjs +1 -1
- package/dist/cjs/hooks/download.cjs +1 -1
- package/dist/cjs/hooks/echart.cjs +1 -1
- package/dist/cjs/hooks/image.cjs +1 -1
- package/dist/cjs/hooks/level.cjs +1 -1
- package/dist/cjs/hooks/table/color.cjs +1 -0
- package/dist/cjs/hooks/table/column.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/input.cjs +1 -1
- package/dist/cjs/hooks/table/map.cjs +1 -1
- package/dist/cjs/hooks/table/status.cjs +1 -1
- package/dist/cjs/hooks/table/switch.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/layout/global.cjs +1 -1
- package/dist/cjs/pages/layout/tab.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/page.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/stores/ui.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +2 -1
- package/dist/esm/component.js +3 -3
- package/dist/esm/components/card/card.js +24 -27
- package/dist/esm/components/card/store.js +33 -39
- package/dist/esm/components/carousel/carousel.js +16 -19
- package/dist/esm/components/crop/imageCrop.js +32 -35
- package/dist/esm/components/crop/imageCropModal.js +36 -37
- package/dist/esm/components/dashboard/hello.js +27 -30
- package/dist/esm/components/dashboard/helloBig.js +328 -331
- package/dist/esm/components/dashboard/quick.js +30 -33
- package/dist/esm/components/data/dynamicData.js +86 -98
- package/dist/esm/components/data/dynamicSelect.js +29 -31
- package/dist/esm/components/data/selectModal.js +45 -49
- package/dist/esm/components/dialog/dialog.js +54 -55
- package/dist/esm/components/drawer/drawer.js +23 -22
- package/dist/esm/components/drawer/drawerPage.js +39 -49
- package/dist/esm/components/editor/aiEditor.js +64 -70
- package/dist/esm/components/form/drawerForm.js +149 -0
- package/dist/esm/components/form/formItem.js +44 -50
- package/dist/esm/components/form/formLayout.js +7 -10
- package/dist/esm/components/form/modalForm.js +50 -50
- package/dist/esm/components/form/pageForm.js +47 -50
- package/dist/esm/components/form/settingForm.js +34 -37
- package/dist/esm/components/icon/iconPicker.js +54 -58
- package/dist/esm/components/layout/filter.js +13 -16
- package/dist/esm/components/layout/filterLayout.js +7 -10
- package/dist/esm/components/layout/list.js +299 -326
- package/dist/esm/components/layout/table.js +268 -283
- package/dist/esm/components/layout/tools.js +38 -41
- package/dist/esm/components/list/card.js +35 -38
- package/dist/esm/components/list/list.js +15 -18
- package/dist/esm/components/media/media.js +35 -36
- package/dist/esm/components/modal/modal.js +10 -10
- package/dist/esm/components/modal/modalPage.js +32 -36
- package/dist/esm/components/modal/modalTab.js +39 -45
- package/dist/esm/components/panel/alert.js +19 -22
- package/dist/esm/components/panel/collapse.js +33 -36
- package/dist/esm/components/panel/setting.js +25 -31
- package/dist/esm/components/select/cardSelect.js +27 -28
- package/dist/esm/components/status/listEmpty.js +13 -13
- package/dist/esm/components/table/tablePage.js +25 -25
- package/dist/esm/components/tree/treeFilter.js +137 -147
- package/dist/esm/components/upload/config.js +15 -27
- package/dist/esm/components/upload/file.js +90 -94
- package/dist/esm/components/upload/image.js +116 -123
- package/dist/esm/components/upload/manage/item.js +44 -47
- package/dist/esm/components/upload/manager.js +190 -207
- package/dist/esm/components/widget/connect.js +103 -106
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +141 -157
- package/dist/esm/hooks/download.js +55 -56
- package/dist/esm/hooks/echart.js +156 -179
- package/dist/esm/hooks/image.js +14 -15
- package/dist/esm/hooks/level.js +7 -7
- package/dist/esm/hooks/table/color.js +19 -0
- package/dist/esm/hooks/table/column.js +25 -23
- package/dist/esm/hooks/table/image.js +2 -2
- package/dist/esm/hooks/table/input.js +28 -28
- package/dist/esm/hooks/table/map.js +7 -7
- package/dist/esm/hooks/table/status.js +8 -9
- package/dist/esm/hooks/table/switch.js +19 -19
- package/dist/esm/hooks/table.js +27 -31
- package/dist/esm/index.js +162 -158
- package/dist/esm/pages/layout/global.js +12 -15
- package/dist/esm/pages/layout/tab.js +58 -71
- package/dist/esm/pages/login.js +81 -85
- package/dist/esm/pages/menu/avatar.js +136 -149
- package/dist/esm/pages/menu/button.js +16 -20
- package/dist/esm/pages/menu/cmd.js +68 -74
- package/dist/esm/pages/page.js +21 -25
- package/dist/esm/pages/pageStatus.js +21 -24
- package/dist/esm/stores/ui.js +15 -15
- package/dist/esm/theme/uno.css.js +2 -1
- package/dist/types/components/drawer/drawerPage.d.ts +1 -1
- package/dist/types/components/form/drawerForm.d.ts +104 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/modalForm.d.ts +6 -0
- package/dist/types/components/form/pageForm.d.ts +6 -0
- package/dist/types/components/form/settingForm.d.ts +6 -0
- package/dist/types/components/layout/table.d.ts +9 -0
- package/dist/types/components/table/tablePage.d.ts +9 -0
- package/dist/types/hooks/table/color.d.ts +13 -0
- package/dist/types/hooks/table/column.d.ts +1 -0
- package/dist/types/hooks/table/index.d.ts +1 -0
- package/dist/types/hooks/table/types.d.ts +2 -2
- package/package.json +3 -3
package/dist/esm/component.js
CHANGED
|
@@ -32,8 +32,8 @@ import { DuxDrawEmptyForm as y } from "./components/draw/drawEmptyForm.js";
|
|
|
32
32
|
import { DuxDrawError as M } from "./components/draw/drawError.js";
|
|
33
33
|
import { DuxDrawerPage as b } from "./components/drawer/drawerPage.js";
|
|
34
34
|
import { DuxAiEditor as S } from "./components/editor/aiEditor.js";
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
35
|
+
import { DuxFormLayout as F } from "./components/form/formLayout.js";
|
|
36
|
+
import { DuxFormItem as L } from "./components/form/formItem.js";
|
|
37
37
|
import { DuxModalForm as T } from "./components/form/modalForm.js";
|
|
38
38
|
import { DuxPageForm as E } from "./components/form/pageForm.js";
|
|
39
39
|
import { DuxSettingForm as h } from "./components/form/settingForm.js";
|
|
@@ -75,7 +75,7 @@ import { DuxPageEmpty as Do } from "./pages/pageEmpty.js";
|
|
|
75
75
|
import { DuxPageStatus as xo } from "./pages/pageStatus.js";
|
|
76
76
|
const Im = {
|
|
77
77
|
install(o) {
|
|
78
|
-
o.component("DuxAiEditor", S), o.component("DuxCard", t), o.component("DuxDrawerPage", b), o.component("DuxDrawApps", P), o.component("DuxDrawAuth", s), o.component("DuxDrawEmpty", C), o.component("DuxDrawEmptyForm", y), o.component("DuxDrawError", M), o.component("DuxDynamicData", l), o.component("DuxDynamicSelect", f), o.component("DuxFormItem",
|
|
78
|
+
o.component("DuxAiEditor", S), o.component("DuxCard", t), o.component("DuxDrawerPage", b), o.component("DuxDrawApps", P), o.component("DuxDrawAuth", s), o.component("DuxDrawEmpty", C), o.component("DuxDrawEmptyForm", y), o.component("DuxDrawError", M), o.component("DuxDynamicData", l), o.component("DuxDynamicSelect", f), o.component("DuxFormItem", L), o.component("DuxFormLayout", F), o.component("DuxModalForm", T), o.component("DuxPageForm", E), o.component("DuxSettingForm", h), o.component("DuxListLayout", I), o.component("DuxTableFilter", A), o.component("DuxTableLayout", k), o.component("DuxTableTools", B), o.component("DuxCardPage", U), o.component("DuxListPage", v), o.component("DuxMedia", N), o.component("DuxModal", p), o.component("DuxPanelAlert", Q), o.component("DuxPanelCard", R), o.component("DuxBlockEmpty", G), o.component("DuxTablePage", J), o.component("DuxLevel", H), o.component("DuxImageCrop", D), o.component("DuxImageCropModal", x), o.component("DuxModalPage", d), o.component("DuxModalTab", g), o.component("DuxFileUpload", O), o.component("DuxImageUpload", V), o.component("DuxTreeFilter", K), o.component("DuxIconPicker", w), o.component("DuxCollapsePanel", W), o.component("DuxCodeEditor", Y), o.component("DuxDashboardHello", i), o.component("DuxDashboardHelloBig", c), o.component("DuxDashboardQuick", a), o.component("DuxCarousel", n), o.component("DuxWidgetConnect", X), o.component("DuxChart", u), o.component("DuxSelectCard", j), o.component("DuxStatsStore", r), o.component("DuxStatsStoreItem", e), o.component("DuxStatsRealTime", z), o.component("DuxStatsNumber", q), o.component("DuxAuthLayout", Z), o.component("DuxLayout", _), o.component("DuxPage403", eo), o.component("DuxPage404", no), o.component("DuxPage500", uo), o.component("DuxPageEmpty", Do), o.component("DuxPageStatus", xo), o.component("DuxLoginPage", $), o.component("DuxPage", ro), o.component("DuxMenuMain", mo), o.component("DuxMobileMenu", to), o.component("DuxMenuCmd", oo), o.component("DuxApp", m);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as s, computed as a, createVNode as d } from "vue";
|
|
2
|
+
const m = /* @__PURE__ */ s({
|
|
3
3
|
name: "DuxCard",
|
|
4
4
|
props: {
|
|
5
5
|
size: {
|
|
@@ -64,10 +64,10 @@ const S = /* @__PURE__ */ y({
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
setup(e, {
|
|
67
|
-
slots:
|
|
67
|
+
slots: t
|
|
68
68
|
}) {
|
|
69
|
-
const r = (
|
|
70
|
-
switch (
|
|
69
|
+
const r = (f) => {
|
|
70
|
+
switch (f) {
|
|
71
71
|
case "small":
|
|
72
72
|
return "px-3 py-2";
|
|
73
73
|
case "large":
|
|
@@ -78,7 +78,7 @@ const S = /* @__PURE__ */ y({
|
|
|
78
78
|
default:
|
|
79
79
|
return "";
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, l = a(() => r(e.size)), i = a(() => r(e.headerSize)), n = a(() => r(e.footerSize)), u = a(() => r(e.contentSize)), o = a(() => {
|
|
82
82
|
switch (e.type) {
|
|
83
83
|
case "elevated":
|
|
84
84
|
return "bg-elevated";
|
|
@@ -88,28 +88,25 @@ const S = /* @__PURE__ */ y({
|
|
|
88
88
|
return "bg-default dark:bg-muted";
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
return () => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
class: [o.value, e.footerClass, e.footerBordered && "border-t border-muted"]
|
|
109
|
-
}, [(f = d.footer) == null ? void 0 : f.call(d)])]);
|
|
110
|
-
};
|
|
91
|
+
return () => d("div", {
|
|
92
|
+
class: ["rounded flex flex-col dark:border dark:border-muted", e.divide && "divide-y divide-muted", e.shadow && "shadow-xs", e.bordered && "border border-muted", o.value, l.value]
|
|
93
|
+
}, [t.header && d("div", {
|
|
94
|
+
class: [i.value, e.headerClass, e.headerBordered || e.divide ? "border-b border-muted" : "pb-0"]
|
|
95
|
+
}, [t.header?.()]), e.title && d("div", {
|
|
96
|
+
class: ["flex justify-between items-center", i.value, e.headerBordered || e.divide ? "border-b border-muted" : "pb-0", e.headerClass]
|
|
97
|
+
}, [d("div", {
|
|
98
|
+
class: "flex flex-col"
|
|
99
|
+
}, [d("div", {
|
|
100
|
+
class: "text-base"
|
|
101
|
+
}, [e.title]), e.description && d("div", {
|
|
102
|
+
class: "text-sm text-muted"
|
|
103
|
+
}, [e.description])]), t.headerExtra?.()]), d("div", {
|
|
104
|
+
class: ["flex-1 min-h-0", (e.title || t.header || t.footer) && u.value, e.contentClass]
|
|
105
|
+
}, [t.default?.()]), t.footer && d("div", {
|
|
106
|
+
class: [n.value, e.footerClass, e.footerBordered && "border-t border-muted"]
|
|
107
|
+
}, [t.footer?.()])]);
|
|
111
108
|
}
|
|
112
109
|
});
|
|
113
110
|
export {
|
|
114
|
-
|
|
111
|
+
m as DuxCard
|
|
115
112
|
};
|
|
@@ -1,64 +1,58 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, createVNode as e } from "vue";
|
|
2
2
|
import { DuxMedia as l } from "../media/media.js";
|
|
3
|
-
import { DuxCard as
|
|
4
|
-
const
|
|
3
|
+
import { DuxCard as i } from "./card.js";
|
|
4
|
+
const s = /* @__PURE__ */ r({
|
|
5
5
|
name: "DuxStatsStore",
|
|
6
6
|
props: {
|
|
7
7
|
title: String,
|
|
8
8
|
avatar: String,
|
|
9
9
|
desc: String
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
slots:
|
|
11
|
+
setup(t, {
|
|
12
|
+
slots: a
|
|
13
13
|
}) {
|
|
14
|
-
return () =>
|
|
14
|
+
return () => e(i, {
|
|
15
15
|
divide: !0,
|
|
16
16
|
footerSize: "small"
|
|
17
17
|
}, {
|
|
18
|
-
header: () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class: "flex flex-col bg-muted rounded p-4 text-muted"
|
|
38
|
-
}, [(r = e.header) == null ? void 0 : r.call(e)]) : null, t("div", {
|
|
39
|
-
class: "grid grid-cols-[repeat(auto-fit,minmax(100px,1fr))] gap-2 pt-2"
|
|
40
|
-
}, [(i = e.default) == null ? void 0 : i.call(e)])]);
|
|
41
|
-
},
|
|
42
|
-
footer: e.footer
|
|
18
|
+
header: () => e("div", {
|
|
19
|
+
class: "flex gap-2 items-center"
|
|
20
|
+
}, [e(l, {
|
|
21
|
+
class: "flex-1",
|
|
22
|
+
avatar: !0,
|
|
23
|
+
imageHeight: 46,
|
|
24
|
+
imageWidth: 46,
|
|
25
|
+
image: t.avatar,
|
|
26
|
+
title: t.title,
|
|
27
|
+
desc: t.desc
|
|
28
|
+
}, null), e("div", null, [a.extra?.()])]),
|
|
29
|
+
default: () => e("div", {
|
|
30
|
+
class: "flex flex-col"
|
|
31
|
+
}, [a.header ? e("div", {
|
|
32
|
+
class: "flex flex-col bg-muted rounded p-4 text-muted"
|
|
33
|
+
}, [a.header?.()]) : null, e("div", {
|
|
34
|
+
class: "grid grid-cols-[repeat(auto-fit,minmax(100px,1fr))] gap-2 pt-2"
|
|
35
|
+
}, [a.default?.()])]),
|
|
36
|
+
footer: a.footer
|
|
43
37
|
});
|
|
44
38
|
}
|
|
45
|
-
}),
|
|
39
|
+
}), m = /* @__PURE__ */ r({
|
|
46
40
|
name: "DuxStatsStoreItem",
|
|
47
41
|
props: {
|
|
48
42
|
label: String,
|
|
49
43
|
value: String
|
|
50
44
|
},
|
|
51
|
-
setup(
|
|
52
|
-
return () =>
|
|
45
|
+
setup(t) {
|
|
46
|
+
return () => e("div", {
|
|
53
47
|
class: "flex flex-col items-center justify-center"
|
|
54
|
-
}, [
|
|
48
|
+
}, [e("div", {
|
|
55
49
|
class: "text-lg font-bold"
|
|
56
|
-
}, [
|
|
50
|
+
}, [t.value]), e("div", {
|
|
57
51
|
class: "text-sm text-muted"
|
|
58
|
-
}, [
|
|
52
|
+
}, [t.label])]);
|
|
59
53
|
}
|
|
60
54
|
});
|
|
61
55
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
s as DuxStatsStore,
|
|
57
|
+
m as DuxStatsStoreItem
|
|
64
58
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NCarousel as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as a, createVNode as r } from "vue";
|
|
2
|
+
import { NCarousel as s } from "naive-ui";
|
|
3
|
+
const n = /* @__PURE__ */ a({
|
|
4
4
|
name: "DuxCarousel",
|
|
5
5
|
props: {
|
|
6
6
|
height: {
|
|
@@ -9,29 +9,26 @@ const d = /* @__PURE__ */ o({
|
|
|
9
9
|
},
|
|
10
10
|
data: Array
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
return () => r(
|
|
12
|
+
setup(t) {
|
|
13
|
+
return () => r(s, {
|
|
14
14
|
draggable: !0,
|
|
15
15
|
class: "rounded-sm shadow-sm",
|
|
16
16
|
style: {
|
|
17
|
-
height: `${
|
|
17
|
+
height: `${t.height}px`
|
|
18
18
|
}
|
|
19
19
|
}, {
|
|
20
|
-
default: () => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
onClick: typeof e == "string" || e == null ? void 0 : e.onClick
|
|
30
|
-
}, null))];
|
|
31
|
-
}
|
|
20
|
+
default: () => [t?.data?.map((e, o) => r("img", {
|
|
21
|
+
key: o,
|
|
22
|
+
class: "w-full object-cover",
|
|
23
|
+
style: {
|
|
24
|
+
height: `${t.height}px`
|
|
25
|
+
},
|
|
26
|
+
src: typeof e == "string" ? e : e.src,
|
|
27
|
+
onClick: typeof e == "string" ? void 0 : e?.onClick
|
|
28
|
+
}, null))]
|
|
32
29
|
});
|
|
33
30
|
}
|
|
34
31
|
});
|
|
35
32
|
export {
|
|
36
|
-
|
|
33
|
+
n as DuxCarousel
|
|
37
34
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import { useMessage as
|
|
1
|
+
import { defineComponent as n, createVNode as r } from "vue";
|
|
2
|
+
import { useI18n as s, useManage as c, useUpload as d } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as g } from "@vueuse/core";
|
|
4
|
+
import { useMessage as f } from "naive-ui";
|
|
5
5
|
import "vue-router";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
8
|
-
import { DuxAvatar as
|
|
8
|
+
import { DuxAvatar as v } from "../widget/avatar.js";
|
|
9
9
|
import "vue-echarts";
|
|
10
10
|
import "vue-cropper";
|
|
11
11
|
import "jinrishici";
|
|
@@ -38,11 +38,11 @@ import "ace-builds/src-noconflict/theme-tomorrow";
|
|
|
38
38
|
import "ace-builds/src-noconflict/ext-searchbox";
|
|
39
39
|
import "ace-builds/src-noconflict/ext-language_tools";
|
|
40
40
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
41
|
-
import { useModal as
|
|
41
|
+
import { useModal as h } from "../../hooks/modal.js";
|
|
42
42
|
import "dayjs";
|
|
43
43
|
import "@tanstack/vue-query";
|
|
44
44
|
import "pinia";
|
|
45
|
-
const
|
|
45
|
+
const uo = /* @__PURE__ */ n({
|
|
46
46
|
name: "DuxImageCrop",
|
|
47
47
|
props: {
|
|
48
48
|
defaultValue: {
|
|
@@ -62,59 +62,56 @@ const so = /* @__PURE__ */ d({
|
|
|
62
62
|
default: !0
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
setup(
|
|
66
|
-
emit:
|
|
65
|
+
setup(t, {
|
|
66
|
+
emit: m
|
|
67
67
|
}) {
|
|
68
|
-
var u;
|
|
69
68
|
const {
|
|
70
|
-
t:
|
|
71
|
-
} =
|
|
69
|
+
t: i
|
|
70
|
+
} = s(), e = g(t, "value", m, {
|
|
72
71
|
passive: !0,
|
|
73
|
-
defaultValue:
|
|
72
|
+
defaultValue: t.defaultValue || ""
|
|
74
73
|
}), {
|
|
75
|
-
config:
|
|
76
|
-
} =
|
|
77
|
-
path:
|
|
74
|
+
config: a
|
|
75
|
+
} = c(), u = h(), p = f(), l = d({
|
|
76
|
+
path: t.path || a.apiPath?.upload || "upload",
|
|
78
77
|
params: {
|
|
79
78
|
mime: "image/png"
|
|
80
79
|
},
|
|
81
80
|
autoUpload: !0,
|
|
82
81
|
onSuccess: (o) => {
|
|
83
|
-
|
|
84
|
-
i.value = (r = o.data) == null ? void 0 : r.url, a.success(m("components.upload.success"));
|
|
82
|
+
e.value = o.data?.url, p.success(i("components.upload.success"));
|
|
85
83
|
},
|
|
86
84
|
onError: (o) => {
|
|
87
|
-
|
|
85
|
+
p.error(o.message || i("components.upload.failed"));
|
|
88
86
|
}
|
|
89
87
|
});
|
|
90
|
-
return () =>
|
|
91
|
-
class: ["relative size-80px overflow-hidden group",
|
|
88
|
+
return () => r("div", {
|
|
89
|
+
class: ["relative size-80px overflow-hidden group", t.circle && "rounded-full"],
|
|
92
90
|
onClick: () => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
component: () => import("./imageCropModal.js").then((t) => t.DuxImageCropModal),
|
|
91
|
+
u.show({
|
|
92
|
+
component: () => import("./imageCropModal.js").then((o) => o.DuxImageCropModal),
|
|
96
93
|
componentProps: {
|
|
97
|
-
value:
|
|
98
|
-
onConfirm: (
|
|
99
|
-
|
|
94
|
+
value: e.value,
|
|
95
|
+
onConfirm: (o) => {
|
|
96
|
+
e.value = o;
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
|
-
})
|
|
103
|
-
|
|
99
|
+
})?.then?.((o) => {
|
|
100
|
+
o && (o.name = "image.png", o.mime = "image/png", l.addFiles([o], "blob"));
|
|
104
101
|
}).catch(() => {
|
|
105
102
|
});
|
|
106
103
|
}
|
|
107
|
-
}, [
|
|
108
|
-
src:
|
|
109
|
-
circle:
|
|
104
|
+
}, [r(v, {
|
|
105
|
+
src: e.value,
|
|
106
|
+
circle: t.circle,
|
|
110
107
|
size: 80
|
|
111
|
-
}, null),
|
|
108
|
+
}, null), r("div", {
|
|
112
109
|
class: "absolute size-full bg-gray-900/30 items-center justify-center inset-0 cursor-pointer hidden z-1 group-hover:flex"
|
|
113
|
-
}, [
|
|
110
|
+
}, [r("div", {
|
|
114
111
|
class: "i-tabler:pencil size-4 text-white/90"
|
|
115
112
|
}, null)])]);
|
|
116
113
|
}
|
|
117
114
|
});
|
|
118
115
|
export {
|
|
119
|
-
|
|
116
|
+
uo as DuxImageCrop
|
|
120
117
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useFileDialog as
|
|
4
|
-
import { NButton as
|
|
5
|
-
import { VueCropper as
|
|
1
|
+
import { defineComponent as d, ref as u, watch as v, createVNode as e, isVNode as y } from "vue";
|
|
2
|
+
import { useI18n as g } from "@duxweb/dvha-core";
|
|
3
|
+
import { useFileDialog as b } from "@vueuse/core";
|
|
4
|
+
import { NButton as n } from "naive-ui";
|
|
5
|
+
import { VueCropper as C } from "vue-cropper";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
return typeof
|
|
7
|
+
import x from "../modal/modalPage.js";
|
|
8
|
+
function s(o) {
|
|
9
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !y(o);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const L = /* @__PURE__ */ d({
|
|
12
12
|
props: {
|
|
13
13
|
value: String,
|
|
14
14
|
onConfirm: Function
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
16
|
+
setup(o) {
|
|
17
17
|
const {
|
|
18
18
|
t: c
|
|
19
|
-
} =
|
|
20
|
-
open:
|
|
21
|
-
files:
|
|
22
|
-
} =
|
|
19
|
+
} = g(), l = u(), i = u(o.value || ""), {
|
|
20
|
+
open: p,
|
|
21
|
+
files: f
|
|
22
|
+
} = b({
|
|
23
23
|
accept: "image/*"
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
type:
|
|
25
|
+
v(f, (t) => {
|
|
26
|
+
if (t && t.length > 0) {
|
|
27
|
+
const r = t[0], a = new Blob([r], {
|
|
28
|
+
type: r.type
|
|
29
29
|
});
|
|
30
30
|
i.value = URL.createObjectURL(a);
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const m = () => {
|
|
34
|
+
p();
|
|
35
35
|
};
|
|
36
|
-
return () => e(
|
|
36
|
+
return () => e(x, {
|
|
37
37
|
title: c("components.crop.title")
|
|
38
38
|
}, {
|
|
39
39
|
default: () => e("div", {
|
|
40
40
|
class: "h-100"
|
|
41
|
-
}, [e(
|
|
41
|
+
}, [e(C, {
|
|
42
42
|
ref: l,
|
|
43
43
|
img: i.value,
|
|
44
44
|
autoCrop: !0,
|
|
@@ -49,20 +49,20 @@ const M = /* @__PURE__ */ v({
|
|
|
49
49
|
mode: "contain"
|
|
50
50
|
}, null)]),
|
|
51
51
|
footer: () => {
|
|
52
|
-
let
|
|
52
|
+
let t, r;
|
|
53
53
|
return e("div", {
|
|
54
54
|
class: "flex-1 flex justify-between items-center"
|
|
55
55
|
}, [e("div", {
|
|
56
56
|
class: "flex items-center gap-2"
|
|
57
|
-
}, [e(
|
|
57
|
+
}, [e(n, {
|
|
58
58
|
type: "primary",
|
|
59
59
|
secondary: !0,
|
|
60
60
|
onClick: () => {
|
|
61
|
-
|
|
61
|
+
m();
|
|
62
62
|
}
|
|
63
|
-
},
|
|
64
|
-
default: () => [
|
|
65
|
-
}), e(
|
|
63
|
+
}, s(t = c("components.crop.select")) ? t : {
|
|
64
|
+
default: () => [t]
|
|
65
|
+
}), e(n, {
|
|
66
66
|
secondary: !0,
|
|
67
67
|
onClick: () => {
|
|
68
68
|
l.value.changeScale(1);
|
|
@@ -71,7 +71,7 @@ const M = /* @__PURE__ */ v({
|
|
|
71
71
|
default: () => [e("div", {
|
|
72
72
|
class: "i-tabler:zoom-in"
|
|
73
73
|
}, null)]
|
|
74
|
-
}), e(
|
|
74
|
+
}), e(n, {
|
|
75
75
|
secondary: !0,
|
|
76
76
|
onClick: () => {
|
|
77
77
|
l.value.changeScale(-1);
|
|
@@ -80,7 +80,7 @@ const M = /* @__PURE__ */ v({
|
|
|
80
80
|
default: () => [e("div", {
|
|
81
81
|
class: "i-tabler:zoom-out"
|
|
82
82
|
}, null)]
|
|
83
|
-
}), e(
|
|
83
|
+
}), e(n, {
|
|
84
84
|
secondary: !0,
|
|
85
85
|
onClick: () => {
|
|
86
86
|
l.value.rotateLeft();
|
|
@@ -89,7 +89,7 @@ const M = /* @__PURE__ */ v({
|
|
|
89
89
|
default: () => [e("div", {
|
|
90
90
|
class: "i-tabler:rotate"
|
|
91
91
|
}, null)]
|
|
92
|
-
}), e(
|
|
92
|
+
}), e(n, {
|
|
93
93
|
secondary: !0,
|
|
94
94
|
onClick: () => {
|
|
95
95
|
l.value.rotateRight();
|
|
@@ -98,21 +98,20 @@ const M = /* @__PURE__ */ v({
|
|
|
98
98
|
default: () => [e("div", {
|
|
99
99
|
class: "i-tabler:rotate-clockwise"
|
|
100
100
|
}, null)]
|
|
101
|
-
})]), e(
|
|
101
|
+
})]), e(n, {
|
|
102
102
|
type: "primary",
|
|
103
103
|
onClick: () => {
|
|
104
104
|
l.value.getCropBlob((a) => {
|
|
105
|
-
|
|
106
|
-
(u = t.onConfirm) == null || u.call(t, a);
|
|
105
|
+
o.onConfirm?.(a);
|
|
107
106
|
});
|
|
108
107
|
}
|
|
109
|
-
},
|
|
110
|
-
default: () => [
|
|
108
|
+
}, s(r = c("components.crop.confirm")) ? r : {
|
|
109
|
+
default: () => [r]
|
|
111
110
|
})]);
|
|
112
111
|
}
|
|
113
112
|
});
|
|
114
113
|
}
|
|
115
114
|
});
|
|
116
115
|
export {
|
|
117
|
-
|
|
116
|
+
L as DuxImageCropModal
|
|
118
117
|
};
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as d, createVNode as e } from "vue";
|
|
2
|
+
const a = /* @__PURE__ */ d({
|
|
3
3
|
name: "DuxDashboardHello",
|
|
4
4
|
props: {
|
|
5
5
|
title: String,
|
|
6
6
|
desc: String,
|
|
7
7
|
data: Array
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
return () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class: "absolute -top-7 -right-18 rounded-full size-60 bg-white/8"
|
|
34
|
-
}, null)]);
|
|
35
|
-
};
|
|
9
|
+
setup(l) {
|
|
10
|
+
return () => e("div", {
|
|
11
|
+
class: "rounded p-6 py-5 flex flex-col md:flex-row gap-4 items-center justify-between bg-primary text-sm text-white overflow-hidden relative border border-primary-6"
|
|
12
|
+
}, [e("div", {
|
|
13
|
+
class: "flex flex-1 flex-col gap-1 text-center md:text-left"
|
|
14
|
+
}, [e("div", {
|
|
15
|
+
class: "text-lg"
|
|
16
|
+
}, [l.title]), e("div", {
|
|
17
|
+
class: "opacity-70"
|
|
18
|
+
}, [l.desc])]), e("div", {
|
|
19
|
+
class: "flex justify-end divide-x divide-white/20"
|
|
20
|
+
}, [l.data?.map((t, i) => e("div", {
|
|
21
|
+
key: i,
|
|
22
|
+
class: "flex flex-col justify-center items-center px-4"
|
|
23
|
+
}, [e("div", null, [t.label]), e("div", {
|
|
24
|
+
class: "text-lg font-bold",
|
|
25
|
+
onClick: t?.onClick
|
|
26
|
+
}, [t.value || 0])]))]), e("div", {
|
|
27
|
+
class: "absolute top-7 -right-20 rounded-full size-40 bg-white/8"
|
|
28
|
+
}, null), e("div", {
|
|
29
|
+
class: "absolute top-0 -right-20 rounded-full size-50 bg-white/8"
|
|
30
|
+
}, null), e("div", {
|
|
31
|
+
class: "absolute -top-7 -right-18 rounded-full size-60 bg-white/8"
|
|
32
|
+
}, null)]);
|
|
36
33
|
}
|
|
37
34
|
});
|
|
38
35
|
export {
|
|
39
|
-
|
|
36
|
+
a as DuxDashboardHello
|
|
40
37
|
};
|