@skyfox2000/webui 0.1.0 → 0.1.1

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.
@@ -7,6 +7,7 @@ import "./index-ekkaExvB.js";
7
7
  import "./uploadForm-BahGnrAq.js";
8
8
  import u from "vue-m-message";
9
9
  import "@vue-office/excel";
10
+ import "vue-draggable-next";
10
11
  import "@skyfox2000/microbase";
11
12
  import "dayjs";
12
13
  const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md py-5" }, ee = { class: "flex items-center justify-between w-full" }, te = { class: "w-35 mx-3" }, oe = { class: "flex-1 text-sm text-gray-500" }, ae = { class: "mt-4 px-3" }, le = { class: "flex items-center justify-between" }, re = { class: "flex items-center" }, se = { class: "flex items-center" }, ne = ["onClick"], ie = ["onClick"], ue = ["onClick"], de = /* @__PURE__ */ M({
@@ -26,7 +27,7 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
26
27
  const t = F, o = C(t.fileList), g = C(), S = E, k = N(() => {
27
28
  var e;
28
29
  return (e = t.fileExt) != null && e.length ? t.fileExt.map((a) => `.${a}`).join(",") : "";
29
- }), p = (e) => {
30
+ }), f = (e) => {
30
31
  var a;
31
32
  if (t.fileExt && t.fileExt.length > 0) {
32
33
  const l = ((a = e.name.split(".").pop()) == null ? void 0 : a.toLowerCase()) || "";
@@ -43,7 +44,7 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
43
44
  multiple: !0,
44
45
  fileList: o.value,
45
46
  "onUpdate:fileList": x,
46
- beforeUpload: p,
47
+ beforeUpload: f,
47
48
  listType: "text",
48
49
  maxCount: t.maxCount,
49
50
  showUploadList: !1,
@@ -58,7 +59,7 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
58
59
  },
59
60
  { deep: !0 }
60
61
  );
61
- const f = (e) => {
62
+ const p = (e) => {
62
63
  const a = o.value[e].minioFile, l = {
63
64
  api: t.downloadUrl.api,
64
65
  authorize: t.downloadUrl.authorize,
@@ -160,7 +161,7 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
160
161
  l.status == s(r).Offline || l.status == s(r).Online ? (h(), w("span", {
161
162
  key: 1,
162
163
  class: "text-blue-500 hover:text-blue-700 mr-4 cursor-pointer",
163
- onClick: ($) => f(z)
164
+ onClick: ($) => p(z)
164
165
  }, "下载", 8, ie)) : B("", !0),
165
166
  d("span", {
166
167
  class: "text-red-500 hover:text-red-700 cursor-pointer",
@@ -180,7 +181,7 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
180
181
  ])
181
182
  ]));
182
183
  }
183
- }), Ue = /* @__PURE__ */ M({
184
+ }), ye = /* @__PURE__ */ M({
184
185
  __name: "uploadForm",
185
186
  props: {
186
187
  mode: {},
@@ -195,29 +196,29 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
195
196
  },
196
197
  emits: ["before:file-list", "before:upload", "after:upload"],
197
198
  setup(F, { emit: E }) {
198
- const t = F, o = t.uploadForm, g = C(!1), S = t.maxCount ?? 1, k = t.maxConcurrent ?? 3, p = C([]), x = E;
199
+ const t = F, o = t.uploadForm, g = C(!1), S = t.maxCount ?? 1, k = t.maxConcurrent ?? 3, f = C([]), x = E;
199
200
  D(
200
201
  () => o.visible.value,
201
202
  () => {
202
203
  g.value = o.visible.value;
203
204
  }
204
205
  );
205
- const c = C(t.uploadUrl), f = C(t.downloadUrl), O = async () => {
206
+ const c = C(t.uploadUrl), p = C(t.downloadUrl), O = async () => {
206
207
  const n = c.value;
207
208
  if (!n) {
208
209
  u.error("未配置文件上传地址!");
209
210
  return;
210
211
  }
211
- x("before:upload", p.value);
212
+ x("before:upload", f.value);
212
213
  const i = new X(n, k);
213
214
  o.isFormLoading.value = !0;
214
215
  try {
215
- if (p.value.length === 0) {
216
+ if (f.value.length === 0) {
216
217
  u.warning("请选择上传的文件!");
217
218
  return;
218
219
  }
219
220
  await i.uploadFiles(
220
- p.value,
221
+ f.value,
221
222
  (e) => {
222
223
  },
223
224
  (e) => {
@@ -229,7 +230,7 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
229
230
  }
230
231
  );
231
232
  } catch (e) {
232
- o.isFormLoading.value = !1, console.error("上传错误:", e), u.error("上传错误,请稍后再试!"), x("after:upload", p.value);
233
+ o.isFormLoading.value = !1, console.error("上传错误:", e), u.error("上传错误,请稍后再试!"), x("after:upload", f.value);
233
234
  }
234
235
  }, _ = async () => {
235
236
  switch (t.mode) {
@@ -240,19 +241,19 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
240
241
  };
241
242
  T(() => {
242
243
  const n = t.gridCtrl.page;
243
- if (c.value = c.value ?? n.urls.upload, f.value = f.value ?? n.urls.download, !c.value) {
244
+ if (c.value = c.value ?? n.urls.upload, p.value = p.value ?? n.urls.download, !c.value) {
244
245
  u.error("未配置文件上传地址!");
245
246
  return;
246
247
  }
247
- if (c.value.api || (c.value.api = n.api), c.value.authorize === void 0 && (c.value.authorize = n.authorize), !f.value) {
248
+ if (c.value.api || (c.value.api = n.api), c.value.authorize === void 0 && (c.value.authorize = n.authorize), !p.value) {
248
249
  u.error("未配置文件下载地址!");
249
250
  return;
250
251
  }
251
- f.value.api || (f.value.api = n.api), f.value.authorize === void 0 && (f.value.authorize = n.authorize);
252
+ p.value.api || (p.value.api = n.api), p.value.authorize === void 0 && (p.value.authorize = n.authorize);
252
253
  for (const e in o.formData.value)
253
254
  t.gridCtrl.rowData.value && (o.formData.value[e] = t.gridCtrl.rowData.value[e]);
254
255
  const i = [];
255
- x("before:file-list", o, i), p.value.push(...i), g.value = o.visible.value;
256
+ x("before:file-list", o, i), f.value.push(...i), g.value = o.visible.value;
256
257
  });
257
258
  const U = () => {
258
259
  o.visible.value = !1;
@@ -291,9 +292,9 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
291
292
  ]),
292
293
  default: m(() => [
293
294
  v(s(de), {
294
- "file-list": p.value,
295
- "onUpdate:fileList": i[0] || (i[0] = (e) => p.value = e),
296
- "download-url": f.value,
295
+ "file-list": f.value,
296
+ "onUpdate:fileList": i[0] || (i[0] = (e) => f.value = e),
297
+ "download-url": p.value,
297
298
  "max-count": s(S),
298
299
  "file-ext": n.fileExt
299
300
  }, null, 8, ["file-list", "download-url", "max-count", "file-ext"])
@@ -303,6 +304,6 @@ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md p
303
304
  }
304
305
  });
305
306
  export {
306
- Ue as _,
307
+ ye as _,
307
308
  de as a
308
309
  };
@@ -9,6 +9,7 @@ import "dayjs";
9
9
  import "vue-m-message";
10
10
  import "@vue-office/excel";
11
11
  import "../../assets/modules/excelForm-Dzndz-SG.js";
12
+ import "vue-draggable-next";
12
13
  import "@skyfox2000/microbase";
13
14
  const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
14
15
  const o = document.createElement("script");
@@ -44,7 +45,7 @@ const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
44
45
  }, T = { class: "w-full overflow-hidden rounded-md border-1 border-solid border-gray-300" }, G = { class: "w-full h-[30px] bg-[#ccc] relative flex items-center justify-between px-2" }, H = { class: "flex-1 overflow-hidden" }, I = {
45
46
  key: 1,
46
47
  class: "h-[500px] w-[99.3%] flex justify-center items-center border-1 border-solid border-gray-200"
47
- }, $ = "github", ce = /* @__PURE__ */ F({
48
+ }, $ = "github", ue = /* @__PURE__ */ F({
48
49
  __name: "index",
49
50
  props: {
50
51
  value: {},
@@ -164,5 +165,5 @@ const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
164
165
  }
165
166
  });
166
167
  export {
167
- ce as default
168
+ ue as default
168
169
  };
@@ -1,4 +1,4 @@
1
- import { _ as m } from "../../assets/modules/uploadForm-DEnOjhwc.js";
1
+ import { _ as m } from "../../assets/modules/uploadForm-CwXiG05t.js";
2
2
  import "../../assets/modules/uploadForm-BahGnrAq.js";
3
3
  export {
4
4
  m as default