@skyfox2000/webui 1.4.21 → 1.4.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/lib/assets/modules/{baseLayout-Da4Ox7Lj.js → baseLayout-DiqAUz2h.js} +3 -3
- package/lib/assets/modules/{file-upload-Bu6FkNjZ.js → file-upload-CKMd0H11.js} +1 -1
- package/lib/assets/modules/{index-Ch3meKe4.js → index-BpsqYPCw.js} +1 -1
- package/lib/assets/modules/{index-BYVerdEw.js → index-DvozNhVM.js} +2 -2
- package/lib/assets/modules/{index-BysCt107.js → index-gmbMtZa2.js} +2 -2
- package/lib/assets/modules/{menuTabs-BqLT-YbD.js → menuTabs-CvAiSVNW.js} +2 -2
- package/lib/assets/modules/{toolIcon-Dd58W0UM.js → toolIcon-DWurTPaB.js} +1 -1
- package/lib/assets/modules/{upload-template-Csccple9.js → upload-template-BuaWOXY_.js} +435 -413
- package/lib/assets/modules/uploadList-De6KfTAV.js +466 -0
- package/lib/components/content/index.d.ts +4 -0
- package/lib/components/content/list/index.vue.d.ts +126 -0
- package/lib/components/content/list/listOperate.vue.d.ts +18 -0
- package/lib/components/form/switch/index.vue.d.ts +11 -1
- package/lib/components/form/upload/uploadList.vue.d.ts +448 -0
- package/lib/components/index.d.ts +1 -1
- package/lib/const/options.d.ts +4 -2
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +2 -2
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +5 -5
- package/lib/es/MenuLayout/index.js +2 -2
- package/lib/es/TemplateFile/index.js +4 -4
- package/lib/es/UploadForm/index.js +70 -56
- package/lib/index.d.ts +1 -1
- package/lib/typings/upload.d.ts +10 -0
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1418 -1167
- package/package.json +2 -2
- package/src/components/content/dialog/uploadForm.vue +96 -13
- package/src/components/content/index.ts +5 -0
- package/src/components/content/list/index.vue +198 -0
- package/src/components/content/list/listOperate.vue +122 -0
- package/src/components/content/table/index.vue +1 -1
- package/src/components/content/table/tableOperate.vue +19 -37
- package/src/components/form/switch/index.vue +27 -14
- package/src/components/form/upload/uploadList.vue +46 -3
- package/src/components/index.ts +2 -0
- package/src/const/options.ts +11 -1
- package/src/index.ts +2 -0
- package/src/router/index.ts +3 -1
- package/src/typings/upload.d.ts +10 -0
- package/src/utils/menu.ts +1 -0
- package/lib/assets/modules/uploadList-D8scq04c.js +0 -423
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { defineComponent as pe, ref as O, computed as $, watch as T, resolveDirective as de, createElementBlock as d, openBlock as c, normalizeClass as z, unref as n, createElementVNode as h, withDirectives as x, createCommentVNode as w, createBlock as V, mergeProps as q, withCtx as v, createVNode as p, createTextVNode as P, toDisplayString as I, Fragment as me, renderList as fe } from "vue";
|
|
2
|
+
import { _ as G } from "./index-BpsqYPCw.js";
|
|
3
|
+
import { a as B, _ as R } from "./toolIcon-DWurTPaB.js";
|
|
4
|
+
import { httpPost as K, ResStatus as N } from "@skyfox2000/fapi";
|
|
5
|
+
import { L as W, u as X, v as he, _ as ve } from "./upload-template-BuaWOXY_.js";
|
|
6
|
+
import { U as i, f as ye, p as H } from "./file-upload-CKMd0H11.js";
|
|
7
|
+
import { combineParams as Y } from "@skyfox2000/microbase";
|
|
8
|
+
import _ from "vue-m-message";
|
|
9
|
+
import "async-validator";
|
|
10
|
+
import "dayjs";
|
|
11
|
+
import { Upload as J, Tag as xe, Popconfirm as we, Progress as Ue } from "ant-design-vue";
|
|
12
|
+
import "vue-draggable-next";
|
|
13
|
+
import { _ as _e } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const Ce = (u, C) => {
|
|
15
|
+
const o = document.createElement("a"), m = URL.createObjectURL(u);
|
|
16
|
+
o.href = m, o.download = C, o.style.display = "none", document.body.appendChild(o), o.click(), URL.revokeObjectURL(m), document.body.removeChild(o);
|
|
17
|
+
}, be = (u, C, o) => {
|
|
18
|
+
try {
|
|
19
|
+
o && (u.api || (u.api = o.api), u.authorize === void 0 && (u.authorize = o.authorize));
|
|
20
|
+
const m = Y(u.params, C);
|
|
21
|
+
return K(u, m).then((r) => {
|
|
22
|
+
if ((r == null ? void 0 : r.status) === N.SUCCESS && r.data) {
|
|
23
|
+
const s = r.data, b = s.Content, E = s.Key.split("/").pop(), k = atob(b), g = [];
|
|
24
|
+
for (let F = 0; F < k.length; F++)
|
|
25
|
+
g.push(k.charCodeAt(F));
|
|
26
|
+
const U = new Blob([new Uint8Array(g)], {
|
|
27
|
+
type: s.Type
|
|
28
|
+
});
|
|
29
|
+
Ce(U, E);
|
|
30
|
+
} else if ((r == null ? void 0 : r.errno) == W) {
|
|
31
|
+
X().logout(!1);
|
|
32
|
+
return;
|
|
33
|
+
} else
|
|
34
|
+
_.error("下载文件失败!");
|
|
35
|
+
});
|
|
36
|
+
} catch (m) {
|
|
37
|
+
console.error("下载失败:", m), _.error("文件下载失败,请稍后重试");
|
|
38
|
+
}
|
|
39
|
+
}, ke = ["xlsx", "xls", "csv", "txt"], Se = (u, C, o) => {
|
|
40
|
+
const m = C.split(".").pop();
|
|
41
|
+
if (ke.includes(m))
|
|
42
|
+
console.log(u);
|
|
43
|
+
else
|
|
44
|
+
return _.error("文件类型不支持预览"), !1;
|
|
45
|
+
const r = Y(u.params, o);
|
|
46
|
+
return K(u, r).then((s) => {
|
|
47
|
+
if ((s == null ? void 0 : s.status) === N.SUCCESS && s.data) {
|
|
48
|
+
const E = s.data.Content, k = atob(E), g = [];
|
|
49
|
+
for (let U = 0; U < k.length; U++)
|
|
50
|
+
g.push(k.charCodeAt(U));
|
|
51
|
+
} else if ((s == null ? void 0 : s.errno) == W) {
|
|
52
|
+
X().logout(!1);
|
|
53
|
+
return;
|
|
54
|
+
} else
|
|
55
|
+
_.error("文件预览失败!");
|
|
56
|
+
});
|
|
57
|
+
}, ge = { class: "flex items-center justify-between w-full" }, Fe = { class: "w-35 mx-3 flex gap-2" }, Pe = { class: "mt-4 px-3" }, Ee = { class: "flex items-center justify-between" }, Le = { class: "flex items-center" }, Oe = ["title"], ze = { class: "flex items-center" }, Ae = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "mr-2"
|
|
60
|
+
}, Be = {
|
|
61
|
+
key: 1,
|
|
62
|
+
class: "flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
|
|
63
|
+
}, $e = ["onClick"], Te = {
|
|
64
|
+
key: 2,
|
|
65
|
+
class: "flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
|
|
66
|
+
}, Ie = ["onClick"], Re = {
|
|
67
|
+
key: 3,
|
|
68
|
+
class: "flex items-center text-red-500 hover:text-red-700 cursor-pointer"
|
|
69
|
+
}, Ke = ["onClick"], Ne = {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "text-sm text-nowrap"
|
|
72
|
+
}, je = { 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(u, { emit: C }) {
|
|
96
|
+
const o = u, m = he(), { errInfo: r } = m, s = O(o.fileList), b = O([]), E = O(), k = O(), g = C, U = $(() => {
|
|
97
|
+
var e;
|
|
98
|
+
return (e = o.fileExt) != null && e.length ? o.fileExt.map((t) => `.${t}`).join(",") : "";
|
|
99
|
+
}), F = (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 _.error("文件类型不支持"), !1;
|
|
105
|
+
}
|
|
106
|
+
return e.size / 1024 / 1024 > o.maxFileSize ? (_.error(`文件大小超过 ${o.maxFileSize}MB 限制`), !1) : !0;
|
|
107
|
+
}, Z = () => o.maxCount > 1 && s.value.length >= o.maxCount, ee = (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 = H.join("/", o.parentPath, t.name)), t.status = i.Pending, t.webkitRelativePath && (t.relativePath = l), t;
|
|
112
|
+
}, te = (e) => F(e) && o.autoUpload, j = async (e) => {
|
|
113
|
+
if (e.length === 0) return;
|
|
114
|
+
const t = [...s.value];
|
|
115
|
+
let l = !1;
|
|
116
|
+
for (const L of e) {
|
|
117
|
+
if (!F(L)) {
|
|
118
|
+
l = !0;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
const S = ee(L);
|
|
122
|
+
if (o.maxCount === 1) {
|
|
123
|
+
t.length = 0, t.push(S);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
if (Z()) {
|
|
127
|
+
_.error(`最多上传 ${o.maxCount} 个文件`), l = !0;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
const a = t.findIndex(
|
|
131
|
+
(f) => f.name === S.name
|
|
132
|
+
);
|
|
133
|
+
a > -1 ? t[a] = S : t.push(S);
|
|
134
|
+
}
|
|
135
|
+
(!l || t.length > 0) && (s.value = t), b.value = [];
|
|
136
|
+
}, oe = (e) => {
|
|
137
|
+
b.value = e, j(e);
|
|
138
|
+
}, ae = $(() => ({
|
|
139
|
+
accept: U.value,
|
|
140
|
+
multiple: o.maxCount !== 1,
|
|
141
|
+
fileList: b.value,
|
|
142
|
+
"onUpdate:fileList": oe,
|
|
143
|
+
beforeUpload: te,
|
|
144
|
+
listType: "text",
|
|
145
|
+
showUploadList: !1,
|
|
146
|
+
customRequest: async () => {
|
|
147
|
+
if (o.autoUpload && o.uploadUrl)
|
|
148
|
+
for (const e of s.value)
|
|
149
|
+
e.percent === 0 && e.status === i.Pending && await ye(o.uploadUrl, e);
|
|
150
|
+
}
|
|
151
|
+
})), ne = $(() => ({
|
|
152
|
+
accept: U.value,
|
|
153
|
+
multiple: !0,
|
|
154
|
+
directory: !0,
|
|
155
|
+
// 添加标准属性
|
|
156
|
+
webkitdirectory: !0,
|
|
157
|
+
// Webkit属性
|
|
158
|
+
fileList: [],
|
|
159
|
+
"onUpdate:fileList": (e) => j(e),
|
|
160
|
+
beforeUpload: () => !1,
|
|
161
|
+
listType: "text",
|
|
162
|
+
showUploadList: !1,
|
|
163
|
+
customRequest: () => {
|
|
164
|
+
}
|
|
165
|
+
}));
|
|
166
|
+
T(
|
|
167
|
+
() => o.fileList,
|
|
168
|
+
(e) => {
|
|
169
|
+
s.value = e;
|
|
170
|
+
},
|
|
171
|
+
{ deep: !0, immediate: !0 }
|
|
172
|
+
), T(
|
|
173
|
+
() => s.value,
|
|
174
|
+
(e) => {
|
|
175
|
+
g("update:file-list", e);
|
|
176
|
+
},
|
|
177
|
+
{ deep: !0 }
|
|
178
|
+
), T(
|
|
179
|
+
() => o.parentPath,
|
|
180
|
+
(e) => {
|
|
181
|
+
e && s.value.forEach((t) => {
|
|
182
|
+
t.params.FileKey = H.join("/", e, t.fileName);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
const M = (e) => {
|
|
187
|
+
const t = s.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
|
+
be(l);
|
|
198
|
+
}, se = (e) => {
|
|
199
|
+
e.minioFile && (e.minioFile.Status = e.status);
|
|
200
|
+
}, D = (e) => {
|
|
201
|
+
const t = s.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
|
+
}, Q = (e) => {
|
|
213
|
+
const t = s.value[e];
|
|
214
|
+
o.deleteUrl && t.minioFile && t.minioFile.Key ? K(o.deleteUrl, {
|
|
215
|
+
Query: {
|
|
216
|
+
FileKey: t.minioFile.Key
|
|
217
|
+
}
|
|
218
|
+
}).then((l) => {
|
|
219
|
+
l && l.status === N.SUCCESS && (_.success("删除文件成功!"), s.value.splice(e, 1));
|
|
220
|
+
}) : s.value.splice(e, 1), A.value = -1;
|
|
221
|
+
}, A = O(-1), le = (e, t) => {
|
|
222
|
+
if (A.value = e, t === i.Pending) {
|
|
223
|
+
Q(e);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
}, ie = (e) => e === A.value, re = () => {
|
|
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
|
+
}, ue = (e) => {
|
|
230
|
+
switch (e) {
|
|
231
|
+
case i.Uploading:
|
|
232
|
+
return "blue";
|
|
233
|
+
case i.Success:
|
|
234
|
+
return "green";
|
|
235
|
+
case i.Error:
|
|
236
|
+
return "red";
|
|
237
|
+
case i.Online:
|
|
238
|
+
return "green";
|
|
239
|
+
case i.Offline:
|
|
240
|
+
return "pink";
|
|
241
|
+
default:
|
|
242
|
+
return "cyan";
|
|
243
|
+
}
|
|
244
|
+
}, ce = (e) => {
|
|
245
|
+
switch (e) {
|
|
246
|
+
case i.Uploading:
|
|
247
|
+
return "上传中";
|
|
248
|
+
case i.Success:
|
|
249
|
+
return "上传完成";
|
|
250
|
+
case i.Error:
|
|
251
|
+
return "上传失败";
|
|
252
|
+
case i.Online:
|
|
253
|
+
return "在线";
|
|
254
|
+
case i.Offline:
|
|
255
|
+
return "已下线";
|
|
256
|
+
default:
|
|
257
|
+
return "待上传";
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
return (e, t) => {
|
|
261
|
+
var L, S;
|
|
262
|
+
const l = de("auth");
|
|
263
|
+
return c(), d("div", {
|
|
264
|
+
class: z(["w-full border border-solid border-gray-100 mt-1 rounded-md py-5", [(L = n(r)) == null ? void 0 : L.errClass]])
|
|
265
|
+
}, [
|
|
266
|
+
h("div", ge, [
|
|
267
|
+
h("div", Fe, [
|
|
268
|
+
x((c(), V(n(J), q({
|
|
269
|
+
ref_key: "fileUploader",
|
|
270
|
+
ref: E
|
|
271
|
+
}, ae.value), {
|
|
272
|
+
default: v(() => {
|
|
273
|
+
var a;
|
|
274
|
+
return [
|
|
275
|
+
p(n(G), {
|
|
276
|
+
class: z([((a = n(r)) == null ? void 0 : a.errClass) + "-text"])
|
|
277
|
+
}, {
|
|
278
|
+
default: v(() => t[1] || (t[1] = [
|
|
279
|
+
P("选择文件")
|
|
280
|
+
])),
|
|
281
|
+
_: 1,
|
|
282
|
+
__: [1]
|
|
283
|
+
}, 8, ["class"])
|
|
284
|
+
];
|
|
285
|
+
}),
|
|
286
|
+
_: 1
|
|
287
|
+
}, 16)), [
|
|
288
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:upload" }]
|
|
289
|
+
]),
|
|
290
|
+
e.showFolderUpload ? x((c(), V(n(J), q({
|
|
291
|
+
key: 0,
|
|
292
|
+
ref_key: "fileFolderUploader",
|
|
293
|
+
ref: k,
|
|
294
|
+
webkitdirectory: !0,
|
|
295
|
+
directory: !0
|
|
296
|
+
}, ne.value), {
|
|
297
|
+
default: v(() => {
|
|
298
|
+
var a;
|
|
299
|
+
return [
|
|
300
|
+
p(n(G), {
|
|
301
|
+
class: z([((a = n(r)) == null ? void 0 : a.errClass) + "-text"])
|
|
302
|
+
}, {
|
|
303
|
+
default: v(() => t[2] || (t[2] = [
|
|
304
|
+
P("选择目录")
|
|
305
|
+
])),
|
|
306
|
+
_: 1,
|
|
307
|
+
__: [2]
|
|
308
|
+
}, 8, ["class"])
|
|
309
|
+
];
|
|
310
|
+
}),
|
|
311
|
+
_: 1
|
|
312
|
+
}, 16)), [
|
|
313
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:upload" }]
|
|
314
|
+
]) : w("", !0)
|
|
315
|
+
]),
|
|
316
|
+
h("div", {
|
|
317
|
+
class: z(["flex-1 text-sm text-gray-500", [((S = n(r)) == null ? void 0 : S.errClass) + "-text"]])
|
|
318
|
+
}, I(re()), 3)
|
|
319
|
+
]),
|
|
320
|
+
h("div", Pe, [
|
|
321
|
+
(c(!0), d(me, null, fe(s.value, (a, f) => (c(), d("div", {
|
|
322
|
+
key: (o.parentPath || "") + (a.relativePath || a.name || f),
|
|
323
|
+
class: "mb-2 pb-1"
|
|
324
|
+
}, [
|
|
325
|
+
h("div", Ee, [
|
|
326
|
+
h("div", Le, [
|
|
327
|
+
h("span", {
|
|
328
|
+
class: z(["text-gray-700 mr-2", [a.status == n(i).Offline ? "line-through" : ""]]),
|
|
329
|
+
title: a.relativePath || a.fileName || a.name
|
|
330
|
+
}, I(a.fileName ?? a.name), 11, Oe),
|
|
331
|
+
h("span", null, [
|
|
332
|
+
p(n(xe), {
|
|
333
|
+
color: ue(a.status)
|
|
334
|
+
}, {
|
|
335
|
+
default: v(() => [
|
|
336
|
+
P(I(ce(a.status)), 1)
|
|
337
|
+
]),
|
|
338
|
+
_: 2
|
|
339
|
+
}, 1032, ["color"])
|
|
340
|
+
])
|
|
341
|
+
]),
|
|
342
|
+
h("div", ze, [
|
|
343
|
+
e.showOnlineSwitch && (a.status == n(i).Online || a.status == n(i).Offline) ? (c(), d("div", Ae, [
|
|
344
|
+
p(n(B), { title: "上线或下线" }, {
|
|
345
|
+
default: v(() => [
|
|
346
|
+
x(p(n(ve), {
|
|
347
|
+
checked: a.status,
|
|
348
|
+
"onUpdate:checked": (y) => a.status = y,
|
|
349
|
+
data: [
|
|
350
|
+
{ label: "上线", value: n(i).Online },
|
|
351
|
+
{ label: "下线", value: n(i).Offline }
|
|
352
|
+
],
|
|
353
|
+
onChange: (y) => se(a)
|
|
354
|
+
}, null, 8, ["checked", "onUpdate:checked", "data", "onChange"]), [
|
|
355
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:online" }]
|
|
356
|
+
])
|
|
357
|
+
]),
|
|
358
|
+
_: 2
|
|
359
|
+
}, 1024)
|
|
360
|
+
])) : w("", !0),
|
|
361
|
+
e.downloadUrl && (a.status == n(i).Online || a.status == n(i).Offline) ? (c(), d("div", Be, [
|
|
362
|
+
p(n(B), { title: "下载" }, {
|
|
363
|
+
default: v(() => [
|
|
364
|
+
x(p(n(R), {
|
|
365
|
+
icon: "icon-download",
|
|
366
|
+
clickable: "",
|
|
367
|
+
onClick: (y) => M(f)
|
|
368
|
+
}, null, 8, ["onClick"]), [
|
|
369
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
|
|
370
|
+
]),
|
|
371
|
+
e.showActionText ? x((c(), d("span", {
|
|
372
|
+
key: 0,
|
|
373
|
+
class: "mr-2 text-sm text-nowrap",
|
|
374
|
+
onClick: (y) => M(f)
|
|
375
|
+
}, t[3] || (t[3] = [
|
|
376
|
+
P("下载")
|
|
377
|
+
]), 8, $e)), [
|
|
378
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
|
|
379
|
+
]) : w("", !0)
|
|
380
|
+
]),
|
|
381
|
+
_: 2
|
|
382
|
+
}, 1024)
|
|
383
|
+
])) : w("", !0),
|
|
384
|
+
e.previewUrl && (a.status == n(i).Online || a.status == n(i).Offline) ? (c(), d("div", Te, [
|
|
385
|
+
p(n(B), { title: "预览" }, {
|
|
386
|
+
default: v(() => [
|
|
387
|
+
x(p(n(R), {
|
|
388
|
+
icon: "icon-eye",
|
|
389
|
+
clickable: "",
|
|
390
|
+
onClick: (y) => D(f)
|
|
391
|
+
}, null, 8, ["onClick"]), [
|
|
392
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:preview" }]
|
|
393
|
+
]),
|
|
394
|
+
e.showActionText ? x((c(), d("span", {
|
|
395
|
+
key: 0,
|
|
396
|
+
class: "mr-2 text-sm text-nowrap",
|
|
397
|
+
onClick: (y) => D(f)
|
|
398
|
+
}, t[4] || (t[4] = [
|
|
399
|
+
P("预览")
|
|
400
|
+
]), 8, Ie)), [
|
|
401
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:preview" }]
|
|
402
|
+
]) : w("", !0)
|
|
403
|
+
]),
|
|
404
|
+
_: 2
|
|
405
|
+
}, 1024)
|
|
406
|
+
])) : w("", !0),
|
|
407
|
+
e.showDelete !== !1 ? (c(), d("div", Re, [
|
|
408
|
+
p(n(we), {
|
|
409
|
+
open: ie(f),
|
|
410
|
+
cancelText: "否",
|
|
411
|
+
okText: "是",
|
|
412
|
+
title: "确定删除该文件吗?",
|
|
413
|
+
okButtonProps: { size: "small" },
|
|
414
|
+
cancelButtonProps: { size: "small" },
|
|
415
|
+
onConfirm: (y) => Q(f),
|
|
416
|
+
onCancel: t[0] || (t[0] = (y) => A.value = -1)
|
|
417
|
+
}, {
|
|
418
|
+
default: v(() => [
|
|
419
|
+
p(n(B), { title: "删除" }, {
|
|
420
|
+
default: v(() => [
|
|
421
|
+
h("div", {
|
|
422
|
+
onClick: (y) => le(f, a.status)
|
|
423
|
+
}, [
|
|
424
|
+
x(p(n(R), {
|
|
425
|
+
icon: "icon-new",
|
|
426
|
+
angle: 45,
|
|
427
|
+
clickable: ""
|
|
428
|
+
}, null, 512), [
|
|
429
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
|
|
430
|
+
]),
|
|
431
|
+
e.showActionText ? x((c(), d("span", Ne, t[5] || (t[5] = [
|
|
432
|
+
P("删除")
|
|
433
|
+
]))), [
|
|
434
|
+
[l, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
|
|
435
|
+
]) : w("", !0)
|
|
436
|
+
], 8, Ke)
|
|
437
|
+
]),
|
|
438
|
+
_: 2
|
|
439
|
+
}, 1024)
|
|
440
|
+
]),
|
|
441
|
+
_: 2
|
|
442
|
+
}, 1032, ["open", "onConfirm"])
|
|
443
|
+
])) : w("", !0)
|
|
444
|
+
])
|
|
445
|
+
]),
|
|
446
|
+
a.status !== n(i).Online && a.status !== n(i).Offline && a.status !== n(i).Success ? (c(), d("div", je, [
|
|
447
|
+
p(n(Ue), {
|
|
448
|
+
percent: a.percent,
|
|
449
|
+
"stroke-width": 2,
|
|
450
|
+
"show-info": !1,
|
|
451
|
+
style: { height: "2px" }
|
|
452
|
+
}, null, 8, ["percent"])
|
|
453
|
+
])) : w("", !0)
|
|
454
|
+
]))), 128))
|
|
455
|
+
])
|
|
456
|
+
], 2);
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
}), ot = /* @__PURE__ */ _e(Me, [["__scopeId", "data-v-7ba0982f"]]);
|
|
460
|
+
export {
|
|
461
|
+
ke as C,
|
|
462
|
+
ot as U,
|
|
463
|
+
be as a,
|
|
464
|
+
Ce as d,
|
|
465
|
+
Se as p
|
|
466
|
+
};
|
|
@@ -2,6 +2,8 @@ import { default as Dialog } from './dialog/index.vue';
|
|
|
2
2
|
import { default as Drawer } from './drawer/index.vue';
|
|
3
3
|
import { default as Form } from './form/index.vue';
|
|
4
4
|
import { default as FormItem } from './form/formItem.vue';
|
|
5
|
+
import { default as List } from './list/index.vue';
|
|
6
|
+
import { default as ListOperate } from './list/listOperate.vue';
|
|
5
7
|
import { default as Search } from './search/index.vue';
|
|
6
8
|
import { default as SearchItem } from './search/searchItem.vue';
|
|
7
9
|
import { default as Table } from './table/index.vue';
|
|
@@ -13,6 +15,8 @@ export { Dialog };
|
|
|
13
15
|
export { Drawer };
|
|
14
16
|
export { Form };
|
|
15
17
|
export { FormItem };
|
|
18
|
+
export { List };
|
|
19
|
+
export { ListOperate };
|
|
16
20
|
export { Search };
|
|
17
21
|
export { SearchItem };
|
|
18
22
|
export { Table };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { PaginationProps, ListProps } from 'ant-design-vue';
|
|
2
|
+
import { GridControl } from '../../../index';
|
|
3
|
+
import { AnyData } from '../../../../../502417_fapi';
|
|
4
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, ComponentProvideOptions } from 'vue';
|
|
5
|
+
import { ListGridType } from 'ant-design-vue/es/list';
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
gridCtrl: GridControl<AnyData>;
|
|
8
|
+
primaryKey?: string;
|
|
9
|
+
listData?: Record<string, AnyData>[];
|
|
10
|
+
grid?: ListProps['grid'];
|
|
11
|
+
pagination?: false | PaginationProps;
|
|
12
|
+
titleField?: string;
|
|
13
|
+
statusDisabled?: Function;
|
|
14
|
+
};
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
cardContent?(_: {
|
|
19
|
+
record: any;
|
|
20
|
+
}): any;
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
rootEl: any;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
|
+
pagination: false | Partial< ExtractPropTypes<{
|
|
28
|
+
total: NumberConstructor;
|
|
29
|
+
defaultCurrent: NumberConstructor;
|
|
30
|
+
disabled: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
current: NumberConstructor;
|
|
35
|
+
defaultPageSize: NumberConstructor;
|
|
36
|
+
pageSize: NumberConstructor;
|
|
37
|
+
hideOnSinglePage: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
showSizeChanger: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
pageSizeOptions: {
|
|
46
|
+
type: PropType<(string | number)[]>;
|
|
47
|
+
default: (string | number)[];
|
|
48
|
+
};
|
|
49
|
+
buildOptionText: {
|
|
50
|
+
type: PropType<(opt: {
|
|
51
|
+
value: any;
|
|
52
|
+
}) => any>;
|
|
53
|
+
default: (opt: {
|
|
54
|
+
value: any;
|
|
55
|
+
}) => any;
|
|
56
|
+
};
|
|
57
|
+
showQuickJumper: {
|
|
58
|
+
type: PropType<boolean | {
|
|
59
|
+
goButton?: any;
|
|
60
|
+
}>;
|
|
61
|
+
default: boolean | {
|
|
62
|
+
goButton?: any;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
showTotal: {
|
|
66
|
+
type: PropType<(total: number, range: [number, number]) => any>;
|
|
67
|
+
default: (total: number, range: [number, number]) => any;
|
|
68
|
+
};
|
|
69
|
+
size: {
|
|
70
|
+
type: PropType<"default" | "small">;
|
|
71
|
+
default: "default" | "small";
|
|
72
|
+
};
|
|
73
|
+
simple: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
locale: ObjectConstructor;
|
|
78
|
+
prefixCls: StringConstructor;
|
|
79
|
+
selectPrefixCls: StringConstructor;
|
|
80
|
+
totalBoundaryShowSizeChanger: NumberConstructor;
|
|
81
|
+
selectComponentClass: StringConstructor;
|
|
82
|
+
itemRender: {
|
|
83
|
+
type: PropType<(opt: {
|
|
84
|
+
page: number;
|
|
85
|
+
type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
|
|
86
|
+
originalElement: any;
|
|
87
|
+
}) => any>;
|
|
88
|
+
default: (opt: {
|
|
89
|
+
page: number;
|
|
90
|
+
type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
|
|
91
|
+
originalElement: any;
|
|
92
|
+
}) => any;
|
|
93
|
+
};
|
|
94
|
+
role: StringConstructor;
|
|
95
|
+
responsive: BooleanConstructor;
|
|
96
|
+
showLessItems: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
100
|
+
onChange: {
|
|
101
|
+
type: PropType<(page: number, pageSize: number) => void>;
|
|
102
|
+
default: (page: number, pageSize: number) => void;
|
|
103
|
+
};
|
|
104
|
+
onShowSizeChange: {
|
|
105
|
+
type: PropType<(current: number, size: number) => void>;
|
|
106
|
+
default: (current: number, size: number) => void;
|
|
107
|
+
};
|
|
108
|
+
'onUpdate:current': {
|
|
109
|
+
type: PropType<(current: number) => void>;
|
|
110
|
+
default: (current: number) => void;
|
|
111
|
+
};
|
|
112
|
+
'onUpdate:pageSize': {
|
|
113
|
+
type: PropType<(size: number) => void>;
|
|
114
|
+
default: (size: number) => void;
|
|
115
|
+
};
|
|
116
|
+
}>>;
|
|
117
|
+
grid: ListGridType;
|
|
118
|
+
titleField: string;
|
|
119
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
120
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
121
|
+
export default _default;
|
|
122
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
123
|
+
new (): {
|
|
124
|
+
$slots: S;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GridControl } from '../../../index';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & {
|
|
5
|
+
record: Record<string, any>;
|
|
6
|
+
gridCtrl: GridControl<T>;
|
|
7
|
+
} & Partial<{}>> & PublicProps;
|
|
8
|
+
expose(exposed: ShallowUnwrapRef<{}>): void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => VNode & {
|
|
13
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_PrettifyLocal<T> = {
|
|
17
|
+
[K in keyof T]: T[K];
|
|
18
|
+
} & {};
|
|
@@ -7,6 +7,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
7
7
|
type: PropType<OptionItemProps[]>;
|
|
8
8
|
required: true;
|
|
9
9
|
};
|
|
10
|
+
size: {
|
|
11
|
+
type: PropType<"small" | "default" | undefined>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
10
14
|
url: {
|
|
11
15
|
type: PropType< IUrlInfo>;
|
|
12
16
|
required: boolean;
|
|
@@ -42,6 +46,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
42
46
|
type: PropType<OptionItemProps[]>;
|
|
43
47
|
required: true;
|
|
44
48
|
};
|
|
49
|
+
size: {
|
|
50
|
+
type: PropType<"small" | "default" | undefined>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
45
53
|
url: {
|
|
46
54
|
type: PropType< IUrlInfo>;
|
|
47
55
|
required: boolean;
|
|
@@ -72,5 +80,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
72
80
|
};
|
|
73
81
|
}>> & Readonly<{
|
|
74
82
|
onChange?: ((checked: string | number | boolean) => any) | undefined;
|
|
75
|
-
}>, {
|
|
83
|
+
}>, {
|
|
84
|
+
size: "small" | "default" | undefined;
|
|
85
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
76
86
|
export default _default;
|