@lingshugroup/web-plus 1.7.0 → 1.7.2

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 (71) hide show
  1. package/lib/hooks/index.cjs +1 -1
  2. package/lib/hooks/index.js +6 -8
  3. package/lib/index.css +1 -1
  4. package/lib/index.css.br +0 -0
  5. package/lib/index.css.gz +0 -0
  6. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.cjs +1 -1
  7. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js +37 -32
  8. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.br +0 -0
  9. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.gz +0 -0
  10. package/lib/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
  11. package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
  12. package/lib/packages/ls-components/components/button/Button.vue/index2.cjs +1 -1
  13. package/lib/packages/ls-components/components/button/Button.vue/index2.js +14 -14
  14. package/lib/packages/ls-components/components/button/Button.vue/index2.js.br +0 -0
  15. package/lib/packages/ls-components/components/button/Button.vue/index2.js.gz +0 -0
  16. package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.cjs +1 -1
  17. package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.js +2 -2
  18. package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
  19. package/lib/packages/ls-components/components/dialog/Index.vue/index.js +3 -5
  20. package/lib/packages/ls-components/components/dialog/Index.vue/index.js.br +0 -0
  21. package/lib/packages/ls-components/components/dialog/Index.vue/index.js.gz +0 -0
  22. package/lib/packages/ls-components/components/editor/Index.vue/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/editor/Index.vue/index.js +2 -2
  24. package/lib/packages/ls-components/components/editor/Index.vue/index2.cjs +1 -1
  25. package/lib/packages/ls-components/components/editor/Index.vue/index2.js +75 -58
  26. package/lib/packages/ls-components/components/editor/Index.vue/index2.js.br +0 -0
  27. package/lib/packages/ls-components/components/editor/Index.vue/index2.js.gz +0 -0
  28. package/lib/packages/ls-components/components/editor/types/index.cjs +1 -1
  29. package/lib/packages/ls-components/components/editor/types/index.js +19 -4
  30. package/lib/packages/ls-components/components/editor/types/index.js.br +0 -0
  31. package/lib/packages/ls-components/components/editor/types/index.js.gz +0 -0
  32. package/lib/packages/ls-components/components/menu/Index.vue/index.cjs +1 -1
  33. package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
  34. package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
  35. package/lib/packages/ls-components/components/menu/Index.vue/index2.js +37 -35
  36. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
  37. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.gz +0 -0
  38. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.cjs +1 -1
  39. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js +10 -10
  40. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.br +0 -0
  41. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.gz +0 -0
  42. package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
  43. package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +1 -1
  44. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
  45. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +3 -3
  46. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
  47. package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
  48. package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
  49. package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
  50. package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
  51. package/lib/packages/ls-components/components/upload/Index.vue/index2.js +172 -162
  52. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
  53. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
  54. package/lib/types/components/_hooks/index.d.ts +1 -2
  55. package/lib/types/components/_hooks/useOptionHook.d.ts +3 -3
  56. package/lib/types/components/dialog/Index.vue.d.ts +1 -1
  57. package/lib/types/components/editor/Index.vue.d.ts +9 -0
  58. package/lib/types/components/editor/index.d.ts +18 -0
  59. package/lib/types/components/editor/types.d.ts +3 -0
  60. package/lib/types/components/form/FormItem.vue.d.ts +23 -23
  61. package/lib/types/components/form/index.d.ts +23 -23
  62. package/lib/types/components/form/types.d.ts +1 -1
  63. package/lib/types/components/menu/types.d.ts +1 -1
  64. package/lib/types/components/upload/types.d.ts +1 -0
  65. package/package.json +1 -1
  66. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.cjs +0 -1
  67. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js +0 -222
  68. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.br +0 -0
  69. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.gz +0 -0
  70. package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.cjs +0 -1
  71. package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.js +0 -23
@@ -1,35 +1,35 @@
1
- var Me = Object.defineProperty;
2
- var u = (q, O) => Me(q, "name", { value: O, configurable: !0 });
1
+ var Re = Object.defineProperty;
2
+ var u = (O, j) => Re(O, "name", { value: j, configurable: !0 });
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
7
- import { defineComponent as Re, useSlots as _e, useAttrs as ze, ref as ne, reactive as le, watch as J, computed as s, openBlock as c, createElementBlock as m, normalizeClass as N, unref as n, createVNode as Q, mergeProps as Ne, createSlots as Ve, withCtx as p, Fragment as k, createBlock as F, createElementVNode as V, toDisplayString as B, createTextVNode as $, createCommentVNode as D, renderSlot as I, toRefs as oe } from "vue";
8
- import { lsUploadProps as Be, UPLOAD_TYPE_MAP as De, fileTypeMap as Ie, UPLOAD_STATUS_MAP as qe, IMG_SUFFIX_LIST as Oe } from "../types/index.js";
9
- import { getVariable as je } from "../../_utils/config/index.js";
10
- import { useNamespace as He } from "../../_hooks/useNamespace/index.js";
11
- import S from "../../button/Button.vue/index.js";
7
+ import { defineComponent as _e, useSlots as ze, useAttrs as Ne, ref as ne, reactive as le, watch as J, computed as s, openBlock as c, createElementBlock as f, normalizeClass as B, unref as n, createVNode as Q, mergeProps as Be, createSlots as Ve, withCtx as F, Fragment as k, createBlock as h, createElementVNode as V, toDisplayString as D, createTextVNode as $, createCommentVNode as I, renderSlot as q, toRefs as oe } from "vue";
8
+ import { lsUploadProps as De, UPLOAD_TYPE_MAP as Ie, fileTypeMap as qe, UPLOAD_STATUS_MAP as Oe, IMG_SUFFIX_LIST as je } from "../types/index.js";
9
+ import { getVariable as He } from "../../_utils/config/index.js";
10
+ import { useNamespace as Ge } from "../../_hooks/useNamespace/index.js";
11
+ import C from "../../button/Button.vue/index.js";
12
12
  import ae from "../../icon/Index.vue/index.js";
13
- import Ge from "../../../../../preview_image/index.js";
13
+ import Ke from "../../../../../preview_image/index.js";
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import { ElMessage as x } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
17
- import { ElAvatar as Ke } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/avatar/index/index.js";
18
- import { ElUpload as We } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/upload/index/index.js";
19
- const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je = {
17
+ import { ElAvatar as We } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/avatar/index/index.js";
18
+ import { ElUpload as Xe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/upload/index/index.js";
19
+ const Ye = { class: "ls-drag" }, Je = { class: "drag-txt ls-color-brand6" }, Qe = {
20
20
  key: 0,
21
21
  class: "btn-picture-card"
22
- }, Qe = {
22
+ }, Ze = {
23
23
  key: 0,
24
24
  class: "ls-tip"
25
- }, Ft = /* @__PURE__ */ Re({
25
+ }, ht = /* @__PURE__ */ _e({
26
26
  name: "LSUpload",
27
27
  inheritAttrs: !1,
28
28
  __name: "Index",
29
- props: Be,
29
+ props: De,
30
30
  emits: ["uploadErrorFunc", "onChangeFunc", "httpResponseFunc"],
31
- setup(q, { expose: O, emit: se }) {
32
- const M = _e(), y = ze(), re = He("upload").b(), f = ne(), d = ne(!1), b = le({
31
+ setup(O, { expose: j, emit: se }) {
32
+ const M = ze(), v = Ne(), re = Ge("upload").b(), m = ne(), d = ne(!1), y = le({
33
33
  isCover: !0,
34
34
  accept: "",
35
35
  disabled: !1
@@ -38,10 +38,10 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
38
38
  initUploadStatus: !0,
39
39
  showPreview: !1,
40
40
  sourcePreview: "",
41
- iconColor: je("colorText1")
42
- }), i = q, R = se;
41
+ iconColor: He("colorText1")
42
+ }), i = O, R = se;
43
43
  J(
44
- () => y["file-list"],
44
+ () => v["file-list"],
45
45
  (e) => {
46
46
  o.uploadFileList = e || [];
47
47
  },
@@ -50,20 +50,20 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
50
50
  deep: !0
51
51
  }
52
52
  );
53
- const L = s(() => {
53
+ const S = s(() => {
54
54
  var e, t;
55
55
  return !!((e = i == null ? void 0 : i.item) != null && e.isToast || typeof ((t = i == null ? void 0 : i.item) == null ? void 0 : t.isToast) > "u");
56
- }), v = s(() => {
56
+ }), g = s(() => {
57
57
  var t;
58
58
  const e = (t = i == null ? void 0 : i.item) == null ? void 0 : t.isCover;
59
59
  return typeof e > "u" ? !0 : e;
60
- }), w = s(() => y.multiple), h = s(() => {
61
- const e = y["auto-upload"];
60
+ }), L = s(() => v.multiple), b = s(() => {
61
+ const e = v["auto-upload"];
62
62
  return typeof e > "u" ? !0 : e;
63
63
  }), ue = s(() => {
64
64
  var e;
65
65
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.emptyFileMsg) || "";
66
- }), j = s(() => y["list-type"]), P = s(() => j.value === De.picCard), ce = s(() => !j.value || j.value == "text"), U = s(() => {
66
+ }), H = s(() => v["list-type"]), P = s(() => H.value === Ie.picCard), ce = s(() => !H.value || H.value == "text"), U = s(() => {
67
67
  var e;
68
68
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitFile) || [];
69
69
  }), de = s(() => {
@@ -72,13 +72,13 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
72
72
  }), A = s(() => {
73
73
  var e;
74
74
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSize) || 2;
75
- }), fe = s(() => {
75
+ }), me = s(() => {
76
76
  var e;
77
77
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSizeMsg) || "";
78
- }), H = s(() => {
78
+ }), G = s(() => {
79
79
  var e;
80
80
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitUnit) || "MB";
81
- }), me = s(() => {
81
+ }), fe = s(() => {
82
82
  var e;
83
83
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitNumMsg) || "";
84
84
  }), ve = s(() => {
@@ -87,27 +87,31 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
87
87
  }), Z = s(() => {
88
88
  var e;
89
89
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.profile) || !1;
90
- }), E = s(() => y.drag), ge = s(() => {
90
+ }), E = s(() => v.drag), ge = s(() => {
91
91
  var e;
92
- return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.hideCoverBtn) && v.value && o.uploadFileList.length > 0;
93
- }), C = s(() => y.disabled), G = s(() => {
92
+ return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.hideCoverBtn) && g.value && o.uploadFileList.length > 0;
93
+ }), w = s(() => v.disabled), K = s(() => {
94
94
  const e = P.value ? "图片" : "文件";
95
95
  let t = `选择${e}`;
96
- return d.value ? t = "正在上传..." : v.value && !w.value ? h.value ? o.initUploadStatus ? t = "点击上传" : t = "重新上传" : o.initUploadStatus ? t = `选择${e}` : t = "重新上传" : h.value && (t = "点击上传"), t;
96
+ return d.value ? t = "正在上传..." : g.value && !L.value ? b.value ? o.initUploadStatus ? t = "点击上传" : t = "重新上传" : o.initUploadStatus ? t = `选择${e}` : t = "重新上传" : b.value && (t = "点击上传"), t;
97
97
  }), pe = s(() => {
98
98
  let e = "不限制上传格式,";
99
- return P.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${A.value}${H.value}`;
99
+ return P.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${A.value}${G.value}`;
100
100
  }), Fe = s(() => {
101
101
  var e;
102
102
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.tipContent) || "";
103
- }), K = s(() => {
103
+ }), W = s(() => {
104
104
  var e;
105
105
  return (e = i == null ? void 0 : i.item) == null ? void 0 : e.httpRequestFunc;
106
+ }), he = s(() => {
107
+ var t;
108
+ const e = Number(v.limit || 0);
109
+ return e ? ((t = i == null ? void 0 : i.item) == null ? void 0 : t.hideBtnReachLimit) && o.uploadFileList.length >= e : !1;
106
110
  });
107
111
  J(
108
- [v, K],
112
+ [g, W],
109
113
  ([e, t]) => {
110
- b.isCover = e, t && t instanceof Function && (b["http-request"] = Le);
114
+ y.isCover = e, t && t instanceof Function && (y["http-request"] = Pe);
111
115
  },
112
116
  {
113
117
  immediate: !0,
@@ -124,9 +128,9 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
124
128
  }
125
129
  );
126
130
  function ye(e) {
127
- b.accept = "", e.forEach((t) => {
128
- const l = Ie[t] || "";
129
- l && (b.accept && (b.accept += ","), b.accept += l);
131
+ y.accept = "", e.forEach((t) => {
132
+ const l = qe[t] || "";
133
+ l && (y.accept && (y.accept += ","), y.accept += l);
130
134
  });
131
135
  }
132
136
  u(ye, "updateFileAccept");
@@ -142,60 +146,60 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
142
146
  async function be(e, t) {
143
147
  if (d.value = !1, i.onExceed)
144
148
  return i.onExceed(e, t);
145
- const l = Number(y.limit || 0);
149
+ const l = Number(v.limit || 0);
146
150
  let a = 0;
147
- ve.value || (a = l - o.uploadFileList.length, a > 0 && (Pe(e.slice(0, a)), h.value && X()));
148
- const r = me.value || `当前限制选择 ${l} 个文件,本次选择了 ${e.length} 个文件,已成功上传 ${a} 个文件`;
149
- L.value ? setTimeout(() => {
151
+ ve.value || (a = l - o.uploadFileList.length, a > 0 && (Ue(e.slice(0, a)), b.value && Y()));
152
+ const r = fe.value || `当前限制选择 ${l} 个文件,本次选择了 ${e.length} 个文件,已成功上传 ${a} 个文件`;
153
+ S.value ? setTimeout(() => {
150
154
  x.warning(r);
151
155
  }, 200) : T(r);
152
156
  }
153
157
  u(be, "onExceedAction");
154
- function he(e) {
158
+ function ke(e) {
155
159
  if (i.beforeUpload) {
156
160
  const l = i.beforeUpload(e);
157
- return l && v.value && !w.value && _(), l;
161
+ return l && g.value && !L.value && _(), l;
158
162
  }
159
- const t = W(e, !0);
160
- return t && h.value && v.value && !w.value && _(), t;
163
+ const t = X(e, !0);
164
+ return t && b.value && g.value && !L.value && _(), t;
161
165
  }
162
- u(he, "beforeUploadAction");
163
- function W(e, t) {
166
+ u(ke, "beforeUploadAction");
167
+ function X(e, t) {
164
168
  let l = !0;
165
- const { size: a, name: r } = e, Y = U.value.length > 0 && !ee(r);
166
- let z = !1;
167
- switch (H.value) {
169
+ const { size: a, name: r } = e, z = U.value.length > 0 && !ee(r);
170
+ let N = !1;
171
+ switch (G.value) {
168
172
  case "KB":
169
- z = a / 1024 > A.value;
173
+ N = a / 1024 > A.value;
170
174
  break;
171
175
  case "MB":
172
- z = a / 1024 / 1024 > A.value;
176
+ N = a / 1024 / 1024 > A.value;
173
177
  break;
174
178
  default:
175
- z = a / 1024 / 1024 / 1024 > A.value;
179
+ N = a / 1024 / 1024 / 1024 > A.value;
176
180
  break;
177
181
  }
178
- if (Y) {
179
- const g = de.value || `上传文件 ${e.name} 只能是 ${U.value.filter((xe) => xe).join(",").toLocaleLowerCase()} 格式!`;
180
- L.value && t ? setTimeout(() => {
181
- x.error(g);
182
- }, 200) : T(g), l = !1;
183
- }
184
182
  if (z) {
185
- const g = fe.value || `上传文件 ${e.name} 大小不能超过 ${A.value}${H.value}!`;
186
- L.value && t ? setTimeout(() => {
187
- x.error(g);
188
- }, 200) : T(g), l = !1;
183
+ const p = de.value || `上传文件 ${e.name} 只能是 ${U.value.filter((Me) => Me).join(",").toLocaleLowerCase()} 格式!`;
184
+ S.value && t ? setTimeout(() => {
185
+ x.error(p);
186
+ }, 200) : T(p), l = !1;
187
+ }
188
+ if (N) {
189
+ const p = me.value || `上传文件 ${e.name} 大小不能超过 ${A.value}${G.value}!`;
190
+ S.value && t ? setTimeout(() => {
191
+ x.error(p);
192
+ }, 200) : T(p), l = !1;
189
193
  }
190
- if (P.value && !ee(r, Oe)) {
191
- const g = `上传文件 ${e.name} 不是图片格式的文件!`;
192
- L.value && t ? setTimeout(() => {
193
- x.error(g);
194
- }, 200) : T(g), l = !1;
194
+ if (!z && P.value && !ee(r, je)) {
195
+ const p = `上传文件 ${e.name} 不是图片格式的文件!`;
196
+ S.value && t ? setTimeout(() => {
197
+ x.error(p);
198
+ }, 200) : T(p), l = !1;
195
199
  }
196
200
  return l;
197
201
  }
198
- u(W, "validateUploadFile");
202
+ u(X, "validateUploadFile");
199
203
  function ee(e, t) {
200
204
  let l = [];
201
205
  if (U.value.length > 0 ? l = U.value : t && (l = t), l.length <= 0)
@@ -212,21 +216,21 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
212
216
  o.uploadFileList.splice(e || 0, t || o.uploadFileList.length - 1);
213
217
  }
214
218
  u(_, "updateCoverFileList");
215
- function ke(e, t) {
219
+ function Le(e, t) {
216
220
  o.uploadFileList = t;
217
- const l = e.raw && W(e.raw, !h.value);
218
- if (l && v.value && !w.value && _(), i.onChange)
221
+ const l = e.raw && X(e.raw, !b.value);
222
+ if (l && g.value && !L.value && _(), i.onChange)
219
223
  return i.onChange(e, t);
220
224
  const { size: a = 0 } = e;
221
225
  if (a <= 0) {
222
226
  te();
223
227
  const r = ue.value || "禁止上传空文件,请检查后重新上传!";
224
- L.value ? x.error(r) : T(r);
228
+ S.value ? x.error(r) : T(r);
225
229
  return;
226
230
  }
227
- e.raw && (!h.value && !l ? te() : (e.blob = URL.createObjectURL(e.raw) || "", R("onChangeFunc", e)));
231
+ e.raw && (!b.value && !l ? te() : (e.blob = URL.createObjectURL(e.raw) || "", R("onChangeFunc", e)));
228
232
  }
229
- u(ke, "onChangeAction");
233
+ u(Le, "onChangeAction");
230
234
  function te() {
231
235
  let e = 0;
232
236
  o.uploadFileList.length > 1 && (e = o.uploadFileList.length - 1), _(e, 1), R("onChangeFunc", {});
@@ -249,72 +253,72 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
249
253
  return i.onRemove(e, t);
250
254
  }
251
255
  u(Se, "onRemoveAction");
252
- async function Le(e) {
256
+ async function Pe(e) {
253
257
  const { file: t } = e;
254
258
  if (!t)
255
259
  return;
256
260
  const { size: l } = t;
257
- if (l <= 0 || !W(t, !1))
261
+ if (l <= 0 || !X(t, !1))
258
262
  return;
259
263
  if (i.httpRequest)
260
264
  return i.httpRequest(e);
261
265
  const a = new FormData();
262
- if (a.append("file", t), K.value instanceof Function) {
266
+ if (a.append("file", t), W.value instanceof Function) {
263
267
  d.value = !0;
264
268
  let r = {};
265
269
  try {
266
- r = await K.value(a);
267
- } catch (Y) {
268
- r = Y;
270
+ r = await W.value(a);
271
+ } catch (z) {
272
+ r = z;
269
273
  } finally {
270
274
  d.value = !1, R("httpResponseFunc", r);
271
275
  }
272
276
  }
273
277
  }
274
- u(Le, "httpRequestAction");
278
+ u(Pe, "httpRequestAction");
275
279
  function ie() {
276
280
  let e = !1;
277
281
  for (let t = 0; t < o.uploadFileList.length; t++)
278
- if (o.uploadFileList[t].status === qe.ready) {
282
+ if (o.uploadFileList[t].status === Oe.ready) {
279
283
  e = !0;
280
284
  break;
281
285
  }
282
286
  return e;
283
287
  }
284
288
  u(ie, "hasReadyFile");
285
- function X() {
289
+ function Y() {
286
290
  var e;
287
- (e = f == null ? void 0 : f.value) == null || e.submit();
291
+ (e = m == null ? void 0 : m.value) == null || e.submit();
288
292
  }
289
- u(X, "comfirmUpload");
290
- function Pe(e) {
293
+ u(Y, "comfirmUpload");
294
+ function Ue(e) {
291
295
  (e || []).forEach((t) => {
292
296
  var l;
293
- (l = f == null ? void 0 : f.value) == null || l.handleStart(t);
297
+ (l = m == null ? void 0 : m.value) == null || l.handleStart(t);
294
298
  });
295
299
  }
296
- u(Pe, "comHandleStart");
297
- function Ue(e) {
298
- f == null || f.value.handleRemove(e);
300
+ u(Ue, "comHandleStart");
301
+ function Ae(e) {
302
+ m == null || m.value.handleRemove(e);
299
303
  }
300
- u(Ue, "removeFile");
301
- function Ae() {
304
+ u(Ae, "removeFile");
305
+ function Ee() {
302
306
  o.uploadFileList.forEach((e) => {
303
307
  var t;
304
308
  if (e)
305
309
  try {
306
- (t = f == null ? void 0 : f.value) == null || t.abort(e), Ue(e);
310
+ (t = m == null ? void 0 : m.value) == null || t.abort(e), Ae(e);
307
311
  } catch {
308
312
  }
309
313
  });
310
314
  }
311
- u(Ae, "cancelUpload");
312
- function Ee(e, t, l) {
315
+ u(Ee, "cancelUpload");
316
+ function Te(e, t, l) {
313
317
  if (d.value = !0, i.onProgress)
314
318
  return i.onProgress(e, t, l);
315
319
  }
316
- u(Ee, "onProgressAction");
317
- function Te(e) {
320
+ u(Te, "onProgressAction");
321
+ function $e(e) {
318
322
  if (i.onPreview)
319
323
  return i.onPreview(e);
320
324
  if (P.value) {
@@ -322,82 +326,88 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
322
326
  o.sourcePreview = t, o.showPreview = !0;
323
327
  }
324
328
  }
325
- u(Te, "onPreviewAction");
326
- function $e() {
329
+ u($e, "onPreviewAction");
330
+ function xe() {
327
331
  o.showPreview = !1, o.sourcePreview = "";
328
332
  }
329
- return u($e, "closePreview"), O({
330
- uploadRef: f
333
+ return u(xe, "closePreview"), j({
334
+ uploadRef: m
331
335
  }), (e, t) => {
332
- const l = Ke, a = We;
333
- return c(), m("div", {
334
- class: N([n(re), n(E) ? "ls-upload-drag" : "", n(Z) ? "ls-profile" : "", n(ge) ? "hide-cover-btn" : ""])
336
+ const l = We, a = Xe;
337
+ return c(), f("div", {
338
+ class: B([
339
+ n(re),
340
+ n(E) ? "ls-upload-drag" : "",
341
+ n(Z) ? "ls-profile" : "",
342
+ n(ge) ? "hide-cover-btn" : "",
343
+ n(he) ? "hide-btn" : ""
344
+ ])
335
345
  }, [
336
- Q(a, Ne({
346
+ Q(a, Be({
337
347
  ref_key: "uploadRef",
338
- ref: f
339
- }, Object.assign(n(b), e.$attrs), {
348
+ ref: m
349
+ }, Object.assign(n(y), e.$attrs), {
340
350
  "on-exceed": be,
341
- "before-upload": he,
342
- "on-change": ke,
351
+ "before-upload": ke,
352
+ "on-change": Le,
343
353
  "on-success": we,
344
354
  "on-error": Ce,
345
355
  "on-remove": Se,
346
- "on-progress": Ee,
347
- "on-preview": Te
356
+ "on-progress": Te,
357
+ "on-preview": $e
348
358
  }), Ve({
349
- trigger: p(() => [
350
- n(Z) ? e.item.defProfile && n(o).uploadFileList.length < 1 ? (c(), F(l, {
359
+ trigger: F(() => [
360
+ n(Z) ? e.item.defProfile && n(o).uploadFileList.length < 1 ? (c(), h(l, {
351
361
  key: 1,
352
362
  size: 60,
353
363
  src: e.item.defProfile,
354
364
  fit: "contain"
355
- }, null, 8, ["src"])) : D("", !0) : (c(), m(k, { key: 0 }, [
356
- n(M).trigger ? I(e.$slots, "trigger", { key: 1 }, void 0, !0) : (c(), m(k, { key: 0 }, [
357
- n(E) ? (c(), m(k, { key: 0 }, [
358
- n(d) ? (c(), F(S, {
365
+ }, null, 8, ["src"])) : I("", !0) : (c(), f(k, { key: 0 }, [
366
+ n(M).trigger ? q(e.$slots, "trigger", { key: 1 }, void 0, !0) : (c(), f(k, { key: 0 }, [
367
+ n(E) ? (c(), f(k, { key: 0 }, [
368
+ n(d) ? (c(), h(C, {
359
369
  key: 0,
360
370
  text: "",
361
371
  loading: n(d),
362
- disabled: n(C)
363
- }, null, 8, ["loading", "disabled"])) : (c(), F(ae, {
372
+ disabled: n(w)
373
+ }, null, 8, ["loading", "disabled"])) : (c(), h(ae, {
364
374
  key: 1,
365
375
  class: "upload-icon",
366
376
  name: "UploadFilled",
367
377
  size: "56",
368
378
  color: "#E7E7E7"
369
379
  })),
370
- V("div", Xe, [
371
- V("div", Ye, B(n(G)), 1),
372
- n(d) ? D("", !0) : (c(), m(k, { key: 0 }, [
380
+ V("div", Ye, [
381
+ V("div", Je, D(n(K)), 1),
382
+ n(d) ? I("", !0) : (c(), f(k, { key: 0 }, [
373
383
  t[1] || (t[1] = $("   /   ")),
374
384
  t[2] || (t[2] = V("div", { class: "drag-txt ls-color-text2" }, "拖拽到此区域", -1))
375
385
  ], 64))
376
386
  ])
377
- ], 64)) : (c(), m(k, { key: 1 }, [
378
- n(P) ? (c(), m("div", Je, [
379
- n(d) ? (c(), F(S, {
387
+ ], 64)) : (c(), f(k, { key: 1 }, [
388
+ n(P) ? (c(), f("div", Qe, [
389
+ n(d) ? (c(), h(C, {
380
390
  key: 0,
381
391
  text: "",
382
392
  loading: n(d),
383
- disabled: n(C)
384
- }, null, 8, ["loading", "disabled"])) : (c(), F(ae, {
393
+ disabled: n(w)
394
+ }, null, 8, ["loading", "disabled"])) : (c(), h(ae, {
385
395
  key: 1,
386
396
  class: "upload-btn-plus",
387
397
  name: "Plus",
388
398
  size: 28,
389
399
  color: n(o).iconColor
390
400
  }, null, 8, ["color"])),
391
- V("div", null, B(n(G)), 1)
392
- ])) : (c(), F(S, {
401
+ V("div", null, D(n(K)), 1)
402
+ ])) : (c(), h(C, {
393
403
  key: 1,
394
404
  plain: "",
395
405
  icon: "upload",
396
406
  loading: n(d),
397
- disabled: n(C)
407
+ disabled: n(w)
398
408
  }, {
399
- default: p(() => [
400
- $(B(n(G)), 1)
409
+ default: F(() => [
410
+ $(D(n(K)), 1)
401
411
  ]),
402
412
  _: 1
403
413
  }, 8, ["loading", "disabled"]))
@@ -405,77 +415,77 @@ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je
405
415
  ], 64))
406
416
  ], 64))
407
417
  ]),
408
- default: p(() => [
409
- n(M).default ? I(e.$slots, "default", { key: 1 }, void 0, !0) : (c(), m(k, { key: 0 }, [
410
- !n(h) && (n(ce) || n(E)) ? (c(), m("div", {
418
+ default: F(() => [
419
+ n(M).default ? q(e.$slots, "default", { key: 1 }, void 0, !0) : (c(), f(k, { key: 0 }, [
420
+ !n(b) && (n(ce) || n(E)) ? (c(), f("div", {
411
421
  key: 0,
412
- class: N(["upload-btn-handle", [n(E) ? "drag-css" : "nor-css", !n(v) || n(w) ? "multi-css" : ""]])
422
+ class: B(["upload-btn-handle", [n(E) ? "drag-css" : "nor-css", !n(g) || n(L) ? "multi-css" : ""]])
413
423
  }, [
414
- n(E) ? (c(), m(k, { key: 1 }, [
415
- !n(v) || n(w) ? (c(), F(S, {
424
+ n(E) ? (c(), f(k, { key: 1 }, [
425
+ !n(g) || n(L) ? (c(), h(C, {
416
426
  key: 0,
417
427
  type: "primary",
418
428
  loading: n(d),
419
- disabled: n(C),
420
- onClick: Ae,
429
+ disabled: n(w),
430
+ onClick: Ee,
421
431
  class: "ls-upload-btn-com ls-upload-btn-cancel"
422
432
  }, {
423
- default: p(() => t[4] || (t[4] = [
433
+ default: F(() => t[4] || (t[4] = [
424
434
  $("取消上传")
425
435
  ])),
426
436
  _: 1
427
- }, 8, ["loading", "disabled"])) : D("", !0),
428
- Q(S, {
429
- class: N(["start-upload ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": ie() }]),
437
+ }, 8, ["loading", "disabled"])) : I("", !0),
438
+ Q(C, {
439
+ class: B(["start-upload ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": ie() }]),
430
440
  type: "primary",
431
441
  loading: n(d),
432
- disabled: n(C),
433
- onClick: X
442
+ disabled: n(w),
443
+ onClick: Y
434
444
  }, {
435
- default: p(() => t[5] || (t[5] = [
445
+ default: F(() => t[5] || (t[5] = [
436
446
  $("开始上传")
437
447
  ])),
438
448
  _: 1
439
449
  }, 8, ["class", "loading", "disabled"])
440
- ], 64)) : (c(), F(S, {
450
+ ], 64)) : (c(), h(C, {
441
451
  key: 0,
442
452
  type: "primary",
443
- class: N(["ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": ie() }]),
453
+ class: B(["ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": ie() }]),
444
454
  loading: n(d),
445
- disabled: n(C),
446
- onClick: X
455
+ disabled: n(w),
456
+ onClick: Y
447
457
  }, {
448
- default: p(() => t[3] || (t[3] = [
458
+ default: F(() => t[3] || (t[3] = [
449
459
  $("开始上传 ")
450
460
  ])),
451
461
  _: 1
452
462
  }, 8, ["class", "loading", "disabled"]))
453
- ], 2)) : D("", !0)
463
+ ], 2)) : I("", !0)
454
464
  ], 64))
455
465
  ]),
456
- tip: p(() => [
457
- n(M).tip ? I(e.$slots, "tip", { key: 1 }, void 0, !0) : (c(), m("div", Qe, B(n(Fe) || n(pe)), 1))
466
+ tip: F(() => [
467
+ n(M).tip ? q(e.$slots, "tip", { key: 1 }, void 0, !0) : (c(), f("div", Ze, D(n(Fe) || n(pe)), 1))
458
468
  ]),
459
469
  _: 2
460
470
  }, [
461
471
  n(M).file ? {
462
472
  name: "file",
463
- fn: p(() => [
464
- I(e.$slots, "file", {}, void 0, !0)
473
+ fn: F(() => [
474
+ q(e.$slots, "file", {}, void 0, !0)
465
475
  ]),
466
476
  key: "0"
467
477
  } : void 0
468
478
  ]), 1040),
469
- Q(n(Ge), {
479
+ Q(n(Ke), {
470
480
  modelValue: n(o).showPreview,
471
481
  "onUpdate:modelValue": t[0] || (t[0] = (r) => n(o).showPreview = r),
472
482
  source: n(o).sourcePreview,
473
- "on-close": $e
483
+ "on-close": xe
474
484
  }, null, 8, ["modelValue", "source"])
475
485
  ], 2);
476
486
  };
477
487
  }
478
488
  });
479
489
  export {
480
- Ft as default
490
+ ht as default
481
491
  };
@@ -1,6 +1,5 @@
1
1
  import { default as useRouterHook } from './useRouterHook';
2
- import { default as useColorthiefHook } from './useColorthiefHook';
3
2
  import { default as useWSHook } from './useWSHook';
4
3
  import { default as useOptionHook } from './useOptionHook';
5
4
  import { default as useTableListHook } from './useTableListHook';
6
- export { useRouterHook, useColorthiefHook, useWSHook, useOptionHook, useTableListHook };
5
+ export { useRouterHook, useWSHook, useOptionHook, useTableListHook };
@@ -2,13 +2,13 @@
2
2
  * 获取select、radio标签使用的option
3
3
  * apiFunc 请求接口
4
4
  * params: {
5
- * labelKey,
6
- * valueKey,
7
5
  * 分页参数, 注意分页接口返回之需用records作为数组字段
8
6
  * }
7
+ * labelKey: 标签字段
8
+ * valueKey: 值字段
9
9
  * @returns
10
10
  */
11
11
  export default function (): {
12
- getSelOption: (apiFunc: any, params?: any, all?: Array<OptionType>) => Promise<any>;
12
+ getSelOption: (apiFunc: any, labelKey?: Array<string>, valueKey?: Array<string>, params?: any, all?: Array<OptionType>) => Promise<any>;
13
13
  remoteSearchSelOption: (apiFunc: Promise<any>, params: any, selId: string, selVal: string, keyword: string | undefined) => Promise<any>;
14
14
  };
@@ -85,7 +85,7 @@ declare function __VLS_template(): {
85
85
  $root: ComponentPublicInstance | null;
86
86
  $parent: ComponentPublicInstance | null;
87
87
  $host: Element | null;
88
- $emit: ((event: "close") => void) & ((event: "open") => void) & ((event: "closed") => void) & ((event: "update:modelValue", value: boolean) => void) & ((event: "opened") => void) & ((event: "openAutoFocus") => void) & ((event: "closeAutoFocus") => void);
88
+ $emit: ((event: "open") => void) & ((event: "close") => void) & ((event: "closed") => void) & ((event: "update:modelValue", value: boolean) => void) & ((event: "opened") => void) & ((event: "openAutoFocus") => void) & ((event: "closeAutoFocus") => void);
89
89
  $el: any;
90
90
  $options: ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{
91
91
  readonly appendToBody: BooleanConstructor;