@duxweb/dvha-pro 1.0.24 → 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/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/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/settingForm.cjs +1 -1
- package/dist/cjs/components/icon/icon.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/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/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/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/index.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/page.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/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +25 -1
- package/dist/esm/component.js +49 -47
- package/dist/esm/components/chart/echart.js +15 -13
- package/dist/esm/components/crop/imageCrop.js +15 -13
- package/dist/esm/components/data/dynamicSelect.js +15 -13
- package/dist/esm/components/data/selectModal.js +20 -18
- package/dist/esm/components/form/drawerForm.js +21 -19
- package/dist/esm/components/form/modalForm.js +15 -13
- package/dist/esm/components/form/pageForm.js +13 -11
- package/dist/esm/components/form/settingForm.js +12 -10
- package/dist/esm/components/icon/icon.js +15 -13
- 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/list.js +16 -14
- package/dist/esm/components/layout/table.js +16 -14
- package/dist/esm/components/level/level.js +15 -13
- package/dist/esm/components/table/table.js +15 -13
- package/dist/esm/components/upload/file.js +98 -88
- package/dist/esm/components/upload/image.js +106 -94
- package/dist/esm/components/upload/manage/item.js +15 -13
- package/dist/esm/components/upload/manager.js +65 -63
- package/dist/esm/hooks/dialog.js +15 -13
- package/dist/esm/hooks/drawer.js +15 -13
- package/dist/esm/hooks/modal.js +15 -13
- package/dist/esm/hooks/table/image.js +15 -13
- package/dist/esm/hooks/table/media.js +15 -13
- package/dist/esm/index.js +213 -202
- package/dist/esm/pages/authLayout.js +15 -13
- package/dist/esm/pages/layout/page.js +15 -13
- package/dist/esm/pages/layout.js +7 -6
- package/dist/esm/pages/login.js +16 -15
- package/dist/esm/pages/menu/avatar.js +15 -13
- package/dist/esm/pages/menu/button.js +15 -13
- package/dist/esm/pages/menu/cmd.js +26 -24
- package/dist/esm/pages/menu/main.js +25 -23
- package/dist/esm/pages/menu/mobile.js +15 -13
- package/dist/esm/pages/page404.js +13 -11
- package/dist/esm/pages/pageStatus.js +15 -13
- package/dist/esm/theme/uno.css.js +25 -1
- 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/stats/number.d.ts +1 -1
- package/dist/types/components/upload/file.d.ts +5 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/pages/layout/global.d.ts +0 -1
- package/package.json +6 -3
|
@@ -6,6 +6,17 @@ import { useAction as oe } from "../../hooks/action.js";
|
|
|
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 le from "../modal/modalPage.js";
|
|
11
22
|
import "jinrishici";
|
|
@@ -29,21 +40,12 @@ import "@duxweb/dvha-naiveui";
|
|
|
29
40
|
import { DuxPage as ie } from "../../pages/page.js";
|
|
30
41
|
import "../../pages/page404.js";
|
|
31
42
|
import "@iconify-json/tabler/icons.json";
|
|
43
|
+
import "../image/elements/index.js";
|
|
44
|
+
import "fabric";
|
|
45
|
+
import "mime";
|
|
32
46
|
import { DuxTableFilter as ae } from "./filter.js";
|
|
33
47
|
import { DuxFilterLayout as re } from "./filterLayout.js";
|
|
34
48
|
import { DuxTableTools as ne } from "./tools.js";
|
|
35
|
-
import "mime";
|
|
36
|
-
import "vue3-ace-editor";
|
|
37
|
-
import "ace-builds/src-noconflict/mode-vue";
|
|
38
|
-
import "ace-builds/src-noconflict/mode-javascript";
|
|
39
|
-
import "ace-builds/src-noconflict/mode-html";
|
|
40
|
-
import "ace-builds/src-noconflict/mode-json";
|
|
41
|
-
import "ace-builds/src-noconflict/mode-json5";
|
|
42
|
-
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
43
|
-
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
44
|
-
import "ace-builds/src-noconflict/ext-searchbox";
|
|
45
|
-
import "ace-builds/src-noconflict/ext-language_tools";
|
|
46
|
-
import "ace-builds/src-noconflict/mode-snippets";
|
|
47
49
|
import "dayjs";
|
|
48
50
|
import "@tanstack/vue-query";
|
|
49
51
|
import { useTable as se } from "../../hooks/table.js";
|
|
@@ -51,7 +53,7 @@ import "pinia";
|
|
|
51
53
|
function ue(t) {
|
|
52
54
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !G(t);
|
|
53
55
|
}
|
|
54
|
-
const
|
|
56
|
+
const st = /* @__PURE__ */ J({
|
|
55
57
|
name: "DuxTableLayout",
|
|
56
58
|
props: {
|
|
57
59
|
path: {
|
|
@@ -381,5 +383,5 @@ const rt = /* @__PURE__ */ J({
|
|
|
381
383
|
}
|
|
382
384
|
});
|
|
383
385
|
export {
|
|
384
|
-
|
|
386
|
+
st as DuxTableLayout
|
|
385
387
|
};
|
|
@@ -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,22 +36,13 @@ 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 "dayjs";
|
|
41
43
|
import { useLevel as c } from "../../hooks/level.js";
|
|
42
44
|
import "pinia";
|
|
43
|
-
const
|
|
45
|
+
const le = /* @__PURE__ */ v({
|
|
44
46
|
name: "DuxLevel",
|
|
45
47
|
props: {
|
|
46
48
|
value: {
|
|
@@ -111,5 +113,5 @@ const me = /* @__PURE__ */ v({
|
|
|
111
113
|
}
|
|
112
114
|
});
|
|
113
115
|
export {
|
|
114
|
-
|
|
116
|
+
le as DuxLevel
|
|
115
117
|
};
|
|
@@ -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";
|
|
@@ -26,23 +37,14 @@ import "vue-command-palette";
|
|
|
26
37
|
import "@duxweb/dvha-naiveui";
|
|
27
38
|
import "../../pages/page404.js";
|
|
28
39
|
import "@iconify-json/tabler/icons.json";
|
|
40
|
+
import "../image/elements/index.js";
|
|
41
|
+
import "fabric";
|
|
29
42
|
import "mime";
|
|
30
|
-
import "vue3-ace-editor";
|
|
31
|
-
import "ace-builds/src-noconflict/mode-vue";
|
|
32
|
-
import "ace-builds/src-noconflict/mode-javascript";
|
|
33
|
-
import "ace-builds/src-noconflict/mode-html";
|
|
34
|
-
import "ace-builds/src-noconflict/mode-json";
|
|
35
|
-
import "ace-builds/src-noconflict/mode-json5";
|
|
36
|
-
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
37
|
-
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
38
|
-
import "ace-builds/src-noconflict/ext-searchbox";
|
|
39
|
-
import "ace-builds/src-noconflict/ext-language_tools";
|
|
40
|
-
import "ace-builds/src-noconflict/mode-snippets";
|
|
41
43
|
import "dayjs";
|
|
42
44
|
import "@tanstack/vue-query";
|
|
43
45
|
import { useTable as y } from "../../hooks/table.js";
|
|
44
46
|
import "pinia";
|
|
45
|
-
const
|
|
47
|
+
const ct = /* @__PURE__ */ u({
|
|
46
48
|
name: "DuxTable",
|
|
47
49
|
props: {
|
|
48
50
|
path: {
|
|
@@ -107,5 +109,5 @@ const ft = /* @__PURE__ */ u({
|
|
|
107
109
|
}
|
|
108
110
|
});
|
|
109
111
|
export {
|
|
110
|
-
|
|
112
|
+
ct as DuxTable
|
|
111
113
|
};
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import
|
|
5
|
-
import { useMessage as
|
|
1
|
+
import { defineComponent as M, ref as v, computed as s, watch as h, createVNode as o, Fragment as A, createTextVNode as U, isVNode as w } from "vue";
|
|
2
|
+
import { useI18n as Z, useUpload as j } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as O, useDropZone as B } from "@vueuse/core";
|
|
4
|
+
import X from "mime";
|
|
5
|
+
import { useMessage as E, NDataTable as L, NProgress as T, NButton as b } from "naive-ui";
|
|
6
6
|
import "vue-router";
|
|
7
7
|
import "@overlastic/vue";
|
|
8
|
-
import { DuxMedia as
|
|
8
|
+
import { DuxMedia as I } from "../media/media.js";
|
|
9
9
|
import "vue-echarts";
|
|
10
|
+
import "vue3-ace-editor";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
13
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
14
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
15
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
16
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
17
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
18
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
19
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
10
21
|
import "vue-cropper";
|
|
11
22
|
import "clsx";
|
|
12
23
|
import "jinrishici";
|
|
@@ -27,24 +38,15 @@ import "vue-command-palette";
|
|
|
27
38
|
import "@duxweb/dvha-naiveui";
|
|
28
39
|
import "../../pages/page404.js";
|
|
29
40
|
import "@iconify-json/tabler/icons.json";
|
|
30
|
-
import
|
|
31
|
-
import "
|
|
32
|
-
import "
|
|
33
|
-
import "
|
|
34
|
-
import "ace-builds/src-noconflict/mode-html";
|
|
35
|
-
import "ace-builds/src-noconflict/mode-json";
|
|
36
|
-
import "ace-builds/src-noconflict/mode-json5";
|
|
37
|
-
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
38
|
-
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
39
|
-
import "ace-builds/src-noconflict/ext-searchbox";
|
|
40
|
-
import "ace-builds/src-noconflict/ext-language_tools";
|
|
41
|
-
import "ace-builds/src-noconflict/mode-snippets";
|
|
42
|
-
import { useModal as W } from "../../hooks/modal.js";
|
|
41
|
+
import "../image/elements/index.js";
|
|
42
|
+
import "fabric";
|
|
43
|
+
import { useUploadConfig as W } from "./config.js";
|
|
44
|
+
import { useModal as G } from "../../hooks/modal.js";
|
|
43
45
|
import "dayjs";
|
|
44
46
|
import "@tanstack/vue-query";
|
|
45
47
|
import "pinia";
|
|
46
|
-
function
|
|
47
|
-
return typeof
|
|
48
|
+
function y(t) {
|
|
49
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !w(t);
|
|
48
50
|
}
|
|
49
51
|
const m = {
|
|
50
52
|
"image/*": "JPG, PNG, GIF, BMP, WEBP",
|
|
@@ -77,7 +79,7 @@ const m = {
|
|
|
77
79
|
empty: "flex items-center justify-center h-full text-muted",
|
|
78
80
|
actions: "flex gap-2"
|
|
79
81
|
}
|
|
80
|
-
},
|
|
82
|
+
}, Xe = /* @__PURE__ */ M({
|
|
81
83
|
name: "DuxFileUpload",
|
|
82
84
|
props: {
|
|
83
85
|
path: {
|
|
@@ -106,57 +108,57 @@ const m = {
|
|
|
106
108
|
defaultValue: [String, Array],
|
|
107
109
|
onUpdateValue: Function
|
|
108
110
|
},
|
|
109
|
-
setup(
|
|
110
|
-
emit:
|
|
111
|
+
setup(t, {
|
|
112
|
+
emit: F
|
|
111
113
|
}) {
|
|
112
|
-
const
|
|
114
|
+
const c = O(t, "value", F, {
|
|
113
115
|
passive: !0,
|
|
114
116
|
deep: !0,
|
|
115
|
-
defaultValue:
|
|
116
|
-
}),
|
|
117
|
+
defaultValue: t.defaultValue
|
|
118
|
+
}), P = E(), {
|
|
117
119
|
t: a
|
|
118
|
-
} =
|
|
119
|
-
uploadPath:
|
|
120
|
-
managePath:
|
|
121
|
-
driver:
|
|
122
|
-
} =
|
|
123
|
-
driver:
|
|
124
|
-
signPath:
|
|
125
|
-
signCallback:
|
|
126
|
-
uploadPath:
|
|
127
|
-
managePath:
|
|
128
|
-
}), n =
|
|
129
|
-
path:
|
|
130
|
-
multiple:
|
|
131
|
-
maxFileCount:
|
|
120
|
+
} = Z(), d = v(), p = s(() => t.maxSize || 5), C = G(), {
|
|
121
|
+
uploadPath: u,
|
|
122
|
+
managePath: S,
|
|
123
|
+
driver: N
|
|
124
|
+
} = W({
|
|
125
|
+
driver: t?.driver,
|
|
126
|
+
signPath: t?.signPath,
|
|
127
|
+
signCallback: t?.signCallback,
|
|
128
|
+
uploadPath: t?.path,
|
|
129
|
+
managePath: t?.managePath
|
|
130
|
+
}), n = j({
|
|
131
|
+
path: u.value,
|
|
132
|
+
multiple: t.multiple,
|
|
133
|
+
maxFileCount: t.maxNum,
|
|
132
134
|
maxFileSize: p.value * 1024 * 1024,
|
|
133
135
|
autoUpload: !0,
|
|
134
|
-
accept:
|
|
135
|
-
onError: (
|
|
136
|
-
driver:
|
|
136
|
+
accept: t.accept,
|
|
137
|
+
onError: (e) => P.error(e.message || a("components.upload.error")),
|
|
138
|
+
driver: N.value
|
|
137
139
|
}), {
|
|
138
|
-
isOverDropZone:
|
|
139
|
-
} =
|
|
140
|
-
onDrop: (
|
|
141
|
-
|
|
140
|
+
isOverDropZone: f
|
|
141
|
+
} = B(d, {
|
|
142
|
+
onDrop: (e) => {
|
|
143
|
+
e && e.length > 0 && n.addFiles(Array.from(e), "file");
|
|
142
144
|
}
|
|
143
145
|
});
|
|
144
|
-
|
|
145
|
-
const i =
|
|
146
|
-
|
|
146
|
+
h(n.dataFiles, (e) => {
|
|
147
|
+
const i = t.multiple ? e : e[0];
|
|
148
|
+
c.value = i, t.onUpdateValue?.(i);
|
|
147
149
|
});
|
|
148
|
-
const
|
|
149
|
-
const i =
|
|
150
|
+
const g = s(() => t.accept ? t.accept.split(",").map((e) => {
|
|
151
|
+
const i = e.trim();
|
|
150
152
|
if (m[i]) return m[i];
|
|
151
153
|
if (i.includes("*")) {
|
|
152
|
-
const
|
|
154
|
+
const D = i.split("/")[0];
|
|
153
155
|
return m[i] || a("common.fileExtension", {
|
|
154
|
-
ext:
|
|
156
|
+
ext: D.toUpperCase()
|
|
155
157
|
});
|
|
156
158
|
}
|
|
157
|
-
const l =
|
|
159
|
+
const l = X.getExtension(i);
|
|
158
160
|
return l ? l.toUpperCase() : i;
|
|
159
|
-
}).filter(Boolean).join(", ") : ""),
|
|
161
|
+
}).filter(Boolean).join(", ") : ""), V = s(() => ({
|
|
160
162
|
pending: o("div", {
|
|
161
163
|
class: "text-info"
|
|
162
164
|
}, [a("components.upload.status.pending")]),
|
|
@@ -169,29 +171,37 @@ const m = {
|
|
|
169
171
|
error: o("div", {
|
|
170
172
|
class: "text-error"
|
|
171
173
|
}, [a("components.upload.status.error")])
|
|
172
|
-
})),
|
|
173
|
-
return () =>
|
|
174
|
+
})), z = s(() => [r.dropZone.base, f.value ? r.dropZone.active : r.dropZone.hover]), k = s(() => [n.uploadFiles.value.length === 0 && "border-b border-muted"]), x = v(!1);
|
|
175
|
+
return h(c, (e) => {
|
|
176
|
+
if (!e || !e?.length || x.value)
|
|
177
|
+
return;
|
|
178
|
+
x.value = !0;
|
|
179
|
+
const i = Array.isArray(e) ? e : [e];
|
|
180
|
+
n.addDataFiles(i);
|
|
181
|
+
}, {
|
|
182
|
+
immediate: !0
|
|
183
|
+
}), () => o("div", {
|
|
174
184
|
class: r.container
|
|
175
185
|
}, [o("div", {
|
|
176
|
-
ref:
|
|
177
|
-
class:
|
|
186
|
+
ref: d,
|
|
187
|
+
class: z.value,
|
|
178
188
|
onClick: () => n.open()
|
|
179
189
|
}, [o("div", {
|
|
180
190
|
class: r.content
|
|
181
191
|
}, [o("div", {
|
|
182
192
|
class: r.icon.wrapper,
|
|
183
|
-
onClick: (
|
|
184
|
-
|
|
193
|
+
onClick: (e) => {
|
|
194
|
+
t.manager && (e.stopPropagation(), C.show({
|
|
185
195
|
title: a("components.upload.title"),
|
|
186
196
|
width: 800,
|
|
187
197
|
component: () => import("./manager.js"),
|
|
188
198
|
componentProps: {
|
|
189
|
-
path:
|
|
190
|
-
multiple:
|
|
199
|
+
path: S.value,
|
|
200
|
+
multiple: t.multiple,
|
|
191
201
|
uploadParams: {
|
|
192
|
-
path:
|
|
193
|
-
accept:
|
|
194
|
-
maxNum:
|
|
202
|
+
path: u.value,
|
|
203
|
+
accept: t.accept,
|
|
204
|
+
maxNum: t.maxNum,
|
|
195
205
|
maxSize: p.value
|
|
196
206
|
}
|
|
197
207
|
}
|
|
@@ -205,22 +215,22 @@ const m = {
|
|
|
205
215
|
class: r.text.title
|
|
206
216
|
}, [a("components.upload.desc")]), o("div", {
|
|
207
217
|
class: r.text.desc
|
|
208
|
-
}, [
|
|
218
|
+
}, [f.value ? o("span", {
|
|
209
219
|
class: r.text.highlight
|
|
210
|
-
}, [a("components.upload.dropHere")]) : o(
|
|
211
|
-
formats:
|
|
220
|
+
}, [a("components.upload.dropHere")]) : o(A, null, [g.value ? a("components.upload.supportFormats", {
|
|
221
|
+
formats: g.value
|
|
212
222
|
}) : a("components.upload.allFormats"), U(","), " ", a("components.upload.maxSize", {
|
|
213
223
|
size: p.value
|
|
214
|
-
})])])])]), o(
|
|
224
|
+
})])])])]), o(L, {
|
|
215
225
|
bordered: !1,
|
|
216
|
-
class:
|
|
226
|
+
class: k.value,
|
|
217
227
|
columns: [{
|
|
218
228
|
key: "filename",
|
|
219
229
|
title: a("components.upload.file.name"),
|
|
220
230
|
minWidth: 200,
|
|
221
|
-
render: (
|
|
222
|
-
title:
|
|
223
|
-
desc:
|
|
231
|
+
render: (e) => o(I, {
|
|
232
|
+
title: e.filename,
|
|
233
|
+
desc: e.filetype
|
|
224
234
|
}, null)
|
|
225
235
|
}, {
|
|
226
236
|
key: "filesizeText",
|
|
@@ -230,7 +240,7 @@ const m = {
|
|
|
230
240
|
key: "status",
|
|
231
241
|
title: a("components.upload.file.status"),
|
|
232
242
|
width: 120,
|
|
233
|
-
render: (
|
|
243
|
+
render: (e) => e.status === "uploading" ? o(T, {
|
|
234
244
|
type: "line",
|
|
235
245
|
style: {
|
|
236
246
|
width: "24px",
|
|
@@ -238,32 +248,32 @@ const m = {
|
|
|
238
248
|
},
|
|
239
249
|
color: "rgb(var(--ui-color-primary))",
|
|
240
250
|
"indicator-placement": "inside",
|
|
241
|
-
percentage:
|
|
251
|
+
percentage: e.progress?.percent,
|
|
242
252
|
showIndicator: !1,
|
|
243
253
|
height: 14
|
|
244
|
-
}, null) :
|
|
254
|
+
}, null) : V.value[e.status]
|
|
245
255
|
}, {
|
|
246
256
|
key: "actions",
|
|
247
257
|
title: a("components.upload.actions"),
|
|
248
258
|
width: 120,
|
|
249
|
-
render: (
|
|
259
|
+
render: (e) => {
|
|
250
260
|
let i, l;
|
|
251
261
|
return o("div", {
|
|
252
262
|
class: r.table.actions
|
|
253
|
-
}, [o(
|
|
263
|
+
}, [o(b, {
|
|
254
264
|
type: "warning",
|
|
255
265
|
size: "small",
|
|
256
266
|
text: !0,
|
|
257
|
-
disabled: ["success", "error", "cancelled"].includes(
|
|
258
|
-
onClick: () => n.cancelFiles([
|
|
259
|
-
},
|
|
267
|
+
disabled: ["success", "error", "cancelled"].includes(e.status),
|
|
268
|
+
onClick: () => n.cancelFiles([e.id])
|
|
269
|
+
}, y(i = a("components.upload.cancel")) ? i : {
|
|
260
270
|
default: () => [i]
|
|
261
|
-
}), o(
|
|
271
|
+
}), o(b, {
|
|
262
272
|
type: "error",
|
|
263
273
|
size: "small",
|
|
264
274
|
text: !0,
|
|
265
|
-
onClick: () => n.removeFiles([
|
|
266
|
-
},
|
|
275
|
+
onClick: () => n.removeFiles([e.id])
|
|
276
|
+
}, y(l = a("components.upload.delete")) ? l : {
|
|
267
277
|
default: () => [l]
|
|
268
278
|
})]);
|
|
269
279
|
}
|
|
@@ -277,5 +287,5 @@ const m = {
|
|
|
277
287
|
}
|
|
278
288
|
});
|
|
279
289
|
export {
|
|
280
|
-
|
|
290
|
+
Xe as DuxFileUpload
|
|
281
291
|
};
|