@duxweb/dvha-pro 1.0.20 → 1.0.22
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/components/card/card.cjs +1 -1
- package/dist/cjs/components/code/code.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.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/media/media.cjs +1 -1
- package/dist/cjs/components/panel/setting.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/manage/item.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +3 -2
- package/dist/esm/components/card/card.js +1 -1
- package/dist/esm/components/code/code.js +6 -6
- package/dist/esm/components/crop/imageCrop.js +6 -3
- package/dist/esm/components/form/formItem.js +46 -30
- package/dist/esm/components/form/formLayout.js +12 -7
- package/dist/esm/components/media/media.js +4 -4
- package/dist/esm/components/panel/setting.js +13 -9
- package/dist/esm/components/status/listEmpty.js +8 -6
- package/dist/esm/components/table/table.js +30 -29
- package/dist/esm/components/table/tablePage.js +16 -15
- package/dist/esm/components/tree/treeFilter.js +2 -1
- package/dist/esm/components/upload/manage/item.js +3 -2
- package/dist/esm/components/upload/manager.js +65 -61
- package/dist/esm/index.js +4 -4
- package/dist/esm/pages/layout/page.js +30 -19
- package/dist/esm/theme/uno.css.js +3 -2
- package/dist/types/components/form/formItem.d.ts +17 -1
- package/dist/types/components/form/formLayout.d.ts +9 -0
- package/dist/types/components/form/modalForm.d.ts +9 -0
- package/dist/types/components/panel/setting.d.ts +9 -0
- package/dist/types/components/table/index.d.ts +1 -1
- package/dist/types/components/table/table.d.ts +1 -1
- package/dist/types/components/upload/image.d.ts +1 -1
- package/dist/types/components/upload/manage/item.d.ts +3 -0
- package/dist/types/hooks/table/media.d.ts +1 -1
- package/dist/types/main.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as i, provide as d, createVNode as t } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ i({
|
|
3
3
|
name: "DuxFormLayout",
|
|
4
4
|
props: {
|
|
5
5
|
labelPlacement: {
|
|
6
6
|
type: String,
|
|
7
7
|
default: "left"
|
|
8
8
|
},
|
|
9
|
+
labelAlign: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "left"
|
|
12
|
+
},
|
|
9
13
|
labelWidth: {
|
|
10
14
|
type: Number
|
|
11
15
|
},
|
|
@@ -19,20 +23,21 @@ const m = /* @__PURE__ */ d({
|
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
setup(e, {
|
|
22
|
-
slots:
|
|
26
|
+
slots: l
|
|
23
27
|
}) {
|
|
24
|
-
return
|
|
28
|
+
return d("dux.form", {
|
|
25
29
|
labelPlacement: e.labelPlacement,
|
|
30
|
+
labelAlign: e.labelAlign,
|
|
26
31
|
labelWidth: e.labelWidth,
|
|
27
32
|
divider: e.divider
|
|
28
33
|
}), () => {
|
|
29
|
-
var
|
|
34
|
+
var a;
|
|
30
35
|
return t("div", {
|
|
31
36
|
class: ["flex ", e.divider || e.labelPlacement === "page" ? " divide-y divide-default dark:divide-gray-800" : "", e.inline ? "flex-row" : "flex-col", e.labelPlacement === "page" || e.labelPlacement === "setting" ? "container mx-auto" : "gap-4"]
|
|
32
|
-
}, [(
|
|
37
|
+
}, [(a = l == null ? void 0 : l.default) == null ? void 0 : a.call(l)]);
|
|
33
38
|
};
|
|
34
39
|
}
|
|
35
40
|
});
|
|
36
41
|
export {
|
|
37
|
-
|
|
42
|
+
f as DuxFormLayout
|
|
38
43
|
};
|
|
@@ -29,7 +29,7 @@ const I = /* @__PURE__ */ h({
|
|
|
29
29
|
}) {
|
|
30
30
|
const c = y(() => Array.isArray(e.image) ? e.image : e.image ? [e.image] : []), t = y(() => Array.isArray(e.desc) ? e.desc : e.desc ? [e.desc] : []);
|
|
31
31
|
return () => {
|
|
32
|
-
var u, d, g, x, f,
|
|
32
|
+
var u, d, g, x, f, v, l;
|
|
33
33
|
let r;
|
|
34
34
|
return i("div", {
|
|
35
35
|
class: "flex gap-2 items-center"
|
|
@@ -60,17 +60,17 @@ const I = /* @__PURE__ */ h({
|
|
|
60
60
|
var n;
|
|
61
61
|
return (n = e.onClick) == null ? void 0 : n.call(e);
|
|
62
62
|
},
|
|
63
|
-
class: b(["transition-all truncate
|
|
63
|
+
class: b(["transition-all truncate", (e == null ? void 0 : e.onClick) && "hover:text-primary cursor-pointer"])
|
|
64
64
|
}, [e.title || ((g = a.default) == null ? void 0 : g.call(a))])]), ((t == null ? void 0 : t.value.length) > 0 || a.desc) && i("div", {
|
|
65
65
|
class: "text-sm text-muted flex flex-col gap-0"
|
|
66
66
|
}, [(f = t == null ? void 0 : (x = t.value).map) == null ? void 0 : f.call(x, (n, m) => i("div", {
|
|
67
67
|
key: m,
|
|
68
68
|
class: "truncate"
|
|
69
|
-
}, [n])), (
|
|
69
|
+
}, [n])), (v = a.desc) == null ? void 0 : v.call(a)])]), (e == null ? void 0 : e.extend) && i("div", {
|
|
70
70
|
class: "flex-none flex items-center gap-2 text-gray-7"
|
|
71
71
|
}, [e == null ? void 0 : e.extend]), (a == null ? void 0 : a.extend) && i("div", {
|
|
72
72
|
class: "flex-none flex items-center gap-2 text-gray-7"
|
|
73
|
-
}, [(
|
|
73
|
+
}, [(l = a == null ? void 0 : a.extend) == null ? void 0 : l.call(a)])]);
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
});
|
|
@@ -15,29 +15,33 @@ const m = /* @__PURE__ */ r({
|
|
|
15
15
|
},
|
|
16
16
|
padding: {
|
|
17
17
|
type: String
|
|
18
|
+
},
|
|
19
|
+
bordered: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !0
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
|
-
setup(
|
|
24
|
+
setup(d, {
|
|
21
25
|
slots: t
|
|
22
26
|
}) {
|
|
23
27
|
return () => {
|
|
24
|
-
var
|
|
28
|
+
var i;
|
|
25
29
|
return e("div", {
|
|
26
30
|
class: "flex flex-col gap-4"
|
|
27
31
|
}, [e("div", {
|
|
28
|
-
class: "flex items-center"
|
|
32
|
+
class: "flex items-center px-2"
|
|
29
33
|
}, [e("div", {
|
|
30
34
|
class: "flex-1 flex flex-col"
|
|
31
35
|
}, [e("div", {
|
|
32
36
|
class: "text-base"
|
|
33
|
-
}, [
|
|
37
|
+
}, [d.title]), d.description && e("div", {
|
|
34
38
|
class: "text-sm text-muted"
|
|
35
|
-
}, [
|
|
39
|
+
}, [d.description])]), e("div", {
|
|
36
40
|
class: "flex-none flex items-center"
|
|
37
|
-
}, [(
|
|
38
|
-
size:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
}, [(i = t.actions) == null ? void 0 : i.call(t)])]), e(n, {
|
|
42
|
+
size: d.padding,
|
|
43
|
+
shadow: !1,
|
|
44
|
+
bordered: d.bordered
|
|
41
45
|
}, {
|
|
42
46
|
default: () => {
|
|
43
47
|
var a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
1
|
+
import { defineComponent as m, createVNode as e } from "vue";
|
|
2
|
+
import { useI18n as i } from "@duxweb/dvha-core";
|
|
3
3
|
import { DuxDrawEmptyForm as n } from "../draw/drawEmptyForm.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ m({
|
|
5
5
|
name: "DuxListEmpty",
|
|
6
6
|
props: {
|
|
7
7
|
title: String,
|
|
@@ -11,10 +11,12 @@ const a = /* @__PURE__ */ i({
|
|
|
11
11
|
setup(t) {
|
|
12
12
|
const {
|
|
13
13
|
t: l
|
|
14
|
-
} =
|
|
14
|
+
} = i();
|
|
15
15
|
return () => e("div", {
|
|
16
16
|
class: "flex flex-col items-center justify-center gap-2 h-full"
|
|
17
|
-
}, [e(n,
|
|
17
|
+
}, [e(n, {
|
|
18
|
+
class: "max-h-120px"
|
|
19
|
+
}, null), e("div", {
|
|
18
20
|
class: "text-lg text-default font-bold"
|
|
19
21
|
}, [(t == null ? void 0 : t.title) || l("pages.empty.title")]), e("div", {
|
|
20
22
|
class: "text-muted"
|
|
@@ -22,5 +24,5 @@ const a = /* @__PURE__ */ i({
|
|
|
22
24
|
}
|
|
23
25
|
});
|
|
24
26
|
export {
|
|
25
|
-
|
|
27
|
+
s as DuxListEmpty
|
|
26
28
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as u, computed as f, toRef as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import { DuxListEmpty as x } from "../status/listEmpty.js";
|
|
1
|
+
import { defineComponent as u, computed as f, toRef as d, createVNode as i, mergeProps as e } from "vue";
|
|
2
|
+
import { useI18n as c } from "@duxweb/dvha-core";
|
|
3
|
+
import { useWindowSize as b } from "@vueuse/core";
|
|
4
|
+
import { NDataTable as m, NPagination as g } from "naive-ui";
|
|
6
5
|
import "vue-router";
|
|
7
6
|
import "@overlastic/vue";
|
|
7
|
+
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
9
|
-
import { useWindowSize as g } from "@vueuse/core";
|
|
10
9
|
import "vue-cropper";
|
|
11
10
|
import "jinrishici";
|
|
12
11
|
import "lodash-es";
|
|
13
12
|
import "vue-draggable-plus";
|
|
13
|
+
import { DuxListEmpty as x } from "../status/listEmpty.js";
|
|
14
14
|
import "aieditor";
|
|
15
15
|
import "vee-validate";
|
|
16
16
|
import "@vee-validate/i18n";
|
|
@@ -61,46 +61,47 @@ const ft = /* @__PURE__ */ u({
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
extends: m,
|
|
64
|
-
setup(
|
|
64
|
+
setup(o) {
|
|
65
65
|
const p = f(() => {
|
|
66
66
|
const {
|
|
67
|
-
path:
|
|
68
|
-
filter:
|
|
69
|
-
columns:
|
|
67
|
+
path: t,
|
|
68
|
+
filter: h,
|
|
69
|
+
columns: v,
|
|
70
70
|
pagination: D,
|
|
71
71
|
...s
|
|
72
|
-
} =
|
|
72
|
+
} = o;
|
|
73
73
|
return s;
|
|
74
|
-
}),
|
|
75
|
-
path:
|
|
76
|
-
filters:
|
|
77
|
-
columns:
|
|
78
|
-
pagination:
|
|
74
|
+
}), n = d(o.filter || {}), r = y({
|
|
75
|
+
path: o.path,
|
|
76
|
+
filters: n.value,
|
|
77
|
+
columns: o.columns || [],
|
|
78
|
+
pagination: o.pagination
|
|
79
79
|
}), {
|
|
80
80
|
width: l
|
|
81
|
-
} =
|
|
82
|
-
t:
|
|
83
|
-
} =
|
|
84
|
-
return () =>
|
|
85
|
-
class: "flex flex-col"
|
|
86
|
-
}, [
|
|
81
|
+
} = b(), {
|
|
82
|
+
t: a
|
|
83
|
+
} = c();
|
|
84
|
+
return () => i("div", {
|
|
85
|
+
class: "flex flex-col gap-2"
|
|
86
|
+
}, [i(m, e(p.value, r.table.value, {
|
|
87
87
|
class: "flex-1 min-h-0",
|
|
88
88
|
minHeight: 200,
|
|
89
89
|
tableLayout: "fixed",
|
|
90
90
|
flexHeight: !0,
|
|
91
|
-
rowKey: (
|
|
92
|
-
bordered: !1
|
|
91
|
+
rowKey: (t) => t.id,
|
|
92
|
+
bordered: !1,
|
|
93
|
+
renderCell: (t) => t == null || t === "" ? "-" : t
|
|
93
94
|
}), {
|
|
94
|
-
empty: () =>
|
|
95
|
+
empty: () => i(x, {
|
|
95
96
|
bordered: !1
|
|
96
97
|
}, null)
|
|
97
|
-
}),
|
|
98
|
+
}), o.pagination && i("div", {
|
|
98
99
|
class: "flex justify-end"
|
|
99
|
-
}, [
|
|
100
|
+
}, [i(g, e(r.tablePagination.value, {
|
|
100
101
|
simple: l.value < 768
|
|
101
102
|
}), {
|
|
102
|
-
prefix: () =>
|
|
103
|
-
total:
|
|
103
|
+
prefix: () => i("div", null, [a("components.list.total", {
|
|
104
|
+
total: r.total.value || 0
|
|
104
105
|
})])
|
|
105
106
|
})])]);
|
|
106
107
|
}
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NDataTable as
|
|
3
|
-
import { DuxTableLayout as
|
|
1
|
+
import { defineComponent as n, computed as p, createVNode as a, mergeProps as b } from "vue";
|
|
2
|
+
import { NDataTable as o } from "naive-ui";
|
|
3
|
+
import { DuxTableLayout as d } from "../layout/table.js";
|
|
4
4
|
import "@duxweb/dvha-core";
|
|
5
5
|
import "clsx";
|
|
6
|
-
import { DuxListEmpty as
|
|
7
|
-
const y = /* @__PURE__ */
|
|
6
|
+
import { DuxListEmpty as u } from "../status/listEmpty.js";
|
|
7
|
+
const y = /* @__PURE__ */ n({
|
|
8
8
|
name: "DuxTablePage",
|
|
9
9
|
props: {
|
|
10
10
|
tableProps: {
|
|
11
11
|
type: Object
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
extends:
|
|
14
|
+
extends: d,
|
|
15
15
|
slots: Object,
|
|
16
16
|
setup(i, {
|
|
17
17
|
slots: e
|
|
18
18
|
}) {
|
|
19
|
-
const
|
|
19
|
+
const m = p(() => {
|
|
20
20
|
const {
|
|
21
|
-
tableProps:
|
|
22
|
-
...
|
|
21
|
+
tableProps: t,
|
|
22
|
+
...r
|
|
23
23
|
} = i;
|
|
24
|
-
return
|
|
24
|
+
return r;
|
|
25
25
|
});
|
|
26
|
-
return () =>
|
|
27
|
-
default: (
|
|
26
|
+
return () => a(d, m.value, {
|
|
27
|
+
default: (t) => a(o, b(t.table.value, i.tableProps, {
|
|
28
28
|
class: "h-full",
|
|
29
29
|
minHeight: 200,
|
|
30
30
|
tableLayout: "fixed",
|
|
31
31
|
flexHeight: !0,
|
|
32
|
-
rowKey: (
|
|
32
|
+
rowKey: (r) => r.id,
|
|
33
33
|
bordered: !1,
|
|
34
|
-
scrollX:
|
|
34
|
+
scrollX: t.width,
|
|
35
|
+
renderCell: (r) => r == null || r === "" ? "-" : r
|
|
35
36
|
}), {
|
|
36
|
-
empty: () =>
|
|
37
|
+
empty: () => a(u, {
|
|
37
38
|
bordered: !1
|
|
38
39
|
}, null)
|
|
39
40
|
}),
|
|
@@ -21,7 +21,7 @@ const oe = /* @__PURE__ */ Y({
|
|
|
21
21
|
draggable: Boolean,
|
|
22
22
|
bordered: {
|
|
23
23
|
type: Boolean,
|
|
24
|
-
default: !
|
|
24
|
+
default: !1
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
extends: T,
|
|
@@ -136,6 +136,7 @@ const oe = /* @__PURE__ */ Y({
|
|
|
136
136
|
});
|
|
137
137
|
return () => n(le, {
|
|
138
138
|
class: "h-full",
|
|
139
|
+
contentClass: "flex flex-col",
|
|
139
140
|
bordered: t.bordered
|
|
140
141
|
}, {
|
|
141
142
|
default: () => {
|
|
@@ -59,7 +59,8 @@ const xe = /* @__PURE__ */ c({
|
|
|
59
59
|
time: String,
|
|
60
60
|
value: Boolean,
|
|
61
61
|
onContextmenu: Function,
|
|
62
|
-
onSelect: Function
|
|
62
|
+
onSelect: Function,
|
|
63
|
+
page: Boolean
|
|
63
64
|
},
|
|
64
65
|
setup(i) {
|
|
65
66
|
const o = d(), {
|
|
@@ -180,7 +181,7 @@ const xe = /* @__PURE__ */ c({
|
|
|
180
181
|
class: "truncate w-full text-center"
|
|
181
182
|
}, [i.name]), t("div", {
|
|
182
183
|
class: a(["absolute top-2 right-2", i.value ? "block" : "hidden group-hover:block"])
|
|
183
|
-
}, [i.type === "file" && t(u, {
|
|
184
|
+
}, [i.type === "file" && !i.page && t(u, {
|
|
184
185
|
checked: i.value
|
|
185
186
|
}, null)])]);
|
|
186
187
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as fe, ref as
|
|
1
|
+
import { defineComponent as fe, ref as p, computed as te, createVNode as e, nextTick as ve, createTextVNode as oe, isVNode as ge } from "vue";
|
|
2
2
|
import { useI18n as he, useClient as be, useInfiniteList as ye, useUpload as xe } from "@duxweb/dvha-core";
|
|
3
3
|
import { cloneDeep as Me } from "lodash-es";
|
|
4
4
|
import { useMessage as Pe, NTabs as ke, NTab as w, NButton as h, NInput as ne, NInfiniteScroll as Ce, NTooltip as we, NSpin as Se, NDropdown as Ne } from "naive-ui";
|
|
@@ -44,8 +44,8 @@ import { useDownload as Fe } from "../../hooks/download.js";
|
|
|
44
44
|
import "@tanstack/vue-query";
|
|
45
45
|
import "pinia";
|
|
46
46
|
import { DuxFileManageItem as re } from "./manage/item.js";
|
|
47
|
-
function N(
|
|
48
|
-
return typeof
|
|
47
|
+
function N(a) {
|
|
48
|
+
return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !ge(a);
|
|
49
49
|
}
|
|
50
50
|
const Ca = /* @__PURE__ */ fe({
|
|
51
51
|
name: "DuxFileManage",
|
|
@@ -62,24 +62,25 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
62
62
|
handle: String,
|
|
63
63
|
uploadParams: Object
|
|
64
64
|
},
|
|
65
|
-
setup(
|
|
65
|
+
setup(a) {
|
|
66
66
|
var F, I, U, V;
|
|
67
|
-
const
|
|
67
|
+
const b = p(!1), T = p(0), E = p(0), {
|
|
68
68
|
t: o
|
|
69
|
-
} = he(), n =
|
|
70
|
-
|
|
69
|
+
} = he(), n = p([]), x = Te(), S = be(), f = Pe(), ue = Fe(), i = p({
|
|
70
|
+
manager: !0,
|
|
71
|
+
type: a.type || "all",
|
|
71
72
|
folder: null
|
|
72
|
-
}), M =
|
|
73
|
+
}), M = p(), {
|
|
73
74
|
uploadPath: de,
|
|
74
75
|
managePath: P,
|
|
75
76
|
driver: ie
|
|
76
77
|
} = je({
|
|
77
|
-
driver: (F =
|
|
78
|
-
signPath: (I =
|
|
79
|
-
signCallback: (U =
|
|
80
|
-
uploadPath: (V =
|
|
81
|
-
managePath:
|
|
82
|
-
}), se =
|
|
78
|
+
driver: (F = a.uploadParams) == null ? void 0 : F.driver,
|
|
79
|
+
signPath: (I = a.uploadParams) == null ? void 0 : I.signPath,
|
|
80
|
+
signCallback: (U = a.uploadParams) == null ? void 0 : U.signCallback,
|
|
81
|
+
uploadPath: (V = a.uploadParams) == null ? void 0 : V.path,
|
|
82
|
+
managePath: a.path
|
|
83
|
+
}), se = p({
|
|
83
84
|
page: 1,
|
|
84
85
|
pageSize: 20
|
|
85
86
|
}), u = ye({
|
|
@@ -92,20 +93,21 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
92
93
|
signPath: s,
|
|
93
94
|
signCallback: v,
|
|
94
95
|
...C
|
|
95
|
-
} =
|
|
96
|
+
} = a.uploadParams || {};
|
|
96
97
|
return C;
|
|
97
98
|
}), k = xe({
|
|
98
99
|
...ce.value,
|
|
99
100
|
path: de.value,
|
|
100
101
|
autoUpload: !0,
|
|
101
102
|
driver: ie.value,
|
|
103
|
+
params: i.value,
|
|
102
104
|
onSuccess: () => {
|
|
103
105
|
n.value = [], u.refetch();
|
|
104
106
|
},
|
|
105
107
|
onError: (d) => {
|
|
106
108
|
f.error((d == null ? void 0 : d.message) || o("components.uploadManage.uploadError") || "");
|
|
107
109
|
}
|
|
108
|
-
}),
|
|
110
|
+
}), me = (d) => {
|
|
109
111
|
if (!d) {
|
|
110
112
|
f.error(o("components.uploadManage.namePlaceholder") || "");
|
|
111
113
|
return;
|
|
@@ -122,7 +124,7 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
122
124
|
}).catch(() => {
|
|
123
125
|
f.error(o("components.uploadManage.createError") || "");
|
|
124
126
|
});
|
|
125
|
-
},
|
|
127
|
+
}, pe = (d, s, v) => {
|
|
126
128
|
if (!s) {
|
|
127
129
|
f.error(o("components.uploadManage.namePlaceholder") || "");
|
|
128
130
|
return;
|
|
@@ -153,14 +155,14 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
153
155
|
}).catch(() => {
|
|
154
156
|
f.error(o("components.uploadManage.delError") || "");
|
|
155
157
|
});
|
|
156
|
-
},
|
|
158
|
+
}, y = te(() => !!(a.type && a.type !== "all"));
|
|
157
159
|
return () => {
|
|
158
160
|
var C, L, O, $, z, D, _, q, B, A, R, X;
|
|
159
161
|
let d, s, v;
|
|
160
162
|
return e("div", {
|
|
161
|
-
class: ["flex flex-col gap-2",
|
|
163
|
+
class: ["flex flex-col gap-2", a.page ? "h-full" : "h-500px max-h-500px"]
|
|
162
164
|
}, [e("div", {
|
|
163
|
-
class: ["flex-none flex justify-between items-center border-b border-muted p-3",
|
|
165
|
+
class: ["flex-none flex justify-between items-center border-b border-muted p-3", a.handle]
|
|
164
166
|
}, [e("div", {
|
|
165
167
|
class: "flex-none"
|
|
166
168
|
}, [e(ke, {
|
|
@@ -170,26 +172,26 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
170
172
|
tabClass: "!px-4",
|
|
171
173
|
defaultValue: "all",
|
|
172
174
|
value: i.value.type,
|
|
173
|
-
onUpdateValue: (
|
|
174
|
-
|
|
175
|
+
onUpdateValue: (l) => {
|
|
176
|
+
y.value || (i.value.type = l, n.value = []);
|
|
175
177
|
}
|
|
176
178
|
}, {
|
|
177
179
|
default: () => [e(w, {
|
|
178
180
|
tab: o("components.uploadManage.all"),
|
|
179
181
|
name: "all",
|
|
180
|
-
disabled:
|
|
182
|
+
disabled: y.value
|
|
181
183
|
}, null), e(w, {
|
|
182
184
|
tab: o("components.uploadManage.image"),
|
|
183
185
|
name: "image",
|
|
184
|
-
disabled:
|
|
186
|
+
disabled: y.value
|
|
185
187
|
}, null), e(w, {
|
|
186
188
|
tab: o("components.uploadManage.media"),
|
|
187
189
|
name: "media",
|
|
188
|
-
disabled:
|
|
190
|
+
disabled: y.value
|
|
189
191
|
}, null), e(w, {
|
|
190
192
|
tab: o("components.uploadManage.docs"),
|
|
191
193
|
name: "docs",
|
|
192
|
-
disabled:
|
|
194
|
+
disabled: y.value
|
|
193
195
|
}, null)]
|
|
194
196
|
})]), e("div", {
|
|
195
197
|
class: "flex gap-2"
|
|
@@ -205,8 +207,8 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
205
207
|
"v-model:value": "form.name"
|
|
206
208
|
}
|
|
207
209
|
}]
|
|
208
|
-
}).then((
|
|
209
|
-
|
|
210
|
+
}).then((l) => {
|
|
211
|
+
me(l == null ? void 0 : l.name);
|
|
210
212
|
}).catch(() => {
|
|
211
213
|
});
|
|
212
214
|
},
|
|
@@ -229,12 +231,12 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
229
231
|
default: () => [e("div", {
|
|
230
232
|
class: "flex gap-2"
|
|
231
233
|
}, [o("components.uploadManage.upload"), k.progress.value.totalPercent > 0 && `(${k.progress.value.totalPercent}%)`])]
|
|
232
|
-
}), !
|
|
234
|
+
}), !a.page && e(h, {
|
|
233
235
|
type: "default",
|
|
234
236
|
ghost: !0,
|
|
235
237
|
onClick: () => {
|
|
236
|
-
var
|
|
237
|
-
(
|
|
238
|
+
var l;
|
|
239
|
+
(l = a.onClose) == null || l.call(a);
|
|
238
240
|
},
|
|
239
241
|
renderIcon: () => e("div", {
|
|
240
242
|
class: "i-tabler:x"
|
|
@@ -251,13 +253,14 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
251
253
|
}
|
|
252
254
|
}, {
|
|
253
255
|
default: () => {
|
|
254
|
-
var
|
|
256
|
+
var l, t, g, Y, G, H, J, K, Q, W;
|
|
255
257
|
return [e("div", {
|
|
256
|
-
class: ["grid grid-cols-3 md:grid-cols-4 text-sm items-start justify-start", ((
|
|
258
|
+
class: ["grid grid-cols-3 md:grid-cols-4 text-sm items-start justify-start", ((t = (l = u.data.value) == null ? void 0 : l.data) == null ? void 0 : t.length) >= 4 && !a.page ? " lg:grid-cols-[repeat(auto-fit,minmax(150px,1fr))]" : "lg:grid-cols-[repeat(auto-fit,minmax(150px,150px))]"]
|
|
257
259
|
}, [((g = i.value) == null ? void 0 : g.folder) && ((Y = i.value) == null ? void 0 : Y.folder) !== ((H = (G = u.data.value) == null ? void 0 : G.meta) == null ? void 0 : H.folder) && e(re, {
|
|
258
260
|
key: `parent-${(K = (J = u.data.value) == null ? void 0 : J.meta) == null ? void 0 : K.folder}`,
|
|
259
261
|
type: "folder",
|
|
260
262
|
name: o("components.uploadManage.parentLevel"),
|
|
263
|
+
page: a.page,
|
|
261
264
|
onSelect: () => {
|
|
262
265
|
var r, c;
|
|
263
266
|
n.value = [], i.value.folder = (c = (r = u.data.value) == null ? void 0 : r.meta) == null ? void 0 : c.folder;
|
|
@@ -271,24 +274,25 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
271
274
|
trigger: () => {
|
|
272
275
|
var c, Z;
|
|
273
276
|
return e(re, {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
page: a.page,
|
|
278
|
+
onContextmenu: (m) => {
|
|
279
|
+
M.value = r, b.value = !1, ve().then(() => {
|
|
280
|
+
b.value = !0, T.value = m.clientX, E.value = m.clientY;
|
|
281
|
+
}), m.preventDefault();
|
|
278
282
|
},
|
|
279
|
-
value:
|
|
283
|
+
value: a.page ? !1 : !!((Z = (c = n.value) == null ? void 0 : c.find) != null && Z.call(c, (m) => m.id === r.id)),
|
|
280
284
|
type: r.url ? "file" : "folder",
|
|
281
285
|
mime: r.filetype,
|
|
282
286
|
name: r.filename,
|
|
283
287
|
url: r.url,
|
|
284
288
|
time: r.time,
|
|
285
|
-
onSelect: (
|
|
289
|
+
onSelect: (m) => {
|
|
286
290
|
var ee, ae, le;
|
|
287
291
|
if (!r.url) {
|
|
288
292
|
n.value = [], u.data.value = void 0, i.value.folder = r.id;
|
|
289
293
|
return;
|
|
290
294
|
}
|
|
291
|
-
|
|
295
|
+
a.page || (m ? a.multiple ? (ee = n.value) == null || ee.push(r) : n.value = [r] : a.multiple ? (le = n.value) == null || le.splice((ae = n.value) == null ? void 0 : ae.indexOf(r), 1) : n.value = []);
|
|
292
296
|
}
|
|
293
297
|
}, null);
|
|
294
298
|
}
|
|
@@ -312,8 +316,8 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
312
316
|
type: "default",
|
|
313
317
|
ghost: !0,
|
|
314
318
|
onClick: () => {
|
|
315
|
-
var
|
|
316
|
-
n.value = [], i.value.folder = (
|
|
319
|
+
var l, t;
|
|
320
|
+
n.value = [], i.value.folder = (t = (l = u.data.value) == null ? void 0 : l.meta) == null ? void 0 : t.folder;
|
|
317
321
|
}
|
|
318
322
|
}, N(s = o("components.uploadManage.back")) ? s : {
|
|
319
323
|
default: () => [s]
|
|
@@ -322,18 +326,18 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
322
326
|
y: E.value,
|
|
323
327
|
placement: "bottom-start",
|
|
324
328
|
trigger: "manual",
|
|
325
|
-
show:
|
|
329
|
+
show: b.value,
|
|
326
330
|
onClickoutside: () => {
|
|
327
|
-
|
|
331
|
+
b.value = !1;
|
|
328
332
|
},
|
|
329
|
-
onUpdateShow: (
|
|
330
|
-
|
|
333
|
+
onUpdateShow: (l) => {
|
|
334
|
+
l || (M.value = void 0);
|
|
331
335
|
},
|
|
332
|
-
onSelect: (
|
|
333
|
-
const
|
|
334
|
-
switch (
|
|
336
|
+
onSelect: (l) => {
|
|
337
|
+
const t = Me(M.value);
|
|
338
|
+
switch (b.value = !1, l) {
|
|
335
339
|
case "download":
|
|
336
|
-
ue.url(
|
|
340
|
+
ue.url(t == null ? void 0 : t.url);
|
|
337
341
|
break;
|
|
338
342
|
case "rename":
|
|
339
343
|
x.prompt({
|
|
@@ -345,10 +349,10 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
345
349
|
}
|
|
346
350
|
}],
|
|
347
351
|
defaultValue: {
|
|
348
|
-
name: (
|
|
352
|
+
name: (t == null ? void 0 : t.filename) || (t == null ? void 0 : t.name)
|
|
349
353
|
}
|
|
350
354
|
}).then((g) => {
|
|
351
|
-
|
|
355
|
+
pe(t == null ? void 0 : t.type, g == null ? void 0 : g.name, t == null ? void 0 : t.id);
|
|
352
356
|
});
|
|
353
357
|
break;
|
|
354
358
|
case "delete":
|
|
@@ -356,7 +360,7 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
356
360
|
title: o("components.uploadManage.delTitle"),
|
|
357
361
|
content: o("components.uploadManage.delDesc")
|
|
358
362
|
}).then(() => {
|
|
359
|
-
j(
|
|
363
|
+
j(t == null ? void 0 : t.type, t == null ? void 0 : t.id);
|
|
360
364
|
});
|
|
361
365
|
break;
|
|
362
366
|
}
|
|
@@ -379,8 +383,8 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
379
383
|
icon: () => e("div", {
|
|
380
384
|
class: "i-tabler:trash"
|
|
381
385
|
}, null)
|
|
382
|
-
}].filter((
|
|
383
|
-
}, null), !
|
|
386
|
+
}].filter((l) => l)
|
|
387
|
+
}, null), !a.page && e("div", {
|
|
384
388
|
class: "flex justify-end gap-2 border-t border-muted p-3"
|
|
385
389
|
}, [e("div", null, [((R = n.value) == null ? void 0 : R.length) > 0 && e(h, {
|
|
386
390
|
type: "error",
|
|
@@ -390,8 +394,8 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
390
394
|
title: o("components.uploadManage.delTitle"),
|
|
391
395
|
content: o("components.uploadManage.delDesc")
|
|
392
396
|
}).then(() => {
|
|
393
|
-
var
|
|
394
|
-
j("file", (
|
|
397
|
+
var l;
|
|
398
|
+
j("file", (l = n.value) == null ? void 0 : l.map((t) => t.id));
|
|
395
399
|
});
|
|
396
400
|
}
|
|
397
401
|
}, N(v = o("components.button.delete")) ? v : {
|
|
@@ -400,13 +404,13 @@ const Ca = /* @__PURE__ */ fe({
|
|
|
400
404
|
type: "primary",
|
|
401
405
|
disabled: !((X = n.value) != null && X.length),
|
|
402
406
|
onClick: () => {
|
|
403
|
-
var
|
|
404
|
-
(
|
|
407
|
+
var l;
|
|
408
|
+
(l = a.onConfirm) == null || l.call(a, n.value);
|
|
405
409
|
}
|
|
406
410
|
}, {
|
|
407
411
|
default: () => {
|
|
408
|
-
var
|
|
409
|
-
return [o("components.button.select"), oe("("), ((
|
|
412
|
+
var l;
|
|
413
|
+
return [o("components.button.select"), oe("("), ((l = n.value) == null ? void 0 : l.length) || 0, oe(")")];
|
|
410
414
|
}
|
|
411
415
|
})])])]);
|
|
412
416
|
};
|