@skyfox2000/webui 1.2.9 → 1.2.10

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.
Files changed (120) hide show
  1. package/package.json +1 -1
  2. package/src/stores/userInfo.ts +28 -2
  3. package/lib/AceEditor.d.ts +0 -1
  4. package/lib/BasicLayout.d.ts +0 -1
  5. package/lib/Error403.d.ts +0 -1
  6. package/lib/Error404.d.ts +0 -1
  7. package/lib/ExcelForm.d.ts +0 -1
  8. package/lib/UploadForm.d.ts +0 -1
  9. package/lib/assets/modules/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  10. package/lib/assets/modules/file-upload-BYIvmkmy.js +0 -204
  11. package/lib/assets/modules/form-excel-BUX2QW11.js +0 -235
  12. package/lib/assets/modules/index-DcRkhkn2.js +0 -109
  13. package/lib/assets/modules/index-jl5Ie2tZ.js +0 -112
  14. package/lib/assets/modules/menuTabs-DY1XBq16.js +0 -671
  15. package/lib/assets/modules/toolIcon-BDIOj_3l.js +0 -50
  16. package/lib/assets/modules/uploadList-BPG5whz7.js +0 -369
  17. package/lib/assets/modules/uploadList-D2Ux4h1N.js +0 -2253
  18. package/lib/components/common/button/index.vue.d.ts +0 -41
  19. package/lib/components/common/icon/appicon.vue.d.ts +0 -11
  20. package/lib/components/common/icon/fullscreen.vue.d.ts +0 -3
  21. package/lib/components/common/icon/helper.vue.d.ts +0 -22
  22. package/lib/components/common/icon/index.vue.d.ts +0 -243
  23. package/lib/components/common/icon/layoutIcon.vue.d.ts +0 -43
  24. package/lib/components/common/icon/projectIcon.vue.d.ts +0 -59
  25. package/lib/components/common/icon/toolIcon.vue.d.ts +0 -43
  26. package/lib/components/common/index.d.ts +0 -20
  27. package/lib/components/common/loading/index.vue.d.ts +0 -3
  28. package/lib/components/common/tooltip/index.vue.d.ts +0 -21
  29. package/lib/components/content/dialog/index.vue.d.ts +0 -35
  30. package/lib/components/content/drawer/index.vue.d.ts +0 -28
  31. package/lib/components/content/form/formItem.vue.d.ts +0 -27
  32. package/lib/components/content/form/index.vue.d.ts +0 -25
  33. package/lib/components/content/index.d.ts +0 -22
  34. package/lib/components/content/search/index.vue.d.ts +0 -30
  35. package/lib/components/content/search/searchItem.vue.d.ts +0 -23
  36. package/lib/components/content/table/index.vue.d.ts +0 -36
  37. package/lib/components/content/table/tableOperate.vue.d.ts +0 -18
  38. package/lib/components/content/toolbar/icontool.vue.d.ts +0 -7
  39. package/lib/components/content/toolbar/index.vue.d.ts +0 -18
  40. package/lib/components/content/tree/index.vue.d.ts +0 -46
  41. package/lib/components/form/aceEditor/aceConfig.d.ts +0 -8
  42. package/lib/components/form/autoComplete/index.vue.d.ts +0 -176
  43. package/lib/components/form/cascader/index.vue.d.ts +0 -120
  44. package/lib/components/form/checkbox/index.vue.d.ts +0 -139
  45. package/lib/components/form/datePicker/index.vue.d.ts +0 -6
  46. package/lib/components/form/index.d.ts +0 -39
  47. package/lib/components/form/input/index.vue.d.ts +0 -26
  48. package/lib/components/form/input/inputIcon.vue.d.ts +0 -10
  49. package/lib/components/form/input/inputNumber.vue.d.ts +0 -3
  50. package/lib/components/form/input/inputPassword.vue.d.ts +0 -3
  51. package/lib/components/form/propEditor/index.vue.d.ts +0 -21
  52. package/lib/components/form/radio/index.vue.d.ts +0 -144
  53. package/lib/components/form/radio/radioStatus.vue.d.ts +0 -31
  54. package/lib/components/form/rangePicker/index.vue.d.ts +0 -16
  55. package/lib/components/form/select/index.vue.d.ts +0 -153
  56. package/lib/components/form/switch/index.vue.d.ts +0 -43
  57. package/lib/components/form/textarea/index.vue.d.ts +0 -3
  58. package/lib/components/form/transfer/index.vue.d.ts +0 -38
  59. package/lib/components/form/transfer/transferTable.vue.d.ts +0 -38
  60. package/lib/components/form/treeSelect/index.vue.d.ts +0 -38
  61. package/lib/components/form/upload/uploadList.vue.d.ts +0 -487
  62. package/lib/components/index.d.ts +0 -4
  63. package/lib/components/layout/breadcrumb/index.vue.d.ts +0 -3
  64. package/lib/components/layout/content/index.vue.d.ts +0 -22
  65. package/lib/components/layout/datetime/index.vue.d.ts +0 -3
  66. package/lib/components/layout/header/headerExits.vue.d.ts +0 -3
  67. package/lib/components/layout/header/index.vue.d.ts +0 -3
  68. package/lib/components/layout/header/user.vue.d.ts +0 -3
  69. package/lib/components/layout/index.d.ts +0 -14
  70. package/lib/components/layout/menu/index.vue.d.ts +0 -6
  71. package/lib/components/layout/menu/menuTabs.vue.d.ts +0 -3
  72. package/lib/const/options.d.ts +0 -32
  73. package/lib/directives/enter-submit.d.ts +0 -4
  74. package/lib/directives/index.d.ts +0 -2
  75. package/lib/directives/permission.d.ts +0 -5
  76. package/lib/es/AceEditor/index.js +0 -167
  77. package/lib/es/BasicLayout/index.js +0 -101
  78. package/lib/es/Error403/index.js +0 -39
  79. package/lib/es/Error404/index.js +0 -39
  80. package/lib/es/ExcelForm/index.js +0 -321
  81. package/lib/es/UploadForm/index.js +0 -110
  82. package/lib/index.d.ts +0 -45
  83. package/lib/router/index.d.ts +0 -15
  84. package/lib/stores/appInfo.d.ts +0 -31
  85. package/lib/stores/hostInfo.d.ts +0 -9
  86. package/lib/stores/pageInfo.d.ts +0 -18
  87. package/lib/stores/pinia.d.ts +0 -3
  88. package/lib/stores/settingInfo.d.ts +0 -8
  89. package/lib/stores/userInfo.d.ts +0 -24
  90. package/lib/typings/data.d.ts +0 -80
  91. package/lib/typings/form.d.ts +0 -187
  92. package/lib/typings/menu.d.ts +0 -7
  93. package/lib/typings/option.d.ts +0 -189
  94. package/lib/typings/page.d.ts +0 -70
  95. package/lib/typings/table.d.ts +0 -181
  96. package/lib/typings/tools.d.ts +0 -130
  97. package/lib/typings/tree.d.ts +0 -72
  98. package/lib/typings/upload.d.ts +0 -161
  99. package/lib/typings/urls.d.ts +0 -69
  100. package/lib/utils/cache.d.ts +0 -23
  101. package/lib/utils/data.d.ts +0 -6
  102. package/lib/utils/download.d.ts +0 -4
  103. package/lib/utils/eventbus.d.ts +0 -16
  104. package/lib/utils/export-table.d.ts +0 -12
  105. package/lib/utils/file-upload.d.ts +0 -17
  106. package/lib/utils/form-excel.d.ts +0 -33
  107. package/lib/utils/form-validate.d.ts +0 -29
  108. package/lib/utils/form.d.ts +0 -9
  109. package/lib/utils/icon-loader.d.ts +0 -125
  110. package/lib/utils/isEmpty.d.ts +0 -1
  111. package/lib/utils/main-openapis.d.ts +0 -8
  112. package/lib/utils/menu.d.ts +0 -6
  113. package/lib/utils/options.d.ts +0 -10
  114. package/lib/utils/page.d.ts +0 -25
  115. package/lib/utils/table.d.ts +0 -21
  116. package/lib/utils/tools.d.ts +0 -18
  117. package/lib/utils/tree.d.ts +0 -3
  118. package/lib/vite-env.d.ts +0 -8
  119. package/lib/webui.css +0 -1
  120. package/lib/webui.es.js +0 -2262
@@ -1,369 +0,0 @@
1
- import { defineComponent as K, ref as z, onMounted as X, onUnmounted as Y, createBlock as R, createCommentVNode as g, openBlock as f, unref as a, mergeProps as D, computed as j, watch as L, resolveDirective as Z, createElementBlock as x, normalizeClass as O, createElementVNode as p, withDirectives as y, withCtx as C, createVNode as m, createTextVNode as E, toDisplayString as $, Fragment as ee, renderList as te } from "vue";
2
- import { _ as oe } from "./index-DcRkhkn2.js";
3
- import { a as B, _ as V } from "./toolIcon-BDIOj_3l.js";
4
- import { httpPost as ae, ResStatus as ne } from "@skyfox2000/fapi";
5
- import { p as I, s as se, t as le, w as re } from "./uploadList-D2Ux4h1N.js";
6
- import { p as M, U as s } from "./file-upload-BYIvmkmy.js";
7
- import { combineParams as ie } from "@skyfox2000/microbase";
8
- import k from "vue-m-message";
9
- import "async-validator";
10
- import "dayjs";
11
- import { Switch as ce, Upload as ue, Tag as de, Popconfirm as pe, Progress as me } from "ant-design-vue";
12
- import "vue-draggable-next";
13
- import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const he = (u, _) => {
15
- const e = document.createElement("a"), i = URL.createObjectURL(u);
16
- e.href = i, e.download = _, e.style.display = "none", document.body.appendChild(e), e.click(), URL.revokeObjectURL(i), document.body.removeChild(e);
17
- }, ve = (u, _, e) => {
18
- try {
19
- e && (u.api || (u.api = e.api), u.authorize === void 0 && (u.authorize = e.authorize));
20
- const i = ie(u.params, _);
21
- return ae(u, i).then((d) => {
22
- if ((d == null ? void 0 : d.status) === ne.SUCCESS && d.data) {
23
- const r = d.data, v = r.Content, b = r.Key.split("/").pop(), c = atob(v), S = [];
24
- for (let U = 0; U < c.length; U++)
25
- S.push(c.charCodeAt(U));
26
- const w = new Blob([new Uint8Array(S)], {
27
- type: r.Type
28
- });
29
- he(w, b);
30
- } else
31
- k.error("下载文件失败!");
32
- });
33
- } catch (i) {
34
- console.error("下载失败:", i), k.error("文件下载失败,请稍后重试");
35
- }
36
- }, xe = /* @__PURE__ */ K({
37
- __name: "index",
38
- props: {
39
- /**
40
- * 选择项数据
41
- */
42
- data: {
43
- type: Array,
44
- required: !0
45
- }
46
- },
47
- emits: ["change"],
48
- setup(u, { emit: _ }) {
49
- const e = u, i = z([]), d = _, { editorCtrl: r, errInfo: v } = I(), b = (c) => {
50
- v != null && v.value.errClass && r && re(r), d("change", c);
51
- };
52
- return X(() => {
53
- if (!e.data || e.data.length != 2) {
54
- console.error("Switch组件: ", e.data), k.error("Switch组件必须有且只有两个选项");
55
- return;
56
- }
57
- se(!1, e, i);
58
- }), Y(() => {
59
- le(e);
60
- }), (c, S) => {
61
- var w;
62
- return i.value.length === 2 ? (f(), R(a(ce), D({
63
- key: 0,
64
- class: [
65
- ((w = a(v)) == null ? void 0 : w.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
66
- "bg-blue-300",
67
- "w-[58px]"
68
- ],
69
- checkedChildren: i.value[0].label,
70
- checkedValue: i.value[0].value,
71
- unCheckedChildren: i.value[1].label,
72
- unCheckedValue: i.value[1].value,
73
- onChange: b
74
- }, c.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : g("", !0);
75
- };
76
- }
77
- }), _e = { class: "flex items-center justify-between w-full" }, Ce = { class: "w-35 mx-3" }, we = { class: "mt-4 px-3" }, ye = { class: "flex items-center justify-between" }, ge = { class: "flex items-center" }, ke = { class: "flex items-center" }, be = {
78
- key: 0,
79
- class: "mr-2"
80
- }, Se = {
81
- key: 1,
82
- class: "flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
83
- }, Ue = ["onClick"], Fe = { class: "flex items-center text-red-500 hover:text-red-700 cursor-pointer" }, Oe = ["onClick"], Ee = {
84
- key: 0,
85
- class: "text-sm text-nowrap"
86
- }, ze = { key: 0 }, Le = /* @__PURE__ */ K({
87
- __name: "uploadList",
88
- props: {
89
- autoUpload: { type: Boolean, default: !1 },
90
- uploadUrl: {},
91
- downloadUrl: {},
92
- fileList: { default: () => [] },
93
- placeholder: { default: "" },
94
- fileExt: {},
95
- maxFileSize: { default: 20 },
96
- maxCount: { default: 5 },
97
- maxCountTip: { type: Boolean, default: !1 },
98
- maxFileSizeTip: { type: Boolean, default: !0 },
99
- fileExtTip: { type: Boolean, default: !0 },
100
- parentPath: {},
101
- showActionText: { type: Boolean, default: !0 },
102
- showOnlineSwitch: { type: Boolean, default: !1 }
103
- },
104
- emits: ["update:file-list"],
105
- setup(u, { emit: _ }) {
106
- const e = u, i = I(), { errInfo: d } = i, r = z(e.fileList), v = z(), b = _, c = z(!1), S = j(() => {
107
- var t;
108
- return (t = e.fileExt) != null && t.length ? e.fileExt.map((o) => `.${o}`).join(",") : "";
109
- }), w = (t) => {
110
- var o;
111
- if (e.fileExt && e.fileExt.length > 0) {
112
- const n = ((o = t.name.split(".").pop()) == null ? void 0 : o.toLowerCase()) || "";
113
- if (!e.fileExt.includes(n))
114
- return k.error("文件类型不支持"), !1;
115
- }
116
- return t.size / 1024 / 1024 > e.maxFileSize ? (k.error(`文件大小超过 ${e.maxFileSize}MB 限制`), !1) : e.maxCount > 1 && r.value.length >= e.maxCount ? (k.error(`最多上传 ${e.maxCount} 个文件`), !1) : (c.value = !1, e.autoUpload);
117
- }, U = (t) => {
118
- t.forEach((o) => {
119
- const n = o;
120
- n.fileName || (n.fileName = n.name), e.parentPath && (n.name = M.join("/", e.parentPath, n.fileName)), n.params || (n.params = {}), n.params.FileKey = n.name, n.status = s.Pending;
121
- });
122
- }, q = j(() => ({
123
- accept: S.value,
124
- multiple: !0,
125
- fileList: r.value,
126
- "onUpdate:fileList": U,
127
- beforeUpload: w,
128
- listType: "text",
129
- maxCount: e.maxCount,
130
- showUploadList: !1,
131
- onChange: (t) => {
132
- e.autoUpload || (r.value = t.fileList);
133
- }
134
- }));
135
- L(
136
- () => e.fileList,
137
- (t) => {
138
- r.value = t;
139
- },
140
- { deep: !0, immediate: !0 }
141
- ), L(
142
- () => r.value,
143
- (t) => {
144
- b("update:file-list", t);
145
- },
146
- { deep: !0 }
147
- ), L(
148
- () => e.parentPath,
149
- (t) => {
150
- t && r.value.forEach((o) => {
151
- o.params.FileKey = M.join("/", t, o.fileName);
152
- });
153
- }
154
- );
155
- const P = (t) => {
156
- if (!e.downloadUrl) return;
157
- const o = r.value[t].minioFile, n = {
158
- api: e.downloadUrl.api,
159
- authorize: e.downloadUrl.authorize,
160
- url: e.downloadUrl.url,
161
- params: {
162
- Query: {
163
- FileKey: o.Key
164
- }
165
- }
166
- };
167
- ve(n);
168
- }, Q = (t) => {
169
- t.minioFile && (t.minioFile.Status = t.status);
170
- }, T = (t) => {
171
- r.value.splice(t, 1), c.value = !1;
172
- }, G = (t, o) => {
173
- if (o === s.Pending) {
174
- T(t);
175
- return;
176
- }
177
- c.value = !0;
178
- }, H = () => {
179
- const t = e.fileExt && e.fileExt.length && e.fileExtTip ? `文件必须为 ${e.fileExt.join("/")}` : "", o = e.maxFileSize !== 0 && e.maxFileSizeTip ? `单文件最大 ${e.maxFileSize}MB` : "", n = e.maxCount !== 0 && e.maxCountTip ? `最多 ${e.maxCount} 个文件` : "";
180
- return [o, t, n].filter(Boolean).join(",");
181
- }, J = (t) => {
182
- switch (t) {
183
- case s.Uploading:
184
- return "blue";
185
- case s.Success:
186
- return "green";
187
- case s.Error:
188
- return "red";
189
- case s.Online:
190
- return "green";
191
- case s.Offline:
192
- return "pink";
193
- default:
194
- return "cyan";
195
- }
196
- }, W = (t) => {
197
- switch (t) {
198
- case s.Uploading:
199
- return "上传中";
200
- case s.Success:
201
- return "上传完成";
202
- case s.Error:
203
- return "上传失败";
204
- case s.Online:
205
- return "在线";
206
- case s.Offline:
207
- return "已下线";
208
- default:
209
- return "待上传";
210
- }
211
- };
212
- return (t, o) => {
213
- var A, N;
214
- const n = Z("auth");
215
- return f(), x("div", {
216
- class: O(["w-full border border-solid border-gray-100 mt-1 rounded-md py-5", [(A = a(d)) == null ? void 0 : A.errClass]])
217
- }, [
218
- p("div", _e, [
219
- p("div", Ce, [
220
- y((f(), R(a(ue), D({
221
- ref_key: "fileUploader",
222
- ref: v
223
- }, q.value), {
224
- default: C(() => {
225
- var l;
226
- return [
227
- m(a(oe), {
228
- class: O([((l = a(d)) == null ? void 0 : l.errClass) + "-text"])
229
- }, {
230
- default: C(() => o[2] || (o[2] = [
231
- E("选择文件")
232
- ])),
233
- _: 1,
234
- __: [2]
235
- }, 8, ["class"])
236
- ];
237
- }),
238
- _: 1
239
- }, 16)), [
240
- [n, { role: ["Super", "Admin"], permit: ":uploadlist:upload" }]
241
- ])
242
- ]),
243
- p("div", {
244
- class: O(["flex-1 text-sm text-gray-500", [((N = a(d)) == null ? void 0 : N.errClass) + "-text"]])
245
- }, $(H()), 3)
246
- ]),
247
- p("div", we, [
248
- (f(!0), x(ee, null, te(r.value, (l, F) => (f(), x("div", {
249
- key: F,
250
- class: "mb-2 pb-1"
251
- }, [
252
- p("div", ye, [
253
- p("div", ge, [
254
- p("span", {
255
- class: O(["text-gray-700 mr-2", [l.status == a(s).Offline ? "line-through" : ""]])
256
- }, $(l.fileName ?? l.name), 3),
257
- p("span", null, [
258
- m(a(de), {
259
- color: J(l.status)
260
- }, {
261
- default: C(() => [
262
- E($(W(l.status)), 1)
263
- ]),
264
- _: 2
265
- }, 1032, ["color"])
266
- ])
267
- ]),
268
- p("div", ke, [
269
- t.showOnlineSwitch && (l.status == a(s).Online || l.status == a(s).Offline) ? (f(), x("div", be, [
270
- m(a(B), { title: "上线或下线" }, {
271
- default: C(() => [
272
- y(m(a(xe), {
273
- checked: l.status,
274
- "onUpdate:checked": (h) => l.status = h,
275
- data: [
276
- { label: "上线", value: a(s).Online },
277
- { label: "下线", value: a(s).Offline }
278
- ],
279
- onChange: (h) => Q(l)
280
- }, null, 8, ["checked", "onUpdate:checked", "data", "onChange"]), [
281
- [n, { role: ["Super", "Admin"], permit: ":uploadlist:online" }]
282
- ])
283
- ]),
284
- _: 2
285
- }, 1024)
286
- ])) : g("", !0),
287
- t.downloadUrl && (l.status == a(s).Online || l.status == a(s).Offline) ? (f(), x("div", Se, [
288
- m(a(B), { title: "下载" }, {
289
- default: C(() => [
290
- y(m(a(V), {
291
- icon: "icon-download",
292
- clickable: "",
293
- onClick: (h) => P(F)
294
- }, null, 8, ["onClick"]), [
295
- [n, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
296
- ]),
297
- t.showActionText ? y((f(), x("span", {
298
- key: 0,
299
- class: "mr-2 text-sm text-nowrap",
300
- onClick: (h) => P(F)
301
- }, o[3] || (o[3] = [
302
- E("下载")
303
- ]), 8, Ue)), [
304
- [n, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
305
- ]) : g("", !0)
306
- ]),
307
- _: 2
308
- }, 1024)
309
- ])) : g("", !0),
310
- p("div", Fe, [
311
- m(a(pe), {
312
- open: c.value,
313
- "onUpdate:open": o[0] || (o[0] = (h) => c.value = h),
314
- cancelText: "否",
315
- okText: "是",
316
- title: "确定删除该文件吗?",
317
- okButtonProps: { size: "small" },
318
- cancelButtonProps: { size: "small" },
319
- onConfirm: (h) => T(F),
320
- onCancel: o[1] || (o[1] = (h) => c.value = !1)
321
- }, {
322
- default: C(() => [
323
- m(a(B), { title: "删除" }, {
324
- default: C(() => [
325
- p("div", {
326
- onClick: (h) => G(F, l.status)
327
- }, [
328
- y(m(a(V), {
329
- icon: "icon-new",
330
- angle: 45,
331
- clickable: ""
332
- }, null, 512), [
333
- [n, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
334
- ]),
335
- t.showActionText ? y((f(), x("span", Ee, o[4] || (o[4] = [
336
- E("删除")
337
- ]))), [
338
- [n, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
339
- ]) : g("", !0)
340
- ], 8, Oe)
341
- ]),
342
- _: 2
343
- }, 1024)
344
- ]),
345
- _: 2
346
- }, 1032, ["open", "onConfirm"])
347
- ])
348
- ])
349
- ]),
350
- l.status !== a(s).Online && l.status !== a(s).Offline && l.status !== a(s).Success ? (f(), x("div", ze, [
351
- m(a(me), {
352
- percent: l.percent,
353
- "stroke-width": 2,
354
- "show-info": !1,
355
- style: { height: "2px" }
356
- }, null, 8, ["percent"])
357
- ])) : g("", !0)
358
- ]))), 128))
359
- ])
360
- ], 2);
361
- };
362
- }
363
- }), qe = /* @__PURE__ */ fe(Le, [["__scopeId", "data-v-78bfcd29"]]);
364
- export {
365
- qe as U,
366
- xe as _,
367
- ve as a,
368
- he as d
369
- };