@duxweb/dvha-pro 1.1.21 → 1.1.23
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/cascaderPanel/cascaderPanel.cjs +1 -0
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
- package/dist/cjs/components/data/dynamicData.cjs +1 -1
- package/dist/cjs/components/data/selectModal.cjs +1 -1
- package/dist/cjs/components/designEditor/editor/setting.cjs +1 -1
- package/dist/cjs/components/designEditor/editor.cjs +1 -1
- package/dist/cjs/components/drawer/drawer.cjs +1 -1
- package/dist/cjs/components/flowEditor/components/setting.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/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/pageTabForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/formEditor/components/imageUpload.cjs +1 -1
- package/dist/cjs/components/formEditor/editor.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/mapCoord/mapCoord.cjs +1 -0
- package/dist/cjs/components/media/media.cjs +1 -1
- package/dist/cjs/components/modal/modalTab.cjs +1 -1
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -1
- package/dist/cjs/components/select/selectCard.cjs +1 -1
- package/dist/cjs/components/spec/spec.cjs +1 -1
- package/dist/cjs/components/stats/realTime.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/textImageEditor/textImageEditor.cjs +1 -0
- package/dist/cjs/components/textImageEditor/textModal.cjs +1 -0
- 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/upload/video.cjs +1 -0
- package/dist/cjs/components/widget/connect.cjs +1 -1
- package/dist/cjs/dvha-pro.css +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/hooks/table/switch.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/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/menuApp.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/menu/notice.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 +26 -4
- package/dist/esm/component.js +21 -20
- package/dist/esm/components/cascaderPanel/cascaderPanel.js +378 -0
- package/dist/esm/components/chart/echart.js +1 -1
- package/dist/esm/components/dashboard/helloBig.js +3 -2
- package/dist/esm/components/data/dynamicData.js +49 -40
- package/dist/esm/components/data/selectModal.js +3 -3
- package/dist/esm/components/designEditor/editor/setting.js +2 -2
- package/dist/esm/components/designEditor/editor.js +3 -2
- package/dist/esm/components/drawer/drawer.js +22 -19
- package/dist/esm/components/flowEditor/components/setting.js +1 -1
- package/dist/esm/components/form/drawerForm.js +1 -1
- package/dist/esm/components/form/formItem.js +1 -1
- package/dist/esm/components/form/modalForm.js +1 -1
- package/dist/esm/components/form/pageForm.js +1 -1
- package/dist/esm/components/form/pageTabForm.js +1 -1
- package/dist/esm/components/form/settingForm.js +1 -1
- package/dist/esm/components/formEditor/components/imageUpload.js +1 -1
- package/dist/esm/components/formEditor/editor.js +1 -1
- package/dist/esm/components/layout/table.js +74 -56
- package/dist/esm/components/layout/tools.js +8 -8
- package/dist/esm/components/mapCoord/mapCoord.js +218 -0
- package/dist/esm/components/media/media.js +57 -32
- package/dist/esm/components/modal/modalTab.js +20 -14
- package/dist/esm/components/panel/setting.js +3 -2
- package/dist/esm/components/posterEditor/posterEditor.js +1 -1
- package/dist/esm/components/select/selectCard.js +3 -3
- package/dist/esm/components/spec/spec.js +142 -103
- package/dist/esm/components/stats/realTime.js +5 -4
- package/dist/esm/components/table/table.js +19 -19
- package/dist/esm/components/textImageEditor/textImageEditor.js +405 -0
- package/dist/esm/components/textImageEditor/textModal.js +77 -0
- package/dist/esm/components/upload/image.js +35 -34
- package/dist/esm/components/upload/manage/item.js +1 -1
- package/dist/esm/components/upload/manager.js +155 -138
- package/dist/esm/components/upload/video.js +340 -0
- package/dist/esm/components/widget/connect.js +3 -2
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/dialog.js +2 -2
- package/dist/esm/hooks/drawer.js +2 -2
- package/dist/esm/hooks/modal.js +2 -2
- package/dist/esm/hooks/table/image.js +2 -2
- package/dist/esm/hooks/table/media.js +2 -2
- package/dist/esm/hooks/table/switch.js +58 -26
- package/dist/esm/index.js +308 -296
- package/dist/esm/langs/en-US.json.js +1 -1
- package/dist/esm/langs/zh-CN.json.js +1 -1
- package/dist/esm/pages/authLayout.js +1 -1
- package/dist/esm/pages/login.js +2 -2
- package/dist/esm/pages/menu/avatar.js +1 -1
- package/dist/esm/pages/menu/button.js +1 -1
- package/dist/esm/pages/menu/menuApp.js +1 -1
- package/dist/esm/pages/menu/mobile.js +1 -1
- package/dist/esm/pages/menu/notice.js +1 -1
- package/dist/esm/pages/page404.js +1 -1
- package/dist/esm/pages/pageStatus.js +2 -2
- package/dist/esm/theme/uno.css.js +26 -4
- package/dist/types/components/cascaderPanel/cascaderPanel.d.ts +110 -0
- package/dist/types/components/cascaderPanel/index.d.ts +1 -0
- package/dist/types/components/data/dynamicData.d.ts +10 -0
- package/dist/types/components/data/index.d.ts +1 -1
- package/dist/types/components/data/selectModal.d.ts +2 -2
- package/dist/types/components/drawer/drawer.d.ts +1 -1
- package/dist/types/components/flowEditor/components/kvInput.d.ts +1 -1
- package/dist/types/components/flowEditor/components/nodeCard.d.ts +1 -1
- package/dist/types/components/form/drawerForm.d.ts +2 -2
- package/dist/types/components/form/formLayout.d.ts +2 -2
- package/dist/types/components/form/modalForm.d.ts +2 -2
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/level/level.d.ts +2 -2
- package/dist/types/components/mapCoord/index.d.ts +1 -0
- package/dist/types/components/mapCoord/mapCoord.d.ts +93 -0
- package/dist/types/components/media/media.d.ts +3 -32
- package/dist/types/components/modal/modalTab.d.ts +5 -5
- package/dist/types/components/select/checkboxTag.d.ts +2 -2
- package/dist/types/components/select/dateTag.d.ts +2 -2
- package/dist/types/components/select/radioTag.d.ts +2 -2
- package/dist/types/components/select/selectCard.d.ts +4 -4
- package/dist/types/components/spec/spec.d.ts +21 -0
- package/dist/types/components/table/table.d.ts +3 -3
- package/dist/types/components/textImageEditor/index.d.ts +2 -0
- package/dist/types/components/textImageEditor/textImageEditor.d.ts +56 -0
- package/dist/types/components/textImageEditor/textModal.d.ts +72 -0
- package/dist/types/components/textImageEditor/types.d.ts +19 -0
- package/dist/types/components/upload/index.d.ts +1 -0
- package/dist/types/components/upload/video.d.ts +126 -0
- package/dist/types/components/widget/index.d.ts +1 -0
- package/dist/types/hooks/table/column.d.ts +1 -1
- package/dist/types/hooks/table/switch.d.ts +1 -1
- package/dist/types/main.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import {
|
|
4
|
-
import { useMessage as G, NTabs as H, NTab as x, NButton as c, NInput as N, NInfiniteScroll as J, NTooltip as K, NSpin as Q, NDropdown as W } from "naive-ui";
|
|
1
|
+
import { defineComponent as B, ref as m, computed as T, createVNode as e, nextTick as R, createTextVNode as E, isVNode as X } from "vue";
|
|
2
|
+
import { useI18n as Y, useClient as G, useInfiniteList as H, useUpload as J } from "@duxweb/dvha-core";
|
|
3
|
+
import { useMessage as K, NTabs as Q, NTab as P, NButton as c, NInfiniteScroll as W, NTooltip as Z, NSpin as ee, NDropdown as ae, NInput as te } from "naive-ui";
|
|
5
4
|
import "vue-router";
|
|
6
|
-
import { useDialog as
|
|
5
|
+
import { useDialog as le } from "../../hooks/dialog.js";
|
|
7
6
|
import "@overlastic/vue";
|
|
7
|
+
import "@vueuse/core";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "vue-echarts";
|
|
10
|
-
import "@vueuse/core";
|
|
11
10
|
import "vue3-ace-editor";
|
|
12
11
|
import "ace-builds/src-noconflict/mode-vue";
|
|
13
12
|
import "ace-builds/src-noconflict/mode-javascript";
|
|
@@ -21,7 +20,8 @@ import "ace-builds/src-noconflict/ext-language_tools";
|
|
|
21
20
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
22
21
|
import "vue-cropper";
|
|
23
22
|
import "jinrishici";
|
|
24
|
-
import
|
|
23
|
+
import "lodash-es";
|
|
24
|
+
import { DuxDrawEmpty as oe } from "../draw/drawEmpty.js";
|
|
25
25
|
import "@vee-validate/i18n";
|
|
26
26
|
import "colorizr";
|
|
27
27
|
import "echarts";
|
|
@@ -52,7 +52,7 @@ import "../../pages/page404.js";
|
|
|
52
52
|
import "vue-draggable-plus";
|
|
53
53
|
import "short-unique-id";
|
|
54
54
|
import "aieditor";
|
|
55
|
-
import { useUploadConfig as
|
|
55
|
+
import { useUploadConfig as ne } from "./config.js";
|
|
56
56
|
import "@vue-flow/core";
|
|
57
57
|
import "lodash-es/cloneDeep";
|
|
58
58
|
import "@vue-flow/background";
|
|
@@ -63,14 +63,14 @@ import "../posterEditor/elements/index.js";
|
|
|
63
63
|
import "fabric";
|
|
64
64
|
import "../schemaEditor/schemaEditor.js";
|
|
65
65
|
import "dayjs";
|
|
66
|
-
import { useDownload as
|
|
66
|
+
import { useDownload as re } from "../../hooks/download.js";
|
|
67
67
|
import "@tanstack/vue-query";
|
|
68
68
|
import "pinia";
|
|
69
|
-
import { DuxFileManageItem as
|
|
70
|
-
function
|
|
71
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
69
|
+
import { DuxFileManageItem as F } from "./manage/item.js";
|
|
70
|
+
function k(t) {
|
|
71
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !X(t);
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const Ma = /* @__PURE__ */ B({
|
|
74
74
|
name: "DuxFileManage",
|
|
75
75
|
props: {
|
|
76
76
|
path: String,
|
|
@@ -86,136 +86,168 @@ const ba = /* @__PURE__ */ z({
|
|
|
86
86
|
uploadParams: Object
|
|
87
87
|
},
|
|
88
88
|
setup(t) {
|
|
89
|
-
const f =
|
|
89
|
+
const f = m(!1), D = m(0), N = m(0), {
|
|
90
90
|
t: l
|
|
91
|
-
} =
|
|
91
|
+
} = Y(), u = m([]), M = le(), C = G(), p = K(), I = re(), d = m({
|
|
92
92
|
manager: !0,
|
|
93
93
|
type: t.type || "all",
|
|
94
94
|
folder: null
|
|
95
|
-
}),
|
|
95
|
+
}), v = m(), g = () => {
|
|
96
|
+
u.value = [];
|
|
97
|
+
}, {
|
|
96
98
|
uploadPath: j,
|
|
97
99
|
managePath: b,
|
|
98
|
-
driver:
|
|
99
|
-
method:
|
|
100
|
-
} =
|
|
100
|
+
driver: U,
|
|
101
|
+
method: V
|
|
102
|
+
} = ne({
|
|
101
103
|
driver: t.uploadParams?.driver,
|
|
102
104
|
signPath: t.uploadParams?.signPath,
|
|
103
105
|
signCallback: t.uploadParams?.signCallback,
|
|
104
106
|
uploadPath: t.uploadParams?.path,
|
|
105
107
|
managePath: t.path,
|
|
106
108
|
method: t.uploadParams?.method
|
|
107
|
-
}),
|
|
109
|
+
}), L = m({
|
|
108
110
|
page: 1,
|
|
109
111
|
pageSize: 20
|
|
110
|
-
}),
|
|
112
|
+
}), i = H({
|
|
111
113
|
path: b.value,
|
|
112
|
-
pagination:
|
|
113
|
-
filters:
|
|
114
|
-
}),
|
|
114
|
+
pagination: L.value,
|
|
115
|
+
filters: d.value
|
|
116
|
+
}), $ = T(() => {
|
|
115
117
|
const {
|
|
116
|
-
driver:
|
|
117
|
-
signPath:
|
|
118
|
-
signCallback:
|
|
118
|
+
driver: o,
|
|
119
|
+
signPath: n,
|
|
120
|
+
signCallback: s,
|
|
119
121
|
...a
|
|
120
122
|
} = t.uploadParams || {};
|
|
121
123
|
return a;
|
|
122
|
-
}), y =
|
|
123
|
-
|
|
124
|
+
}), y = () => {
|
|
125
|
+
g(), i.refetch();
|
|
126
|
+
}, S = (o) => {
|
|
127
|
+
M.prompt({
|
|
128
|
+
title: o.title || l("components.uploadManage.namePlaceholder") || "",
|
|
129
|
+
formSchema: [{
|
|
130
|
+
tag: te,
|
|
131
|
+
attrs: {
|
|
132
|
+
"v-model:value": "form.name"
|
|
133
|
+
}
|
|
134
|
+
}],
|
|
135
|
+
defaultValue: o.defaultName ? {
|
|
136
|
+
name: o.defaultName
|
|
137
|
+
} : void 0
|
|
138
|
+
}).then((n) => {
|
|
139
|
+
o.onConfirm(n?.name);
|
|
140
|
+
}).catch(() => {
|
|
141
|
+
});
|
|
142
|
+
}, x = J({
|
|
143
|
+
...$.value,
|
|
124
144
|
path: j.value,
|
|
125
145
|
autoUpload: !0,
|
|
126
|
-
driver:
|
|
127
|
-
params:
|
|
128
|
-
method:
|
|
146
|
+
driver: U.value,
|
|
147
|
+
params: d.value,
|
|
148
|
+
method: V.value,
|
|
129
149
|
onSuccess: () => {
|
|
130
|
-
|
|
150
|
+
y();
|
|
131
151
|
},
|
|
132
|
-
onError: (
|
|
133
|
-
|
|
152
|
+
onError: (o) => {
|
|
153
|
+
p.error(o?.message || l("components.uploadManage.uploadError") || "");
|
|
134
154
|
}
|
|
135
|
-
}),
|
|
136
|
-
if (!
|
|
137
|
-
|
|
155
|
+
}), z = (o) => {
|
|
156
|
+
if (!o) {
|
|
157
|
+
p.error(l("components.uploadManage.namePlaceholder") || "");
|
|
138
158
|
return;
|
|
139
159
|
}
|
|
140
|
-
|
|
160
|
+
C.request({
|
|
141
161
|
path: b.value,
|
|
142
162
|
method: "POST",
|
|
143
163
|
payload: {
|
|
144
|
-
name:
|
|
145
|
-
folder:
|
|
164
|
+
name: o,
|
|
165
|
+
folder: d.value.folder
|
|
146
166
|
}
|
|
147
167
|
}).then(() => {
|
|
148
|
-
|
|
168
|
+
y();
|
|
149
169
|
}).catch(() => {
|
|
150
|
-
|
|
170
|
+
p.error(l("components.uploadManage.createError") || "");
|
|
151
171
|
});
|
|
152
|
-
}, O = (
|
|
153
|
-
if (!
|
|
154
|
-
|
|
172
|
+
}, O = (o, n, s) => {
|
|
173
|
+
if (!n) {
|
|
174
|
+
p.error(l("components.uploadManage.namePlaceholder") || "");
|
|
155
175
|
return;
|
|
156
176
|
}
|
|
157
|
-
|
|
177
|
+
C.request({
|
|
158
178
|
path: b.value,
|
|
159
179
|
method: "PUT",
|
|
160
180
|
payload: {
|
|
161
|
-
name:
|
|
162
|
-
id:
|
|
163
|
-
type:
|
|
181
|
+
name: n,
|
|
182
|
+
id: s,
|
|
183
|
+
type: o
|
|
164
184
|
}
|
|
165
185
|
}).then(() => {
|
|
166
|
-
|
|
186
|
+
y();
|
|
167
187
|
}).catch(() => {
|
|
168
|
-
|
|
188
|
+
p.error(l("components.uploadManage.editError") || "");
|
|
169
189
|
});
|
|
170
|
-
},
|
|
171
|
-
|
|
190
|
+
}, w = (o, n) => {
|
|
191
|
+
C.request({
|
|
172
192
|
path: `${b.value}/batch`,
|
|
173
193
|
method: "DELETE",
|
|
174
194
|
payload: {
|
|
175
|
-
data: Array.isArray(
|
|
176
|
-
type:
|
|
195
|
+
data: Array.isArray(n) ? n : [n],
|
|
196
|
+
type: o
|
|
177
197
|
}
|
|
178
198
|
}).then(() => {
|
|
179
|
-
|
|
199
|
+
y();
|
|
180
200
|
}).catch(() => {
|
|
181
|
-
|
|
201
|
+
p.error(l("components.uploadManage.delError") || "");
|
|
182
202
|
});
|
|
183
|
-
},
|
|
203
|
+
}, h = T(() => !!(t.type && t.type !== "all")), _ = (o) => {
|
|
204
|
+
g(), i.data.value = void 0, d.value.folder = o;
|
|
205
|
+
}, q = (o, n) => {
|
|
206
|
+
if (!n) {
|
|
207
|
+
if (t.multiple) {
|
|
208
|
+
const s = u.value.findIndex((a) => a.id === o.id);
|
|
209
|
+
s >= 0 && u.value.splice(s, 1);
|
|
210
|
+
} else
|
|
211
|
+
g();
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
t.multiple ? u.value.some((s) => s.id === o.id) || u.value.push(o) : u.value = [o];
|
|
215
|
+
};
|
|
184
216
|
return () => {
|
|
185
|
-
let
|
|
217
|
+
let o, n, s;
|
|
186
218
|
return e("div", {
|
|
187
219
|
class: ["flex flex-col gap-2", t.page ? "h-full" : "h-500px max-h-500px"]
|
|
188
220
|
}, [e("div", {
|
|
189
221
|
class: ["flex-none flex justify-between items-center border-b border-muted p-3", t.handle]
|
|
190
222
|
}, [e("div", {
|
|
191
223
|
class: "flex-none"
|
|
192
|
-
}, [e(
|
|
224
|
+
}, [e(Q, {
|
|
193
225
|
type: "segment",
|
|
194
226
|
animated: !0,
|
|
195
227
|
size: "small",
|
|
196
228
|
tabClass: "!px-4",
|
|
197
229
|
defaultValue: "all",
|
|
198
|
-
value:
|
|
230
|
+
value: d.value.type,
|
|
199
231
|
onUpdateValue: (a) => {
|
|
200
|
-
|
|
232
|
+
h.value || (d.value.type = a, u.value = []);
|
|
201
233
|
}
|
|
202
234
|
}, {
|
|
203
|
-
default: () => [e(
|
|
235
|
+
default: () => [e(P, {
|
|
204
236
|
tab: l("components.uploadManage.all"),
|
|
205
237
|
name: "all",
|
|
206
|
-
disabled:
|
|
207
|
-
}, null), e(
|
|
238
|
+
disabled: h.value
|
|
239
|
+
}, null), e(P, {
|
|
208
240
|
tab: l("components.uploadManage.image"),
|
|
209
241
|
name: "image",
|
|
210
|
-
disabled:
|
|
211
|
-
}, null), e(
|
|
242
|
+
disabled: h.value
|
|
243
|
+
}, null), e(P, {
|
|
212
244
|
tab: l("components.uploadManage.media"),
|
|
213
245
|
name: "media",
|
|
214
|
-
disabled:
|
|
215
|
-
}, null), e(
|
|
246
|
+
disabled: h.value
|
|
247
|
+
}, null), e(P, {
|
|
216
248
|
tab: l("components.uploadManage.docs"),
|
|
217
249
|
name: "docs",
|
|
218
|
-
disabled:
|
|
250
|
+
disabled: h.value
|
|
219
251
|
}, null)]
|
|
220
252
|
})]), e("div", {
|
|
221
253
|
class: "flex gap-2"
|
|
@@ -223,38 +255,29 @@ const ba = /* @__PURE__ */ z({
|
|
|
223
255
|
type: "default",
|
|
224
256
|
ghost: !0,
|
|
225
257
|
onClick: () => {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
formSchema: [{
|
|
229
|
-
tag: N,
|
|
230
|
-
attrs: {
|
|
231
|
-
"v-model:value": "form.name"
|
|
232
|
-
}
|
|
233
|
-
}]
|
|
234
|
-
}).then((a) => {
|
|
235
|
-
L(a?.name);
|
|
236
|
-
}).catch(() => {
|
|
258
|
+
S({
|
|
259
|
+
onConfirm: (a) => z(a)
|
|
237
260
|
});
|
|
238
261
|
},
|
|
239
262
|
renderIcon: () => e("div", {
|
|
240
263
|
class: "i-tabler:plus"
|
|
241
264
|
}, null)
|
|
242
|
-
},
|
|
243
|
-
default: () => [
|
|
265
|
+
}, k(o = l("components.button.create")) ? o : {
|
|
266
|
+
default: () => [o]
|
|
244
267
|
}), e(c, {
|
|
245
268
|
type: "primary",
|
|
246
269
|
ghost: !0,
|
|
247
270
|
onClick: () => {
|
|
248
|
-
|
|
271
|
+
x.open();
|
|
249
272
|
},
|
|
250
|
-
loading:
|
|
273
|
+
loading: x.isUploading.value,
|
|
251
274
|
renderIcon: () => e("div", {
|
|
252
275
|
class: "i-tabler:upload"
|
|
253
276
|
}, null)
|
|
254
277
|
}, {
|
|
255
278
|
default: () => [e("div", {
|
|
256
279
|
class: "flex gap-2"
|
|
257
|
-
}, [l("components.uploadManage.upload"),
|
|
280
|
+
}, [l("components.uploadManage.upload"), x.progress.value.totalPercent > 0 && `(${x.progress.value.totalPercent}%)`])]
|
|
258
281
|
}), !t.page && e(c, {
|
|
259
282
|
type: "default",
|
|
260
283
|
ghost: !0,
|
|
@@ -269,39 +292,39 @@ const ba = /* @__PURE__ */ z({
|
|
|
269
292
|
}, null)
|
|
270
293
|
}, null)])]), e("div", {
|
|
271
294
|
class: "flex-1 min-h-1 relative"
|
|
272
|
-
}, [
|
|
295
|
+
}, [i.data?.value?.data?.length > 0 && e(W, {
|
|
273
296
|
distance: 10,
|
|
274
297
|
onLoad: () => {
|
|
275
|
-
|
|
298
|
+
i.hasNextPage.value && i.fetchNextPage();
|
|
276
299
|
},
|
|
277
300
|
scrollbarProps: {
|
|
278
301
|
contentClass: "p-4"
|
|
279
302
|
}
|
|
280
303
|
}, {
|
|
281
304
|
default: () => [e("div", {
|
|
282
|
-
class: ["grid grid-cols-3 md:grid-cols-4 text-sm items-start justify-start",
|
|
283
|
-
}, [
|
|
284
|
-
key: `parent-${
|
|
305
|
+
class: ["grid grid-cols-3 md:grid-cols-4 text-sm items-start justify-start", i.data.value?.data?.length >= 4 && !t.page ? " lg:grid-cols-[repeat(auto-fill,minmax(150px,1fr))]" : "lg:grid-cols-[repeat(auto-fill,minmax(150px,150px))]"]
|
|
306
|
+
}, [d.value?.folder && d.value?.folder !== i.data.value?.meta?.folder && e(F, {
|
|
307
|
+
key: `parent-${i.data.value?.meta?.folder}`,
|
|
285
308
|
type: "folder",
|
|
286
309
|
name: l("components.uploadManage.parentLevel"),
|
|
287
310
|
page: t.page,
|
|
288
311
|
onSelect: () => {
|
|
289
|
-
|
|
312
|
+
d.value.folder = i.data.value?.meta?.folder, g();
|
|
290
313
|
}
|
|
291
|
-
}, null),
|
|
314
|
+
}, null), i.data.value?.data?.map((a) => e(Z, {
|
|
292
315
|
placement: "bottom",
|
|
293
316
|
key: `${a.url ? "file" : "folder"}-${a.id}`,
|
|
294
317
|
trigger: a.url ? "hover" : "manual"
|
|
295
318
|
}, {
|
|
296
|
-
default: () => a.filesize,
|
|
297
|
-
trigger: () => e(
|
|
319
|
+
default: () => a.filesize || "",
|
|
320
|
+
trigger: () => e(F, {
|
|
298
321
|
page: t.page,
|
|
299
322
|
onContextmenu: (r) => {
|
|
300
|
-
|
|
301
|
-
f.value = !0,
|
|
323
|
+
v.value = a, f.value = !1, R().then(() => {
|
|
324
|
+
f.value = !0, D.value = r.clientX, N.value = r.clientY;
|
|
302
325
|
}), r.preventDefault();
|
|
303
326
|
},
|
|
304
|
-
value: t.page ? !1 : !!
|
|
327
|
+
value: t.page ? !1 : !!u.value?.find?.((r) => r.id === a.id),
|
|
305
328
|
type: a.url ? "file" : "folder",
|
|
306
329
|
mime: a.filetype,
|
|
307
330
|
name: a.filename,
|
|
@@ -309,38 +332,38 @@ const ba = /* @__PURE__ */ z({
|
|
|
309
332
|
time: a.time,
|
|
310
333
|
onSelect: (r) => {
|
|
311
334
|
if (!a.url) {
|
|
312
|
-
|
|
335
|
+
_(a.id);
|
|
313
336
|
return;
|
|
314
337
|
}
|
|
315
|
-
t.page || (
|
|
338
|
+
t.page || q(a, r);
|
|
316
339
|
}
|
|
317
340
|
}, null)
|
|
318
341
|
}))])]
|
|
319
|
-
}),
|
|
342
|
+
}), i.isLoading.value ? e(ee, {
|
|
320
343
|
class: "h-full absolute w-full inset-0 bg-gray-1/50"
|
|
321
|
-
}, null) : !
|
|
344
|
+
}, null) : !i.data.value?.data?.length && e("div", {
|
|
322
345
|
class: "size-full flex justify-center items-center text-sm text-gray-6"
|
|
323
346
|
}, [e("div", {
|
|
324
347
|
class: "flex flex-col items-center"
|
|
325
348
|
}, [e("div", {
|
|
326
349
|
class: "w-26 mb-2"
|
|
327
|
-
}, [e(
|
|
350
|
+
}, [e(oe, null, null)]), e("div", {
|
|
328
351
|
class: "text-base"
|
|
329
352
|
}, [l("components.uploadManage.empty")]), e("div", {
|
|
330
353
|
class: "text-sm text-muted"
|
|
331
|
-
}, [l("components.uploadManage.emptyDesc")]),
|
|
354
|
+
}, [l("components.uploadManage.emptyDesc")]), d.value?.folder && d.value?.folder !== i.data.value?.meta?.folder && e("div", {
|
|
332
355
|
class: "text-xs text-gray-6"
|
|
333
356
|
}, [e(c, {
|
|
334
357
|
type: "default",
|
|
335
358
|
ghost: !0,
|
|
336
359
|
onClick: () => {
|
|
337
|
-
|
|
360
|
+
d.value.folder = i.data.value?.meta?.folder, g();
|
|
338
361
|
}
|
|
339
|
-
},
|
|
340
|
-
default: () => [
|
|
341
|
-
})])])])]), e(
|
|
342
|
-
x:
|
|
343
|
-
y:
|
|
362
|
+
}, k(n = l("components.uploadManage.back")) ? n : {
|
|
363
|
+
default: () => [n]
|
|
364
|
+
})])])])]), e(ae, {
|
|
365
|
+
x: D.value,
|
|
366
|
+
y: N.value,
|
|
344
367
|
placement: "bottom-start",
|
|
345
368
|
trigger: "manual",
|
|
346
369
|
show: f.value,
|
|
@@ -348,41 +371,35 @@ const ba = /* @__PURE__ */ z({
|
|
|
348
371
|
f.value = !1;
|
|
349
372
|
},
|
|
350
373
|
onUpdateShow: (a) => {
|
|
351
|
-
a || (
|
|
374
|
+
a || (v.value = void 0);
|
|
352
375
|
},
|
|
353
376
|
onSelect: (a) => {
|
|
354
|
-
const r =
|
|
377
|
+
const r = v.value ? {
|
|
378
|
+
...v.value
|
|
379
|
+
} : void 0;
|
|
355
380
|
switch (f.value = !1, a) {
|
|
356
381
|
case "download":
|
|
357
|
-
|
|
382
|
+
I.url(r?.url);
|
|
358
383
|
break;
|
|
359
384
|
case "rename":
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
attrs: {
|
|
365
|
-
"v-model:value": "form.name"
|
|
366
|
-
}
|
|
367
|
-
}],
|
|
368
|
-
defaultValue: {
|
|
369
|
-
name: r?.filename || r?.name
|
|
385
|
+
S({
|
|
386
|
+
defaultName: r?.filename || r?.name,
|
|
387
|
+
onConfirm: (A) => {
|
|
388
|
+
O(r?.type, A, r?.id);
|
|
370
389
|
}
|
|
371
|
-
}).then(($) => {
|
|
372
|
-
O(r?.type, $?.name, r?.id);
|
|
373
390
|
});
|
|
374
391
|
break;
|
|
375
392
|
case "delete":
|
|
376
|
-
|
|
393
|
+
M.confirm({
|
|
377
394
|
title: l("components.uploadManage.delTitle"),
|
|
378
395
|
content: l("components.uploadManage.delDesc")
|
|
379
396
|
}).then(() => {
|
|
380
|
-
|
|
397
|
+
w(r?.type, r?.id);
|
|
381
398
|
});
|
|
382
399
|
break;
|
|
383
400
|
}
|
|
384
401
|
},
|
|
385
|
-
options: [
|
|
402
|
+
options: [v.value?.url && {
|
|
386
403
|
label: l("components.button.download"),
|
|
387
404
|
key: "download",
|
|
388
405
|
icon: () => e("div", {
|
|
@@ -403,31 +420,31 @@ const ba = /* @__PURE__ */ z({
|
|
|
403
420
|
}].filter((a) => a)
|
|
404
421
|
}, null), !t.page && e("div", {
|
|
405
422
|
class: "flex justify-end gap-2 border-t border-muted p-3"
|
|
406
|
-
}, [e("div", null, [
|
|
423
|
+
}, [e("div", null, [u.value?.length > 0 && e(c, {
|
|
407
424
|
type: "error",
|
|
408
425
|
secondary: !0,
|
|
409
426
|
onClick: () => {
|
|
410
|
-
|
|
427
|
+
M.confirm({
|
|
411
428
|
title: l("components.uploadManage.delTitle"),
|
|
412
429
|
content: l("components.uploadManage.delDesc")
|
|
413
430
|
}).then(() => {
|
|
414
|
-
|
|
431
|
+
w("file", u.value?.map((a) => a.id));
|
|
415
432
|
});
|
|
416
433
|
}
|
|
417
|
-
},
|
|
418
|
-
default: () => [
|
|
434
|
+
}, k(s = l("components.button.delete")) ? s : {
|
|
435
|
+
default: () => [s]
|
|
419
436
|
})]), e("div", null, [e(c, {
|
|
420
437
|
type: "primary",
|
|
421
|
-
disabled: !
|
|
438
|
+
disabled: !u.value?.length,
|
|
422
439
|
onClick: () => {
|
|
423
|
-
t.onConfirm?.(
|
|
440
|
+
t.onConfirm?.(u.value);
|
|
424
441
|
}
|
|
425
442
|
}, {
|
|
426
|
-
default: () => [l("components.button.select"),
|
|
443
|
+
default: () => [l("components.button.select"), E("("), u.value?.length || 0, E(")")]
|
|
427
444
|
})])])]);
|
|
428
445
|
};
|
|
429
446
|
}
|
|
430
447
|
});
|
|
431
448
|
export {
|
|
432
|
-
|
|
449
|
+
Ma as default
|
|
433
450
|
};
|