@skyfox2000/webui 1.5.4 → 1.5.9
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/lib/assets/modules/{baseLayout-BEy-FjcZ.js → baseLayout-DfTxHOFc.js} +7 -7
- package/lib/assets/modules/file-upload-DTOdV5vM.js +211 -0
- package/lib/assets/modules/{index-BTD6d1d_.js → index-BwMaOrJT.js} +1 -1
- package/lib/assets/modules/{index-DyE2ppxB.js → index-DUBY49Au.js} +27 -27
- package/lib/assets/modules/{index-BFxnKhwl.js → index-M1qERbea.js} +99 -99
- package/lib/assets/modules/{menuTabs-DUBWuf7t.js → menuTabs-DWaBSRNr.js} +42 -42
- package/lib/assets/modules/{toolIcon-DQLIuud3.js → toolIcon-BYnHhAy-.js} +1 -1
- package/lib/assets/modules/upload-template-BKm9mFq8.js +6764 -0
- package/lib/assets/modules/uploadList-CHvr6Hp1.js +472 -0
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +2 -2
- package/lib/es/Error403/index.js +14 -15
- package/lib/es/Error404/index.js +16 -17
- package/lib/es/ExcelForm/index.js +244 -244
- package/lib/es/MenuLayout/index.js +5 -5
- package/lib/es/TemplateFile/index.js +53 -54
- package/lib/es/UploadForm/index.js +61 -63
- package/lib/locales/default.d.ts +287 -103
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1476 -1622
- package/package.json +1 -1
- package/src/components/common/icon/fullscreen.vue +1 -1
- package/src/components/content/dialog/excelForm.vue +32 -28
- package/src/components/content/dialog/index.vue +4 -3
- package/src/components/content/dialog/templateFile.vue +3 -2
- package/src/components/content/dialog/uploadForm.vue +5 -4
- package/src/components/content/drawer/index.vue +5 -3
- package/src/components/content/list/index.vue +2 -1
- package/src/components/content/list/listOperate.vue +6 -7
- package/src/components/content/search/index.vue +3 -2
- package/src/components/content/table/index.vue +2 -1
- package/src/components/content/table/tableOperate.vue +8 -9
- package/src/components/content/toolbar/icontool.vue +1 -5
- package/src/components/content/toolbar/index.vue +4 -5
- package/src/components/content/toolpanel/index.vue +20 -20
- package/src/components/error/error403.vue +2 -2
- package/src/components/error/error404.vue +2 -2
- package/src/components/form/input/index.vue +3 -1
- package/src/components/form/select/index.vue +3 -2
- package/src/components/form/textarea/index.vue +3 -1
- package/src/components/form/transfer/index.vue +2 -1
- package/src/components/form/upload/uploadList.vue +23 -19
- package/src/components/layout/header/headerExits.vue +5 -5
- package/src/components/layout/menu/menuTabs.vue +1 -1
- package/src/const/options.ts +17 -16
- package/src/locales/default.ts +297 -176
- package/src/locales/en-US.json +320 -0
- package/src/stores/appInfo.ts +2 -1
- package/src/stores/userInfo.ts +6 -5
- package/src/utils/data.ts +9 -8
- package/src/utils/download.ts +5 -4
- package/src/utils/excel-preview.ts +4 -3
- package/src/utils/export-table.ts +7 -6
- package/src/utils/file-upload.ts +15 -14
- package/src/utils/form-csv.ts +4 -3
- package/src/utils/form-excel.ts +14 -13
- package/src/utils/form-validate.ts +18 -17
- package/src/utils/form.ts +6 -5
- package/src/utils/icon-loader.ts +3 -2
- package/src/utils/options.ts +2 -1
- package/src/utils/tools.ts +18 -17
- package/lib/assets/modules/file-upload-_mcZy7EK.js +0 -211
- package/lib/assets/modules/upload-template-DZuy1BOF.js +0 -6465
- package/lib/assets/modules/uploadList-CCquj3c_.js +0 -466
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
import { defineComponent as pe, ref as T, computed as I, watch as R, resolveDirective as me, createElementBlock as m, openBlock as d, normalizeClass as z, unref as n, createElementVNode as w, withDirectives as b, createCommentVNode as x, createBlock as q, mergeProps as G, withCtx as v, createVNode as p, createTextVNode as E, toDisplayString as A, Fragment as fe, renderList as he } from "vue";
|
|
2
|
+
import { _ as H } from "./index-BwMaOrJT.js";
|
|
3
|
+
import { a as B, _ as K } from "./toolIcon-BYnHhAy-.js";
|
|
4
|
+
import { httpPost as N, ResStatus as j } from "@skyfox2000/fapi";
|
|
5
|
+
import { L as X, u as Y, $ as r, D as we, _ as ve } from "./upload-template-BKm9mFq8.js";
|
|
6
|
+
import { Upload as J, Tag as ye, Popconfirm as be, Progress as xe } from "ant-design-vue";
|
|
7
|
+
import U from "vue-m-message";
|
|
8
|
+
import { U as s, f as Ce, p as W } from "./file-upload-DTOdV5vM.js";
|
|
9
|
+
import { combineParams as Z } from "@skyfox2000/microbase";
|
|
10
|
+
import "async-validator";
|
|
11
|
+
import "dayjs";
|
|
12
|
+
import "vue-draggable-next";
|
|
13
|
+
import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const _e = (c, _) => {
|
|
15
|
+
const o = document.createElement("a"), f = URL.createObjectURL(c);
|
|
16
|
+
o.href = f, o.download = _, o.style.display = "none", document.body.appendChild(o), o.click(), URL.revokeObjectURL(f), document.body.removeChild(o);
|
|
17
|
+
}, ke = (c, _, o) => {
|
|
18
|
+
try {
|
|
19
|
+
o && (c.api || (c.api = o.api), c.authorize === void 0 && (c.authorize = o.authorize));
|
|
20
|
+
const f = Z(c.params, _);
|
|
21
|
+
return N(c, f).then((u) => {
|
|
22
|
+
if ((u == null ? void 0 : u.status) === j.SUCCESS && u.data) {
|
|
23
|
+
const a = u.data, k = a.Content, O = a.Key.split("/").pop(), F = atob(k), g = [];
|
|
24
|
+
for (let P = 0; P < F.length; P++)
|
|
25
|
+
g.push(F.charCodeAt(P));
|
|
26
|
+
const C = new Blob([new Uint8Array(g)], {
|
|
27
|
+
type: a.Type
|
|
28
|
+
});
|
|
29
|
+
_e(C, O);
|
|
30
|
+
} else if ((u == null ? void 0 : u.errno) == X) {
|
|
31
|
+
Y().logout(!1);
|
|
32
|
+
return;
|
|
33
|
+
} else
|
|
34
|
+
U.error(r("webui.utils.download.downloadFailed"));
|
|
35
|
+
});
|
|
36
|
+
} catch (f) {
|
|
37
|
+
console.error("下载失败:", f), U.error(r("webui.utils.download.fileDownloadFailedRetry"));
|
|
38
|
+
}
|
|
39
|
+
}, Fe = ["xlsx", "xls", "csv", "txt"], Se = (c, _, o) => {
|
|
40
|
+
const f = _.split(".").pop();
|
|
41
|
+
if (Fe.includes(f))
|
|
42
|
+
console.log(c);
|
|
43
|
+
else
|
|
44
|
+
return U.error(r("webui.utils.download.fileTypeNotSupported")), !1;
|
|
45
|
+
const u = Z(c.params, o);
|
|
46
|
+
return N(c, u).then((a) => {
|
|
47
|
+
if ((a == null ? void 0 : a.status) === j.SUCCESS && a.data) {
|
|
48
|
+
const O = a.data.Content, F = atob(O), g = [];
|
|
49
|
+
for (let C = 0; C < F.length; C++)
|
|
50
|
+
g.push(F.charCodeAt(C));
|
|
51
|
+
} else if ((a == null ? void 0 : a.errno) == X) {
|
|
52
|
+
Y().logout(!1);
|
|
53
|
+
return;
|
|
54
|
+
} else
|
|
55
|
+
U.error(r("webui.utils.download.previewFailed"));
|
|
56
|
+
});
|
|
57
|
+
}, ge = { class: "flex items-center justify-between w-full" }, Pe = { class: "w-35 mx-3 flex gap-2" }, Ee = { class: "mt-4 px-3" }, Oe = { class: "flex items-center justify-between" }, Le = { class: "flex items-center" }, Te = ["title"], ze = { class: "flex items-center" }, Ae = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "mr-2"
|
|
60
|
+
}, $e = {
|
|
61
|
+
key: 1,
|
|
62
|
+
class: "flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
|
|
63
|
+
}, Be = ["onClick"], Ie = {
|
|
64
|
+
key: 2,
|
|
65
|
+
class: "flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
|
|
66
|
+
}, Re = ["onClick"], Ke = {
|
|
67
|
+
key: 3,
|
|
68
|
+
class: "flex items-center text-red-500 hover:text-red-700 cursor-pointer"
|
|
69
|
+
}, Ne = ["onClick"], je = {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "text-sm text-nowrap"
|
|
72
|
+
}, De = { key: 0 }, Me = /* @__PURE__ */ pe({
|
|
73
|
+
__name: "uploadList",
|
|
74
|
+
props: {
|
|
75
|
+
autoUpload: { type: Boolean, default: !1 },
|
|
76
|
+
uploadUrl: {},
|
|
77
|
+
downloadUrl: {},
|
|
78
|
+
previewUrl: {},
|
|
79
|
+
deleteUrl: {},
|
|
80
|
+
fileList: { default: () => [] },
|
|
81
|
+
placeholder: { default: "" },
|
|
82
|
+
fileExt: {},
|
|
83
|
+
maxFileSize: { default: 20 },
|
|
84
|
+
maxCount: { default: 5 },
|
|
85
|
+
maxCountTip: { type: Boolean, default: !1 },
|
|
86
|
+
maxFileSizeTip: { type: Boolean, default: !0 },
|
|
87
|
+
fileExtTip: { type: Boolean, default: !0 },
|
|
88
|
+
parentPath: {},
|
|
89
|
+
showActionText: { type: Boolean, default: !0 },
|
|
90
|
+
showOnlineSwitch: { type: Boolean, default: !1 },
|
|
91
|
+
showDelete: { type: Boolean, default: !0 },
|
|
92
|
+
showFolderUpload: { type: Boolean, default: !1 }
|
|
93
|
+
},
|
|
94
|
+
emits: ["update:file-list"],
|
|
95
|
+
setup(c, { emit: _ }) {
|
|
96
|
+
const o = c, f = we(), { errInfo: u } = f, a = T(o.fileList), k = T([]), O = T(), F = T(), g = _, C = I(() => {
|
|
97
|
+
var e;
|
|
98
|
+
return (e = o.fileExt) != null && e.length ? o.fileExt.map((t) => `.${t}`).join(",") : "";
|
|
99
|
+
}), P = (e) => {
|
|
100
|
+
var t;
|
|
101
|
+
if (o.fileExt && o.fileExt.length > 0) {
|
|
102
|
+
const l = ((t = e.name.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
|
|
103
|
+
if (!o.fileExt.includes(l))
|
|
104
|
+
return U.error(r("webui.components.form.upload.unsupportedFileType")), !1;
|
|
105
|
+
}
|
|
106
|
+
return e.size / 1024 / 1024 > o.maxFileSize ? (U.error(r("webui.components.form.upload.fileSizeExceeded", [o.maxFileSize])), !1) : !0;
|
|
107
|
+
}, ee = () => o.maxCount > 1 && a.value.length >= o.maxCount, te = (e) => {
|
|
108
|
+
const t = e;
|
|
109
|
+
t.params || (t.params = {});
|
|
110
|
+
let l = t.name;
|
|
111
|
+
return t.webkitRelativePath && (l = t.webkitRelativePath), t.webkitRelativePath && (t.name = t.webkitRelativePath, t.fileName = t.webkitRelativePath.split("/").pop()), t.params.FileKey = t.name, o.parentPath && (t.params.FileKey = W.join("/", o.parentPath, t.name)), t.status = s.Pending, t.webkitRelativePath && (t.relativePath = l), t;
|
|
112
|
+
}, oe = (e) => P(e) && o.autoUpload, D = async (e) => {
|
|
113
|
+
if (e.length === 0) return;
|
|
114
|
+
const t = [...a.value];
|
|
115
|
+
let l = !1;
|
|
116
|
+
for (const L of e) {
|
|
117
|
+
if (!P(L)) {
|
|
118
|
+
l = !0;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
const S = te(L);
|
|
122
|
+
if (o.maxCount === 1) {
|
|
123
|
+
t.length = 0, t.push(S);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
if (ee()) {
|
|
127
|
+
U.error(r("webui.components.form.upload.maxFileCount", [o.maxCount])), l = !0;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
const i = t.findIndex(
|
|
131
|
+
(h) => h.name === S.name
|
|
132
|
+
);
|
|
133
|
+
i > -1 ? t[i] = S : t.push(S);
|
|
134
|
+
}
|
|
135
|
+
(!l || t.length > 0) && (a.value = t), k.value = [];
|
|
136
|
+
}, ne = (e) => {
|
|
137
|
+
k.value = e, D(e);
|
|
138
|
+
}, ie = I(() => ({
|
|
139
|
+
accept: C.value,
|
|
140
|
+
multiple: o.maxCount !== 1,
|
|
141
|
+
fileList: k.value,
|
|
142
|
+
"onUpdate:fileList": ne,
|
|
143
|
+
beforeUpload: oe,
|
|
144
|
+
listType: "text",
|
|
145
|
+
showUploadList: !1,
|
|
146
|
+
customRequest: async () => {
|
|
147
|
+
if (o.autoUpload && o.uploadUrl)
|
|
148
|
+
for (const e of a.value)
|
|
149
|
+
e.percent === 0 && e.status === s.Pending && await Ce(o.uploadUrl, e);
|
|
150
|
+
}
|
|
151
|
+
})), ae = I(() => ({
|
|
152
|
+
accept: C.value,
|
|
153
|
+
multiple: !0,
|
|
154
|
+
directory: !0,
|
|
155
|
+
// 添加标准属性
|
|
156
|
+
webkitdirectory: !0,
|
|
157
|
+
// Webkit属性
|
|
158
|
+
fileList: [],
|
|
159
|
+
"onUpdate:fileList": (e) => D(e),
|
|
160
|
+
beforeUpload: () => !1,
|
|
161
|
+
listType: "text",
|
|
162
|
+
showUploadList: !1,
|
|
163
|
+
customRequest: () => {
|
|
164
|
+
}
|
|
165
|
+
}));
|
|
166
|
+
R(
|
|
167
|
+
() => o.fileList,
|
|
168
|
+
(e) => {
|
|
169
|
+
a.value = e;
|
|
170
|
+
},
|
|
171
|
+
{ deep: !0, immediate: !0 }
|
|
172
|
+
), R(
|
|
173
|
+
() => a.value,
|
|
174
|
+
(e) => {
|
|
175
|
+
g("update:file-list", e);
|
|
176
|
+
},
|
|
177
|
+
{ deep: !0 }
|
|
178
|
+
), R(
|
|
179
|
+
() => o.parentPath,
|
|
180
|
+
(e) => {
|
|
181
|
+
e && a.value.forEach((t) => {
|
|
182
|
+
t.params.FileKey = W.join("/", e, t.fileName);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
const M = (e) => {
|
|
187
|
+
const t = a.value[e].minioFile, l = {
|
|
188
|
+
api: o.downloadUrl.api,
|
|
189
|
+
authorize: o.downloadUrl.authorize,
|
|
190
|
+
url: o.downloadUrl.url,
|
|
191
|
+
params: {
|
|
192
|
+
Query: {
|
|
193
|
+
FileKey: t.Key
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
ke(l);
|
|
198
|
+
}, le = (e) => {
|
|
199
|
+
e.minioFile && (e.minioFile.Status = e.status);
|
|
200
|
+
}, Q = (e) => {
|
|
201
|
+
const t = a.value[e].minioFile, l = {
|
|
202
|
+
api: o.previewUrl.api,
|
|
203
|
+
authorize: o.previewUrl.authorize,
|
|
204
|
+
url: o.previewUrl.url,
|
|
205
|
+
params: {
|
|
206
|
+
Query: {
|
|
207
|
+
FileKey: t.Key
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
Se(l, t.FileName);
|
|
212
|
+
}, V = (e) => {
|
|
213
|
+
const t = a.value[e];
|
|
214
|
+
o.deleteUrl && t.minioFile && t.minioFile.Key ? N(o.deleteUrl, {
|
|
215
|
+
Query: {
|
|
216
|
+
FileKey: t.minioFile.Key
|
|
217
|
+
}
|
|
218
|
+
}).then((l) => {
|
|
219
|
+
l && l.status === j.SUCCESS && (U.success(r("webui.components.form.upload.deleteSuccess")), a.value.splice(e, 1));
|
|
220
|
+
}) : a.value.splice(e, 1), $.value = -1;
|
|
221
|
+
}, $ = T(-1), se = (e, t) => {
|
|
222
|
+
if ($.value = e, t === s.Pending) {
|
|
223
|
+
V(e);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
}, re = (e) => e === $.value, ue = () => {
|
|
227
|
+
const e = o.fileExt && o.fileExt.length && o.fileExtTip ? `文件必须为 ${o.fileExt.join("/")}` : "", t = o.maxFileSize !== 0 && o.maxFileSizeTip ? `单文件最大 ${o.maxFileSize}MB` : "", l = o.maxCount !== 0 && o.maxCountTip ? `最多 ${o.maxCount} 个文件` : "";
|
|
228
|
+
return [t, e, l].filter(Boolean).join(",");
|
|
229
|
+
}, ce = (e) => {
|
|
230
|
+
switch (e) {
|
|
231
|
+
case s.Uploading:
|
|
232
|
+
return "blue";
|
|
233
|
+
case s.Success:
|
|
234
|
+
return "green";
|
|
235
|
+
case s.Error:
|
|
236
|
+
return "red";
|
|
237
|
+
case s.Online:
|
|
238
|
+
return "green";
|
|
239
|
+
case s.Offline:
|
|
240
|
+
return "pink";
|
|
241
|
+
default:
|
|
242
|
+
return "cyan";
|
|
243
|
+
}
|
|
244
|
+
}, de = (e) => {
|
|
245
|
+
switch (e) {
|
|
246
|
+
case s.Uploading:
|
|
247
|
+
return r("webui.components.form.upload.uploading");
|
|
248
|
+
case s.Success:
|
|
249
|
+
return r("webui.components.form.upload.uploadComplete");
|
|
250
|
+
case s.Error:
|
|
251
|
+
return r("webui.components.form.upload.uploadFailed");
|
|
252
|
+
case s.Online:
|
|
253
|
+
return r("webui.common.online");
|
|
254
|
+
case s.Offline:
|
|
255
|
+
return r("webui.common.offline");
|
|
256
|
+
default:
|
|
257
|
+
return r("webui.components.form.upload.pendingUpload");
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
return (e, t) => {
|
|
261
|
+
var L, S;
|
|
262
|
+
const l = me("auth");
|
|
263
|
+
return d(), m("div", {
|
|
264
|
+
class: z(["w-full border border-solid border-gray-100 mt-1 rounded-md py-5", [(L = n(u)) == null ? void 0 : L.errClass]])
|
|
265
|
+
}, [
|
|
266
|
+
w("div", ge, [
|
|
267
|
+
w("div", Pe, [
|
|
268
|
+
b((d(), q(n(J), G({
|
|
269
|
+
ref_key: "fileUploader",
|
|
270
|
+
ref: O
|
|
271
|
+
}, ie.value), {
|
|
272
|
+
default: v(() => {
|
|
273
|
+
var i;
|
|
274
|
+
return [
|
|
275
|
+
p(n(H), {
|
|
276
|
+
class: z([((i = n(u)) == null ? void 0 : i.errClass) + "-text"])
|
|
277
|
+
}, {
|
|
278
|
+
default: v(() => [
|
|
279
|
+
E(A(n(r)("webui.components.form.upload.selectFile")), 1)
|
|
280
|
+
]),
|
|
281
|
+
_: 1
|
|
282
|
+
}, 8, ["class"])
|
|
283
|
+
];
|
|
284
|
+
}),
|
|
285
|
+
_: 1
|
|
286
|
+
}, 16)), [
|
|
287
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:upload" }]
|
|
288
|
+
]),
|
|
289
|
+
e.showFolderUpload ? b((d(), q(n(J), G({
|
|
290
|
+
key: 0,
|
|
291
|
+
ref_key: "fileFolderUploader",
|
|
292
|
+
ref: F,
|
|
293
|
+
webkitdirectory: !0,
|
|
294
|
+
directory: !0
|
|
295
|
+
}, ae.value), {
|
|
296
|
+
default: v(() => {
|
|
297
|
+
var i;
|
|
298
|
+
return [
|
|
299
|
+
p(n(H), {
|
|
300
|
+
class: z([((i = n(u)) == null ? void 0 : i.errClass) + "-text"])
|
|
301
|
+
}, {
|
|
302
|
+
default: v(() => [
|
|
303
|
+
E(A(n(r)("webui.components.form.upload.selectDirectory")), 1)
|
|
304
|
+
]),
|
|
305
|
+
_: 1
|
|
306
|
+
}, 8, ["class"])
|
|
307
|
+
];
|
|
308
|
+
}),
|
|
309
|
+
_: 1
|
|
310
|
+
}, 16)), [
|
|
311
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:upload" }]
|
|
312
|
+
]) : x("", !0)
|
|
313
|
+
]),
|
|
314
|
+
w("div", {
|
|
315
|
+
class: z(["flex-1 text-sm text-gray-500", [((S = n(u)) == null ? void 0 : S.errClass) + "-text"]])
|
|
316
|
+
}, A(ue()), 3)
|
|
317
|
+
]),
|
|
318
|
+
w("div", Ee, [
|
|
319
|
+
(d(!0), m(fe, null, he(a.value, (i, h) => (d(), m("div", {
|
|
320
|
+
key: (o.parentPath || "") + (i.relativePath || i.name || h),
|
|
321
|
+
class: "mb-2 pb-1"
|
|
322
|
+
}, [
|
|
323
|
+
w("div", Oe, [
|
|
324
|
+
w("div", Le, [
|
|
325
|
+
w("span", {
|
|
326
|
+
class: z(["text-gray-700 mr-2", [i.status == n(s).Offline ? "line-through" : ""]]),
|
|
327
|
+
title: i.relativePath || i.fileName || i.name
|
|
328
|
+
}, A(i.fileName ?? i.name), 11, Te),
|
|
329
|
+
w("span", null, [
|
|
330
|
+
p(n(ye), {
|
|
331
|
+
color: ce(i.status)
|
|
332
|
+
}, {
|
|
333
|
+
default: v(() => [
|
|
334
|
+
E(A(de(i.status)), 1)
|
|
335
|
+
]),
|
|
336
|
+
_: 2
|
|
337
|
+
}, 1032, ["color"])
|
|
338
|
+
])
|
|
339
|
+
]),
|
|
340
|
+
w("div", ze, [
|
|
341
|
+
e.showOnlineSwitch && (i.status == n(s).Online || i.status == n(s).Offline) ? (d(), m("div", Ae, [
|
|
342
|
+
p(n(B), {
|
|
343
|
+
title: n(r)("webui.components.form.upload.onlineOrOffline")
|
|
344
|
+
}, {
|
|
345
|
+
default: v(() => [
|
|
346
|
+
b(p(n(ve), {
|
|
347
|
+
checked: i.status,
|
|
348
|
+
"onUpdate:checked": (y) => i.status = y,
|
|
349
|
+
data: [
|
|
350
|
+
{ label: n(r)("webui.common.online"), value: n(s).Online },
|
|
351
|
+
{ label: n(r)("webui.common.offline"), value: n(s).Offline }
|
|
352
|
+
],
|
|
353
|
+
onChange: (y) => le(i)
|
|
354
|
+
}, null, 8, ["checked", "onUpdate:checked", "data", "onChange"]), [
|
|
355
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:online" }]
|
|
356
|
+
])
|
|
357
|
+
]),
|
|
358
|
+
_: 2
|
|
359
|
+
}, 1032, ["title"])
|
|
360
|
+
])) : x("", !0),
|
|
361
|
+
e.downloadUrl && (i.status == n(s).Online || i.status == n(s).Offline) ? (d(), m("div", $e, [
|
|
362
|
+
p(n(B), {
|
|
363
|
+
title: n(r)("webui.common.download")
|
|
364
|
+
}, {
|
|
365
|
+
default: v(() => [
|
|
366
|
+
b(p(n(K), {
|
|
367
|
+
icon: "icon-download",
|
|
368
|
+
clickable: "",
|
|
369
|
+
onClick: (y) => M(h)
|
|
370
|
+
}, null, 8, ["onClick"]), [
|
|
371
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
|
|
372
|
+
]),
|
|
373
|
+
e.showActionText ? b((d(), m("span", {
|
|
374
|
+
key: 0,
|
|
375
|
+
class: "mr-2 text-sm text-nowrap",
|
|
376
|
+
onClick: (y) => M(h)
|
|
377
|
+
}, t[1] || (t[1] = [
|
|
378
|
+
E("下载")
|
|
379
|
+
]), 8, Be)), [
|
|
380
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
|
|
381
|
+
]) : x("", !0)
|
|
382
|
+
]),
|
|
383
|
+
_: 2
|
|
384
|
+
}, 1032, ["title"])
|
|
385
|
+
])) : x("", !0),
|
|
386
|
+
e.previewUrl && (i.status == n(s).Online || i.status == n(s).Offline) ? (d(), m("div", Ie, [
|
|
387
|
+
p(n(B), {
|
|
388
|
+
title: n(r)("webui.common.preview")
|
|
389
|
+
}, {
|
|
390
|
+
default: v(() => [
|
|
391
|
+
b(p(n(K), {
|
|
392
|
+
icon: "icon-eye",
|
|
393
|
+
clickable: "",
|
|
394
|
+
onClick: (y) => Q(h)
|
|
395
|
+
}, null, 8, ["onClick"]), [
|
|
396
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:preview" }]
|
|
397
|
+
]),
|
|
398
|
+
e.showActionText ? b((d(), m("span", {
|
|
399
|
+
key: 0,
|
|
400
|
+
class: "mr-2 text-sm text-nowrap",
|
|
401
|
+
onClick: (y) => Q(h)
|
|
402
|
+
}, t[2] || (t[2] = [
|
|
403
|
+
E("预览")
|
|
404
|
+
]), 8, Re)), [
|
|
405
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:preview" }]
|
|
406
|
+
]) : x("", !0)
|
|
407
|
+
]),
|
|
408
|
+
_: 2
|
|
409
|
+
}, 1032, ["title"])
|
|
410
|
+
])) : x("", !0),
|
|
411
|
+
e.showDelete !== !1 ? (d(), m("div", Ke, [
|
|
412
|
+
p(n(be), {
|
|
413
|
+
open: re(h),
|
|
414
|
+
cancelText: n(r)("webui.common.no"),
|
|
415
|
+
okText: n(r)("webui.common.yes"),
|
|
416
|
+
title: n(r)("webui.components.form.upload.deleteConfirm"),
|
|
417
|
+
okButtonProps: { size: "small" },
|
|
418
|
+
cancelButtonProps: { size: "small" },
|
|
419
|
+
onConfirm: (y) => V(h),
|
|
420
|
+
onCancel: t[0] || (t[0] = (y) => $.value = -1)
|
|
421
|
+
}, {
|
|
422
|
+
default: v(() => [
|
|
423
|
+
p(n(B), {
|
|
424
|
+
title: n(r)("webui.common.delete")
|
|
425
|
+
}, {
|
|
426
|
+
default: v(() => [
|
|
427
|
+
w("div", {
|
|
428
|
+
onClick: (y) => se(h, i.status)
|
|
429
|
+
}, [
|
|
430
|
+
b(p(n(K), {
|
|
431
|
+
icon: "icon-new",
|
|
432
|
+
angle: 45,
|
|
433
|
+
clickable: ""
|
|
434
|
+
}, null, 512), [
|
|
435
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
|
|
436
|
+
]),
|
|
437
|
+
e.showActionText ? b((d(), m("span", je, t[3] || (t[3] = [
|
|
438
|
+
E("删除")
|
|
439
|
+
]))), [
|
|
440
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
|
|
441
|
+
]) : x("", !0)
|
|
442
|
+
], 8, Ne)
|
|
443
|
+
]),
|
|
444
|
+
_: 2
|
|
445
|
+
}, 1032, ["title"])
|
|
446
|
+
]),
|
|
447
|
+
_: 2
|
|
448
|
+
}, 1032, ["open", "cancelText", "okText", "title", "onConfirm"])
|
|
449
|
+
])) : x("", !0)
|
|
450
|
+
])
|
|
451
|
+
]),
|
|
452
|
+
i.status !== n(s).Online && i.status !== n(s).Offline && i.status !== n(s).Success ? (d(), m("div", De, [
|
|
453
|
+
p(n(xe), {
|
|
454
|
+
percent: i.percent,
|
|
455
|
+
"stroke-width": 2,
|
|
456
|
+
"show-info": !1,
|
|
457
|
+
style: { height: "2px" }
|
|
458
|
+
}, null, 8, ["percent"])
|
|
459
|
+
])) : x("", !0)
|
|
460
|
+
]))), 128))
|
|
461
|
+
])
|
|
462
|
+
], 2);
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
}), nt = /* @__PURE__ */ Ue(Me, [["__scopeId", "data-v-206cfd19"]]);
|
|
466
|
+
export {
|
|
467
|
+
Fe as C,
|
|
468
|
+
nt as U,
|
|
469
|
+
ke as a,
|
|
470
|
+
_e as d,
|
|
471
|
+
Se as p
|
|
472
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as F, defineAsyncComponent as M, ref as m, watch as V, onMounted as J, createElementBlock as x, openBlock as p, Fragment as K, createElementVNode as v, createVNode as _, toDisplayString as W, unref as i, createBlock as P, withKeys as f, normalizeClass as N, withModifiers as w, withCtx as z, createCommentVNode as L } from "vue";
|
|
2
2
|
import "ant-design-vue";
|
|
3
|
-
import { _ as q } from "../../assets/modules/toolIcon-
|
|
3
|
+
import { _ as q } from "../../assets/modules/toolIcon-BYnHhAy-.js";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
|
-
import "../../assets/modules/upload-template-
|
|
5
|
+
import "../../assets/modules/upload-template-BKm9mFq8.js";
|
|
6
|
+
import { _ as D } from "../../assets/modules/index-DUBY49Au.js";
|
|
6
7
|
import "@skyfox2000/microbase";
|
|
7
8
|
import "vue-m-message";
|
|
8
9
|
import "async-validator";
|
|
9
10
|
import "dayjs";
|
|
10
|
-
import { _ as D } from "../../assets/modules/index-DyE2ppxB.js";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
12
|
const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
|
|
13
13
|
const o = document.createElement("script");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, ref as d, watch as _, onMounted as v, resolveComponent as h, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as w, KeepAlive as y, unref as n, resolveDynamicComponent as I } from "vue";
|
|
2
|
-
import { _ as g } from "../../assets/modules/baseLayout-
|
|
3
|
-
import {
|
|
2
|
+
import { _ as g } from "../../assets/modules/baseLayout-DfTxHOFc.js";
|
|
3
|
+
import { at as A, a as S } from "../../assets/modules/upload-template-BKm9mFq8.js";
|
|
4
4
|
import "@skyfox2000/microbase";
|
|
5
5
|
import "@skyfox2000/fapi";
|
|
6
6
|
import b from "vue-m-message";
|
package/lib/es/Error403/index.js
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import { defineComponent as i, createBlock as
|
|
2
|
-
import { r as s } from "../../assets/modules/upload-template-
|
|
1
|
+
import { defineComponent as i, createBlock as n, openBlock as p, unref as r, withCtx as e, createVNode as m, createTextVNode as c, toDisplayString as a } from "vue";
|
|
2
|
+
import { r as s } from "../../assets/modules/upload-template-BKm9mFq8.js";
|
|
3
3
|
import "@skyfox2000/microbase";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
5
|
import "vue-m-message";
|
|
6
6
|
import "async-validator";
|
|
7
7
|
import "dayjs";
|
|
8
|
-
import { Result as u, Button as
|
|
8
|
+
import { Result as u, Button as l } from "ant-design-vue";
|
|
9
9
|
import "vue-draggable-next";
|
|
10
|
-
const
|
|
10
|
+
const N = /* @__PURE__ */ i({
|
|
11
11
|
__name: "error403",
|
|
12
|
-
setup(
|
|
12
|
+
setup(f) {
|
|
13
13
|
const o = () => {
|
|
14
14
|
s.back();
|
|
15
15
|
};
|
|
16
|
-
return (
|
|
16
|
+
return (t, d) => (p(), n(r(u), {
|
|
17
17
|
status: "403",
|
|
18
18
|
title: "403",
|
|
19
|
-
"sub-title": "
|
|
19
|
+
"sub-title": t.$t("webui.components.error.forbidden")
|
|
20
20
|
}, {
|
|
21
21
|
extra: e(() => [
|
|
22
|
-
|
|
22
|
+
m(r(l), {
|
|
23
23
|
type: "primary",
|
|
24
24
|
onClick: o
|
|
25
25
|
}, {
|
|
26
|
-
default: e(() =>
|
|
27
|
-
a("
|
|
28
|
-
])
|
|
29
|
-
_: 1
|
|
30
|
-
__: [0]
|
|
26
|
+
default: e(() => [
|
|
27
|
+
c(a(t.$t("webui.components.error.clickReturn")), 1)
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
31
30
|
})
|
|
32
31
|
]),
|
|
33
32
|
_: 1
|
|
34
|
-
}));
|
|
33
|
+
}, 8, ["sub-title"]));
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
N as default
|
|
39
38
|
};
|
package/lib/es/Error404/index.js
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import { defineComponent as i, createBlock as
|
|
2
|
-
import { r as
|
|
1
|
+
import { defineComponent as i, createBlock as n, openBlock as p, unref as e, withCtx as r, createVNode as m, createTextVNode as a, toDisplayString as c } from "vue";
|
|
2
|
+
import { r as u } from "../../assets/modules/upload-template-BKm9mFq8.js";
|
|
3
3
|
import "@skyfox2000/microbase";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
5
|
import "vue-m-message";
|
|
6
6
|
import "async-validator";
|
|
7
7
|
import "dayjs";
|
|
8
|
-
import { Result as
|
|
8
|
+
import { Result as s, Button as l } from "ant-design-vue";
|
|
9
9
|
import "vue-draggable-next";
|
|
10
|
-
const
|
|
10
|
+
const g = /* @__PURE__ */ i({
|
|
11
11
|
__name: "error404",
|
|
12
|
-
setup(
|
|
12
|
+
setup(f) {
|
|
13
13
|
const o = () => {
|
|
14
|
-
|
|
14
|
+
u.back();
|
|
15
15
|
};
|
|
16
|
-
return (
|
|
16
|
+
return (t, _) => (p(), n(e(s), {
|
|
17
17
|
status: "404",
|
|
18
18
|
title: "404",
|
|
19
|
-
"sub-title": "
|
|
19
|
+
"sub-title": t.$t("webui.components.error.pageNotFound")
|
|
20
20
|
}, {
|
|
21
|
-
extra:
|
|
22
|
-
|
|
21
|
+
extra: r(() => [
|
|
22
|
+
m(e(l), {
|
|
23
23
|
type: "primary",
|
|
24
24
|
onClick: o
|
|
25
25
|
}, {
|
|
26
|
-
default:
|
|
27
|
-
a("
|
|
28
|
-
])
|
|
29
|
-
_: 1
|
|
30
|
-
__: [0]
|
|
26
|
+
default: r(() => [
|
|
27
|
+
a(c(t.$t("webui.components.error.clickReturn")), 1)
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
31
30
|
})
|
|
32
31
|
]),
|
|
33
32
|
_: 1
|
|
34
|
-
}));
|
|
33
|
+
}, 8, ["sub-title"]));
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
g as default
|
|
39
38
|
};
|