@duxweb/dvha-pro 1.0.23 → 1.0.25
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/chart/echart.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 -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/icon/iconPicker.cjs +1 -1
- package/dist/cjs/components/image/components/CanvasRuler.cjs +1 -0
- package/dist/cjs/components/image/elements/circle.cjs +1 -0
- package/dist/cjs/components/image/elements/image.cjs +1 -0
- package/dist/cjs/components/image/elements/index.cjs +1 -0
- package/dist/cjs/components/image/elements/rect.cjs +1 -0
- package/dist/cjs/components/image/elements/text.cjs +1 -0
- package/dist/cjs/components/image/hooks/usePosterEditor.cjs +1 -0
- package/dist/cjs/components/image/pages/LeftToolbar.cjs +1 -0
- package/dist/cjs/components/image/pages/Panel.cjs +1 -0
- package/dist/cjs/components/image/pages/PanelItem.cjs +1 -0
- package/dist/cjs/components/image/pages/RightPanel.cjs +1 -0
- package/dist/cjs/components/image/posterEditor.cjs +1 -0
- 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/level/level.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/table.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/dialog.cjs +1 -1
- package/dist/cjs/hooks/download.cjs +1 -1
- package/dist/cjs/hooks/drawer.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/modal.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/media.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/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/layout/tab.cjs +1 -1
- package/dist/cjs/pages/layout.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/stores/ui.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +26 -1
- package/dist/esm/component.js +49 -47
- 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/chart/echart.js +15 -13
- package/dist/esm/components/crop/imageCrop.js +45 -46
- 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 +42 -42
- package/dist/esm/components/data/selectModal.js +58 -60
- package/dist/esm/components/dialog/dialog.js +54 -55
- package/dist/esm/components/drawer/drawer.js +23 -23
- 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 +61 -59
- package/dist/esm/components/form/formItem.js +45 -51
- package/dist/esm/components/form/formLayout.js +7 -10
- package/dist/esm/components/form/modalForm.js +63 -61
- package/dist/esm/components/form/pageForm.js +56 -57
- package/dist/esm/components/form/settingForm.js +43 -44
- package/dist/esm/components/icon/icon.js +15 -13
- package/dist/esm/components/icon/iconPicker.js +54 -58
- package/dist/esm/components/image/components/CanvasRuler.js +113 -0
- package/dist/esm/components/image/elements/circle.js +127 -0
- package/dist/esm/components/image/elements/image.js +131 -0
- package/dist/esm/components/image/elements/index.js +46 -0
- package/dist/esm/components/image/elements/rect.js +171 -0
- package/dist/esm/components/image/elements/text.js +206 -0
- package/dist/esm/components/image/hooks/usePosterEditor.js +434 -0
- package/dist/esm/components/image/pages/LeftToolbar.js +40 -0
- package/dist/esm/components/image/pages/Panel.js +31 -0
- package/dist/esm/components/image/pages/PanelItem.js +22 -0
- package/dist/esm/components/image/pages/RightPanel.js +421 -0
- package/dist/esm/components/image/posterEditor.js +227 -0
- 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 +312 -337
- package/dist/esm/components/layout/table.js +281 -294
- package/dist/esm/components/layout/tools.js +38 -41
- package/dist/esm/components/level/level.js +15 -13
- 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/table.js +15 -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 +115 -109
- package/dist/esm/components/upload/image.js +135 -130
- package/dist/esm/components/upload/manage/item.js +59 -60
- package/dist/esm/components/upload/manager.js +203 -218
- package/dist/esm/components/widget/connect.js +103 -106
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +115 -131
- package/dist/esm/hooks/dialog.js +15 -13
- package/dist/esm/hooks/download.js +55 -56
- package/dist/esm/hooks/drawer.js +15 -13
- 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/modal.js +15 -13
- 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 +17 -15
- package/dist/esm/hooks/table/input.js +28 -28
- package/dist/esm/hooks/table/map.js +7 -7
- package/dist/esm/hooks/table/media.js +15 -13
- 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 +213 -200
- package/dist/esm/pages/authLayout.js +15 -13
- package/dist/esm/pages/layout/global.js +12 -15
- package/dist/esm/pages/layout/page.js +15 -13
- package/dist/esm/pages/layout/tab.js +58 -71
- package/dist/esm/pages/layout.js +7 -6
- package/dist/esm/pages/login.js +95 -98
- package/dist/esm/pages/menu/avatar.js +151 -162
- package/dist/esm/pages/menu/button.js +29 -31
- package/dist/esm/pages/menu/cmd.js +83 -87
- package/dist/esm/pages/menu/main.js +25 -23
- package/dist/esm/pages/menu/mobile.js +15 -13
- package/dist/esm/pages/page.js +21 -25
- package/dist/esm/pages/page404.js +13 -11
- package/dist/esm/pages/pageStatus.js +33 -34
- package/dist/esm/stores/ui.js +15 -15
- package/dist/esm/theme/uno.css.js +26 -1
- package/dist/types/components/form/drawerForm.d.ts +6 -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/image/components/CanvasRuler.d.ts +43 -0
- package/dist/types/components/image/components/index.d.ts +1 -0
- package/dist/types/components/image/elements/circle.d.ts +3 -0
- package/dist/types/components/image/elements/image.d.ts +3 -0
- package/dist/types/components/image/elements/index.d.ts +15 -0
- package/dist/types/components/image/elements/rect.d.ts +3 -0
- package/dist/types/components/image/elements/text.d.ts +3 -0
- package/dist/types/components/image/elements/types.d.ts +51 -0
- package/dist/types/components/image/hooks/index.d.ts +1 -0
- package/dist/types/components/image/hooks/usePosterEditor.d.ts +48 -0
- package/dist/types/components/image/index.d.ts +4 -0
- package/dist/types/components/image/pages/LeftToolbar.d.ts +33 -0
- package/dist/types/components/image/pages/Panel.d.ts +11 -0
- package/dist/types/components/image/pages/PanelItem.d.ts +11 -0
- package/dist/types/components/image/pages/RightPanel.d.ts +208 -0
- package/dist/types/components/image/pages/index.d.ts +4 -0
- package/dist/types/components/image/posterEditor.d.ts +61 -0
- package/dist/types/components/image/types/editor.d.ts +47 -0
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/layout/table.d.ts +9 -0
- package/dist/types/components/stats/number.d.ts +1 -1
- package/dist/types/components/table/tablePage.d.ts +9 -0
- package/dist/types/components/upload/file.d.ts +5 -3
- 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/index.d.ts +1 -0
- package/dist/types/pages/layout/global.d.ts +0 -1
- package/package.json +6 -3
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useMessage as
|
|
1
|
+
import { defineComponent as f, toRef as b, createVNode as e } from "vue";
|
|
2
|
+
import { useI18n as g, useTabStore as y, useInvalidate as S, useExtendForm as x } from "@duxweb/dvha-core";
|
|
3
|
+
import { useMessage as h, NButton as p, NScrollbar as v } from "naive-ui";
|
|
4
4
|
import { useRouter as E } from "vue-router";
|
|
5
5
|
import "@overlastic/vue";
|
|
6
6
|
import { DuxCard as F } from "../card/card.js";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
9
9
|
import "@vueuse/core";
|
|
10
|
-
import "vue-cropper";
|
|
11
|
-
import "jinrishici";
|
|
12
|
-
import "lodash-es";
|
|
13
|
-
import "vue-draggable-plus";
|
|
14
|
-
import "aieditor";
|
|
15
|
-
import { DuxFormLayout as v } from "./formLayout.js";
|
|
16
|
-
import "vee-validate";
|
|
17
|
-
import "@iconify-json/tabler/icons.json";
|
|
18
|
-
import "mime";
|
|
19
10
|
import "vue3-ace-editor";
|
|
20
11
|
import "ace-builds/src-noconflict/mode-vue";
|
|
21
12
|
import "ace-builds/src-noconflict/mode-javascript";
|
|
@@ -27,6 +18,17 @@ import "ace-builds/src-noconflict/theme-tomorrow";
|
|
|
27
18
|
import "ace-builds/src-noconflict/ext-searchbox";
|
|
28
19
|
import "ace-builds/src-noconflict/ext-language_tools";
|
|
29
20
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
21
|
+
import "vue-cropper";
|
|
22
|
+
import "jinrishici";
|
|
23
|
+
import "lodash-es";
|
|
24
|
+
import "vue-draggable-plus";
|
|
25
|
+
import "aieditor";
|
|
26
|
+
import { DuxFormLayout as C } from "./formLayout.js";
|
|
27
|
+
import "vee-validate";
|
|
28
|
+
import "@iconify-json/tabler/icons.json";
|
|
29
|
+
import "../image/elements/index.js";
|
|
30
|
+
import "fabric";
|
|
31
|
+
import "mime";
|
|
30
32
|
import "dayjs";
|
|
31
33
|
import "@tanstack/vue-query";
|
|
32
34
|
import "@duxweb/dvha-naiveui";
|
|
@@ -41,9 +43,9 @@ import "unocss/preset-wind4";
|
|
|
41
43
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
42
44
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
43
45
|
import "vue-command-palette";
|
|
44
|
-
import { DuxPage as
|
|
46
|
+
import { DuxPage as D } from "../../pages/page.js";
|
|
45
47
|
import "../../pages/page404.js";
|
|
46
|
-
const xt = /* @__PURE__ */
|
|
48
|
+
const xt = /* @__PURE__ */ f({
|
|
47
49
|
name: "DuxPageForm",
|
|
48
50
|
props: {
|
|
49
51
|
id: {
|
|
@@ -73,72 +75,69 @@ const xt = /* @__PURE__ */ b({
|
|
|
73
75
|
size: {
|
|
74
76
|
type: String,
|
|
75
77
|
default: "medium"
|
|
78
|
+
},
|
|
79
|
+
invalidate: {
|
|
80
|
+
type: String
|
|
76
81
|
}
|
|
77
82
|
},
|
|
78
83
|
setup(t, {
|
|
79
|
-
slots:
|
|
84
|
+
slots: m
|
|
80
85
|
}) {
|
|
81
86
|
const {
|
|
82
87
|
t: o
|
|
83
|
-
} =
|
|
88
|
+
} = g(), s = b(t, "data", {}), a = h(), c = E(), n = y(), {
|
|
89
|
+
invalidate: l
|
|
90
|
+
} = S(), r = x({
|
|
84
91
|
id: t.id,
|
|
85
92
|
path: t.path,
|
|
86
|
-
form:
|
|
93
|
+
form: s,
|
|
87
94
|
action: t.action,
|
|
88
|
-
onError: (
|
|
89
|
-
|
|
90
|
-
u.error(e.message || o("components.form.error")), (a = t.onError) == null || a.call(t, e);
|
|
95
|
+
onError: (i) => {
|
|
96
|
+
a.error(i.message || o("components.form.error")), t.onError?.(i);
|
|
91
97
|
},
|
|
92
|
-
onSuccess: (
|
|
93
|
-
|
|
94
|
-
u.success(o("components.form.success")), (a = t.onSuccess) == null || a.call(t, e), !m.isEdit.value && n.current && n.delTab(n.current, (f) => l.push(f.path || ""));
|
|
98
|
+
onSuccess: (i) => {
|
|
99
|
+
a.success(o("components.form.success")), t.onSuccess?.(i), !r.isEdit.value && n.current && n.delTab(n.current, (d) => c.push(d.path || "")), t.invalidate && l(t.invalidate);
|
|
95
100
|
}
|
|
96
|
-
}),
|
|
97
|
-
return () =>
|
|
101
|
+
}), u = n.tabs.find((i) => i.path === n.current);
|
|
102
|
+
return () => e(D, {
|
|
98
103
|
card: !1,
|
|
99
104
|
scrollbar: !1
|
|
100
105
|
}, {
|
|
101
|
-
default: () => [
|
|
102
|
-
title:
|
|
103
|
-
description: t
|
|
106
|
+
default: () => [e(F, {
|
|
107
|
+
title: t?.title || u?.label || (r.isEdit.value ? o("components.form.edit") : o("components.form.create")),
|
|
108
|
+
description: t?.description,
|
|
104
109
|
class: "h-full flex flex-col",
|
|
105
110
|
contentClass: "flex-1 min-h-0",
|
|
106
111
|
contentSize: "none",
|
|
107
112
|
"header-bordered": !0
|
|
108
113
|
}, {
|
|
109
|
-
default: () =>
|
|
110
|
-
default: () => [
|
|
114
|
+
default: () => e(v, null, {
|
|
115
|
+
default: () => [e(C, {
|
|
111
116
|
"label-placement": "page"
|
|
112
117
|
}, {
|
|
113
|
-
default: () =>
|
|
114
|
-
var e;
|
|
115
|
-
return [(e = r == null ? void 0 : r.default) == null ? void 0 : e.call(r, m)];
|
|
116
|
-
}
|
|
118
|
+
default: () => [m?.default?.(r)]
|
|
117
119
|
})]
|
|
118
120
|
}),
|
|
119
|
-
headerExtra: () => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}, null)
|
|
140
|
-
})])]);
|
|
141
|
-
}
|
|
121
|
+
headerExtra: () => e("div", {
|
|
122
|
+
class: "flex gap-6 items-center"
|
|
123
|
+
}, [m?.actions?.(r), e("div", {
|
|
124
|
+
class: "flex gap-2"
|
|
125
|
+
}, [e(p, {
|
|
126
|
+
onClick: () => r.onReset()
|
|
127
|
+
}, {
|
|
128
|
+
default: () => o("components.button.reset"),
|
|
129
|
+
icon: () => e("i", {
|
|
130
|
+
class: "i-tabler:refresh"
|
|
131
|
+
}, null)
|
|
132
|
+
}), e(p, {
|
|
133
|
+
type: "primary",
|
|
134
|
+
onClick: () => r.onSubmit()
|
|
135
|
+
}, {
|
|
136
|
+
default: () => o("components.button.submit"),
|
|
137
|
+
icon: () => e("i", {
|
|
138
|
+
class: "i-tabler:device-floppy"
|
|
139
|
+
}, null)
|
|
140
|
+
})])])
|
|
142
141
|
})]
|
|
143
142
|
});
|
|
144
143
|
}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as x, useExtendForm as y } from "@duxweb/dvha-core";
|
|
3
|
-
import { useMessage as
|
|
1
|
+
import { defineComponent as s, ref as c, toRef as d, computed as f, createVNode as o } from "vue";
|
|
2
|
+
import { useI18n as g, useInvalidate as x, useExtendForm as y } from "@duxweb/dvha-core";
|
|
3
|
+
import { useMessage as v, NTabs as S } from "naive-ui";
|
|
4
4
|
import "@overlastic/vue";
|
|
5
5
|
import "vue-router";
|
|
6
6
|
import "clsx";
|
|
7
7
|
import "vue-echarts";
|
|
8
8
|
import "@vueuse/core";
|
|
9
|
-
import "vue-cropper";
|
|
10
|
-
import "jinrishici";
|
|
11
|
-
import "lodash-es";
|
|
12
|
-
import "vue-draggable-plus";
|
|
13
|
-
import "aieditor";
|
|
14
|
-
import "vee-validate";
|
|
15
|
-
import "@iconify-json/tabler/icons.json";
|
|
16
|
-
import "mime";
|
|
17
9
|
import "vue3-ace-editor";
|
|
18
10
|
import "ace-builds/src-noconflict/mode-vue";
|
|
19
11
|
import "ace-builds/src-noconflict/mode-javascript";
|
|
@@ -25,6 +17,16 @@ import "ace-builds/src-noconflict/theme-tomorrow";
|
|
|
25
17
|
import "ace-builds/src-noconflict/ext-searchbox";
|
|
26
18
|
import "ace-builds/src-noconflict/ext-language_tools";
|
|
27
19
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
20
|
+
import "vue-cropper";
|
|
21
|
+
import "jinrishici";
|
|
22
|
+
import "lodash-es";
|
|
23
|
+
import "vue-draggable-plus";
|
|
24
|
+
import "aieditor";
|
|
25
|
+
import "vee-validate";
|
|
26
|
+
import "@iconify-json/tabler/icons.json";
|
|
27
|
+
import "../image/elements/index.js";
|
|
28
|
+
import "fabric";
|
|
29
|
+
import "mime";
|
|
28
30
|
import "dayjs";
|
|
29
31
|
import "@tanstack/vue-query";
|
|
30
32
|
import "@duxweb/dvha-naiveui";
|
|
@@ -39,9 +41,9 @@ import "unocss/preset-wind4";
|
|
|
39
41
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
40
42
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
41
43
|
import "vue-command-palette";
|
|
42
|
-
import { DuxPage as
|
|
44
|
+
import { DuxPage as b } from "../../pages/page.js";
|
|
43
45
|
import "../../pages/page404.js";
|
|
44
|
-
const ct = /* @__PURE__ */
|
|
46
|
+
const ct = /* @__PURE__ */ s({
|
|
45
47
|
name: "DuxSettingForm",
|
|
46
48
|
props: {
|
|
47
49
|
id: {
|
|
@@ -73,27 +75,30 @@ const ct = /* @__PURE__ */ f({
|
|
|
73
75
|
size: {
|
|
74
76
|
type: String,
|
|
75
77
|
default: "medium"
|
|
78
|
+
},
|
|
79
|
+
invalidate: {
|
|
80
|
+
type: String
|
|
76
81
|
}
|
|
77
82
|
},
|
|
78
83
|
setup(t, {
|
|
79
|
-
slots:
|
|
84
|
+
slots: i
|
|
80
85
|
}) {
|
|
81
|
-
const
|
|
82
|
-
t:
|
|
83
|
-
} =
|
|
86
|
+
const r = c(t.defaultTab), p = d(t, "data", {}), {
|
|
87
|
+
t: m
|
|
88
|
+
} = g(), a = v(), {
|
|
89
|
+
invalidate: u
|
|
90
|
+
} = x(), n = y({
|
|
84
91
|
id: t.id,
|
|
85
92
|
path: t.path,
|
|
86
|
-
form:
|
|
93
|
+
form: p,
|
|
87
94
|
action: t.action,
|
|
88
|
-
onError: (
|
|
89
|
-
|
|
90
|
-
n.error(r.message || o("components.form.error")), (m = t.onError) == null || m.call(t, r);
|
|
95
|
+
onError: (e) => {
|
|
96
|
+
a.error(e.message || m("components.form.error")), t.onError?.(e);
|
|
91
97
|
},
|
|
92
|
-
onSuccess: (
|
|
93
|
-
|
|
94
|
-
n.success(o("components.form.success")), (m = t.onSuccess) == null || m.call(t, r);
|
|
98
|
+
onSuccess: (e) => {
|
|
99
|
+
a.success(m("components.form.success")), t.onSuccess?.(e), t.invalidate && u(t.invalidate);
|
|
95
100
|
}
|
|
96
|
-
}),
|
|
101
|
+
}), l = f(() => {
|
|
97
102
|
switch (t.size) {
|
|
98
103
|
case "small":
|
|
99
104
|
return "lg:max-w-lg";
|
|
@@ -104,25 +109,19 @@ const ct = /* @__PURE__ */ f({
|
|
|
104
109
|
return "lg:max-w-2xl";
|
|
105
110
|
}
|
|
106
111
|
});
|
|
107
|
-
return () =>
|
|
108
|
-
default: () => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
value
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
default: () => {
|
|
121
|
-
var m;
|
|
122
|
-
return [(m = e == null ? void 0 : e.default) == null ? void 0 : m.call(e, u)];
|
|
123
|
-
}
|
|
124
|
-
}) : (r = e == null ? void 0 : e.default) == null ? void 0 : r.call(e, u)])];
|
|
125
|
-
}
|
|
112
|
+
return () => o(b, null, {
|
|
113
|
+
default: () => [o("div", {
|
|
114
|
+
class: `flex flex-col gap-6 w-full ${l.value} mx-auto py-4`
|
|
115
|
+
}, [t.tabs ? o(S, {
|
|
116
|
+
defaultValue: t.defaultTab,
|
|
117
|
+
value: r.value,
|
|
118
|
+
onUpdateValue: (e) => {
|
|
119
|
+
r.value = e;
|
|
120
|
+
},
|
|
121
|
+
type: "segment"
|
|
122
|
+
}, {
|
|
123
|
+
default: () => [i?.default?.(n)]
|
|
124
|
+
}) : i?.default?.(n)])]
|
|
126
125
|
});
|
|
127
126
|
}
|
|
128
127
|
});
|
|
@@ -6,6 +6,17 @@ import "vue-router";
|
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
9
|
+
import "vue3-ace-editor";
|
|
10
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
13
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
14
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
15
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
16
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
17
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
18
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
9
20
|
import "vue-cropper";
|
|
10
21
|
import "jinrishici";
|
|
11
22
|
import "lodash-es";
|
|
@@ -25,23 +36,14 @@ import "vue-command-palette";
|
|
|
25
36
|
import "@duxweb/dvha-naiveui";
|
|
26
37
|
import "../../pages/page404.js";
|
|
27
38
|
import "@iconify-json/tabler/icons.json";
|
|
39
|
+
import "../image/elements/index.js";
|
|
40
|
+
import "fabric";
|
|
28
41
|
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";
|
|
40
42
|
import { useModal as c } from "../../hooks/modal.js";
|
|
41
43
|
import "dayjs";
|
|
42
44
|
import "@tanstack/vue-query";
|
|
43
45
|
import "pinia";
|
|
44
|
-
const
|
|
46
|
+
const ro = /* @__PURE__ */ n({
|
|
45
47
|
name: "DuxIconPicker",
|
|
46
48
|
props: {
|
|
47
49
|
defaultValue: String,
|
|
@@ -85,5 +87,5 @@ const to = /* @__PURE__ */ n({
|
|
|
85
87
|
}
|
|
86
88
|
});
|
|
87
89
|
export {
|
|
88
|
-
|
|
90
|
+
ro as DuxIconPicker
|
|
89
91
|
};
|
|
@@ -1,83 +1,79 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { icons as
|
|
4
|
-
import { useOffsetPagination as
|
|
5
|
-
import { NInput as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as m, ref as l, onMounted as P, watch as h, createVNode as a } from "vue";
|
|
2
|
+
import { useI18n as C } from "@duxweb/dvha-core";
|
|
3
|
+
import { icons as v } from "@iconify-json/tabler/icons.json";
|
|
4
|
+
import { useOffsetPagination as y } from "@vueuse/core";
|
|
5
|
+
import { NInput as b, NPagination as k } from "naive-ui";
|
|
6
|
+
const I = /* @__PURE__ */ m({
|
|
7
7
|
name: "DuxIconPicker",
|
|
8
8
|
props: {
|
|
9
9
|
onConfirm: Function,
|
|
10
10
|
onClose: Function
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
currentPage:
|
|
16
|
-
currentPageSize:
|
|
12
|
+
setup(d) {
|
|
13
|
+
const i = Object.keys(v), u = l(i), t = l(""), c = l([]), s = l(i.length);
|
|
14
|
+
function n({
|
|
15
|
+
currentPage: e,
|
|
16
|
+
currentPageSize: r
|
|
17
17
|
}) {
|
|
18
|
-
|
|
18
|
+
c.value = u.value.slice((e - 1) * r, e * r);
|
|
19
19
|
}
|
|
20
20
|
const {
|
|
21
21
|
currentPage: o,
|
|
22
|
-
currentPageSize:
|
|
23
|
-
pageCount:
|
|
24
|
-
} =
|
|
25
|
-
total: () =>
|
|
22
|
+
currentPageSize: p,
|
|
23
|
+
pageCount: g
|
|
24
|
+
} = y({
|
|
25
|
+
total: () => s.value,
|
|
26
26
|
page: 1,
|
|
27
27
|
pageSize: 42,
|
|
28
|
-
onPageChange:
|
|
29
|
-
onPageSizeChange:
|
|
30
|
-
onPageCountChange:
|
|
28
|
+
onPageChange: n,
|
|
29
|
+
onPageSizeChange: n,
|
|
30
|
+
onPageCountChange: n
|
|
31
31
|
});
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
P(() => {
|
|
33
|
+
n({
|
|
34
34
|
currentPage: o.value,
|
|
35
35
|
currentPageSize: 42
|
|
36
36
|
});
|
|
37
|
-
}),
|
|
38
|
-
|
|
37
|
+
}), h(t, () => {
|
|
38
|
+
u.value = Object.keys(v).filter((e) => e.includes(t.value)), s.value = u.value.length, o.value = 1, n({
|
|
39
39
|
currentPage: o.value,
|
|
40
|
-
currentPageSize:
|
|
40
|
+
currentPageSize: p.value
|
|
41
41
|
});
|
|
42
42
|
}, {
|
|
43
43
|
immediate: !0
|
|
44
44
|
});
|
|
45
45
|
const {
|
|
46
|
-
t:
|
|
47
|
-
} =
|
|
48
|
-
return () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
pageCount: m.value,
|
|
76
|
-
onUpdatePage: (e) => o.value = e
|
|
77
|
-
}, null)])]);
|
|
78
|
-
};
|
|
46
|
+
t: f
|
|
47
|
+
} = C();
|
|
48
|
+
return () => a("div", {
|
|
49
|
+
class: "p-4 flex flex-col gap-4"
|
|
50
|
+
}, [a(b, {
|
|
51
|
+
placeholder: f("common.keyword"),
|
|
52
|
+
value: t.value,
|
|
53
|
+
"onUpdate:value": (e) => t.value = e,
|
|
54
|
+
clearable: !0
|
|
55
|
+
}, null), a("div", {
|
|
56
|
+
class: "grid grid-cols-6"
|
|
57
|
+
}, [c.value?.map((e, r) => a("div", {
|
|
58
|
+
key: r,
|
|
59
|
+
class: "flex justify-center items-center",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
d.onConfirm?.(`i-tabler:${e}`);
|
|
62
|
+
}
|
|
63
|
+
}, [a("div", {
|
|
64
|
+
class: "py-2 px-3 hover:bg-primary/10 border border-transparent hover:border-primary-hover rounded cursor-pointer transition-all"
|
|
65
|
+
}, [a("div", {
|
|
66
|
+
class: `i-tabler:${e} size-6`
|
|
67
|
+
}, null)])]))]), a("div", {
|
|
68
|
+
class: "flex justify-center"
|
|
69
|
+
}, [a(k, {
|
|
70
|
+
page: o.value,
|
|
71
|
+
pageSize: p.value,
|
|
72
|
+
pageCount: g.value,
|
|
73
|
+
onUpdatePage: (e) => o.value = e
|
|
74
|
+
}, null)])]);
|
|
79
75
|
}
|
|
80
76
|
});
|
|
81
77
|
export {
|
|
82
|
-
|
|
78
|
+
I as default
|
|
83
79
|
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineComponent as b, computed as s, createVNode as a } from "vue";
|
|
2
|
+
const m = /* @__PURE__ */ b({
|
|
3
|
+
name: "CanvasRuler",
|
|
4
|
+
props: {
|
|
5
|
+
canvasWidth: {
|
|
6
|
+
type: Number,
|
|
7
|
+
required: !0
|
|
8
|
+
},
|
|
9
|
+
canvasHeight: {
|
|
10
|
+
type: Number,
|
|
11
|
+
required: !0
|
|
12
|
+
},
|
|
13
|
+
canvasScale: {
|
|
14
|
+
type: Number,
|
|
15
|
+
required: !0
|
|
16
|
+
},
|
|
17
|
+
rulerSize: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 20
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(e) {
|
|
23
|
+
const n = (t, l) => {
|
|
24
|
+
const v = [];
|
|
25
|
+
let r = 10;
|
|
26
|
+
l < 0.5 ? r = 50 : l < 1 && (r = 25);
|
|
27
|
+
for (let i = 0; i <= t; i += r) {
|
|
28
|
+
const f = i * l, h = i % (r * 5) === 0;
|
|
29
|
+
v.push({
|
|
30
|
+
position: f,
|
|
31
|
+
value: i,
|
|
32
|
+
isMajor: h
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return v;
|
|
36
|
+
}, c = s(() => n(e.canvasWidth, e.canvasScale)), d = s(() => n(e.canvasHeight, e.canvasScale)), u = s(() => e.canvasWidth * e.canvasScale), o = s(() => e.canvasHeight * e.canvasScale);
|
|
37
|
+
return () => a("div", {
|
|
38
|
+
class: "absolute inset-0 pointer-events-none"
|
|
39
|
+
}, [a("div", {
|
|
40
|
+
class: "absolute flex justify-center left-6 top-0 right-0 bg-default",
|
|
41
|
+
style: {
|
|
42
|
+
height: `${e.rulerSize}px`
|
|
43
|
+
}
|
|
44
|
+
}, [a("div", {
|
|
45
|
+
class: "absolute top-0 bg-default",
|
|
46
|
+
style: {
|
|
47
|
+
left: "50%",
|
|
48
|
+
transform: "translateX(-50%)",
|
|
49
|
+
width: `${u.value}px`,
|
|
50
|
+
height: `${e.rulerSize}px`
|
|
51
|
+
}
|
|
52
|
+
}, [a("svg", {
|
|
53
|
+
width: u.value,
|
|
54
|
+
height: e.rulerSize,
|
|
55
|
+
class: "absolute top-0 left-0"
|
|
56
|
+
}, [c.value.map((t, l) => a("g", {
|
|
57
|
+
key: l
|
|
58
|
+
}, [a("line", {
|
|
59
|
+
x1: t.position,
|
|
60
|
+
y1: t.isMajor ? 0 : e.rulerSize / 2,
|
|
61
|
+
x2: t.position,
|
|
62
|
+
y2: e.rulerSize,
|
|
63
|
+
stroke: "rgba(0,0,0, 0.1)",
|
|
64
|
+
"stroke-width": "1"
|
|
65
|
+
}, null), t.isMajor && a("text", {
|
|
66
|
+
x: t.position + 2,
|
|
67
|
+
y: e.rulerSize - 6,
|
|
68
|
+
"font-size": "10",
|
|
69
|
+
stroke: "rgba(0,0,0, 0.1)",
|
|
70
|
+
"font-family": "monospace",
|
|
71
|
+
fill: "rgb(var(--ui-text-muted))"
|
|
72
|
+
}, [t.value])]))])])]), a("div", {
|
|
73
|
+
class: "absolute flex justify-center items-center flex-col top-6 left-0 bottom-0 bg-default border-r border-muted",
|
|
74
|
+
style: {
|
|
75
|
+
width: `${e.rulerSize}px`
|
|
76
|
+
}
|
|
77
|
+
}, [a("div", {
|
|
78
|
+
class: "absolute left-0 bg-default",
|
|
79
|
+
style: {
|
|
80
|
+
top: "50%",
|
|
81
|
+
transform: "translateY(-50%)",
|
|
82
|
+
width: `${e.rulerSize}px`,
|
|
83
|
+
height: `${o.value}px`
|
|
84
|
+
}
|
|
85
|
+
}, [a("svg", {
|
|
86
|
+
width: e.rulerSize,
|
|
87
|
+
height: o.value,
|
|
88
|
+
class: "absolute top-0 left-0"
|
|
89
|
+
}, [d.value.map((t, l) => a("g", {
|
|
90
|
+
key: l
|
|
91
|
+
}, [a("line", {
|
|
92
|
+
x1: t.isMajor ? 0 : e.rulerSize / 2,
|
|
93
|
+
y1: t.position,
|
|
94
|
+
x2: e.rulerSize,
|
|
95
|
+
y2: t.position,
|
|
96
|
+
stroke: "rgba(0,0,0, 0.1)",
|
|
97
|
+
"stroke-width": "1"
|
|
98
|
+
}, null), t.isMajor && a("text", {
|
|
99
|
+
x: e.rulerSize - 6,
|
|
100
|
+
y: t.position - 6,
|
|
101
|
+
"font-size": "10",
|
|
102
|
+
fill: "rgb(var(--ui-text-muted))",
|
|
103
|
+
"font-family": "monospace",
|
|
104
|
+
"text-anchor": "end",
|
|
105
|
+
transform: `rotate(-90, ${e.rulerSize - 2}, ${t.position - 2})`
|
|
106
|
+
}, [t.value])]))])])]), a("div", {
|
|
107
|
+
class: "absolute size-6 bg-default top-0 left-0"
|
|
108
|
+
}, null)]);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
m as CanvasRuler
|
|
113
|
+
};
|