@aplus-frontend/ui 6.26.4 → 6.27.0

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 (102) hide show
  1. package/es/src/ag-grid/hooks/use-columns-def.d.ts +2 -2
  2. package/es/src/ag-grid/hooks/use-columns-def.mjs +29 -29
  3. package/es/src/ag-grid/hooks/use-columns.d.ts +1 -1
  4. package/es/src/ag-grid/hooks/use-columns.mjs +8 -8
  5. package/es/src/ag-grid/hooks/use-pinned-row.d.ts +7 -0
  6. package/es/src/ag-grid/hooks/use-pinned-row.mjs +32 -0
  7. package/es/src/ag-grid/hooks/use-virtual-config.d.ts +5 -0
  8. package/es/src/ag-grid/hooks/use-virtual-config.mjs +25 -0
  9. package/es/src/ag-grid/index.vue.mjs +274 -232
  10. package/es/src/ag-grid/interface.d.ts +25 -2
  11. package/es/src/ap-field/select/index.vue.d.ts +51 -21
  12. package/es/src/ap-field/select/index.vue.mjs +51 -49
  13. package/es/src/ap-field/select/read.vue2.mjs +4 -1
  14. package/es/src/ap-field/tree-select/index.vue.d.ts +29 -21
  15. package/es/src/ap-field/tree-select/index.vue.mjs +11 -9
  16. package/es/src/ap-field/tree-select/read.vue2.mjs +7 -5
  17. package/es/src/ap-form/ap-form.vue.d.ts +20 -0
  18. package/es/src/ap-form/ap-form.vue2.mjs +11 -10
  19. package/es/src/ap-form/drawer-form/index.vue.d.ts +22 -0
  20. package/es/src/ap-form/drawer-form/index.vue.mjs +1 -0
  21. package/es/src/ap-form/hooks/use-watch.mjs +25 -28
  22. package/es/src/ap-form/interface.d.ts +1 -1
  23. package/es/src/ap-form/items/select/index.vue.d.ts +64 -28
  24. package/es/src/ap-form/items/tree-select/index.vue.d.ts +40 -28
  25. package/es/src/ap-form/modal-form/index.vue.d.ts +22 -0
  26. package/es/src/ap-form/modal-form/index.vue.mjs +31 -30
  27. package/es/src/ap-form/search-form/index.vue.d.ts +24 -2
  28. package/es/src/ap-form/search-form/index.vue.mjs +72 -68
  29. package/es/src/ap-table/constants.d.ts +52 -28
  30. package/es/src/ap-upload/apUpload.vue.d.ts +9 -0
  31. package/es/src/ap-upload/apUpload.vue.mjs +38 -34
  32. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +59 -59
  33. package/es/src/ap-upload/components/Picture.vue2.mjs +74 -74
  34. package/es/src/ap-upload/components/SingleFile.vue2.mjs +95 -95
  35. package/es/src/business/ap-value-select-card/index.vue2.mjs +120 -123
  36. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +11 -0
  37. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +11 -0
  38. package/es/src/business/hooks/usePageListAgGrid.d.ts +1 -1
  39. package/es/src/business/hooks/usePageListAgGrid.mjs +4 -4
  40. package/es/src/business/hooks/usePageListApGrid.mjs +14 -14
  41. package/es/src/config-provider/config-provider-props.d.ts +14 -1
  42. package/es/src/config-provider/config-provider.d.ts +31 -1
  43. package/es/src/config-provider/hooks/use-global-config.d.ts +14 -1
  44. package/es/src/config-provider/index.d.ts +52 -1
  45. package/es/src/utils/config-provider-preset.d.ts +11 -1
  46. package/es/src/version.d.ts +1 -1
  47. package/es/src/version.mjs +1 -1
  48. package/es/src/work-order-modal/work-order-modal.vue.d.ts +11 -0
  49. package/lib/src/ag-grid/hooks/use-columns-def.d.ts +2 -2
  50. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  51. package/lib/src/ag-grid/hooks/use-columns.d.ts +1 -1
  52. package/lib/src/ag-grid/hooks/use-columns.js +1 -1
  53. package/lib/src/ag-grid/hooks/use-pinned-row.d.ts +7 -0
  54. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -0
  55. package/lib/src/ag-grid/hooks/use-virtual-config.d.ts +5 -0
  56. package/lib/src/ag-grid/hooks/use-virtual-config.js +1 -0
  57. package/lib/src/ag-grid/index.vue.js +1 -1
  58. package/lib/src/ag-grid/interface.d.ts +25 -2
  59. package/lib/src/ap-field/select/index.vue.d.ts +51 -21
  60. package/lib/src/ap-field/select/index.vue.js +1 -1
  61. package/lib/src/ap-field/select/read.vue2.js +1 -1
  62. package/lib/src/ap-field/tree-select/index.vue.d.ts +29 -21
  63. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  64. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  65. package/lib/src/ap-form/ap-form.vue.d.ts +20 -0
  66. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  67. package/lib/src/ap-form/drawer-form/index.vue.d.ts +22 -0
  68. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  69. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  70. package/lib/src/ap-form/interface.d.ts +1 -1
  71. package/lib/src/ap-form/items/select/index.vue.d.ts +64 -28
  72. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +40 -28
  73. package/lib/src/ap-form/modal-form/index.vue.d.ts +22 -0
  74. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  75. package/lib/src/ap-form/search-form/index.vue.d.ts +24 -2
  76. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  77. package/lib/src/ap-table/constants.d.ts +52 -28
  78. package/lib/src/ap-upload/apUpload.vue.d.ts +9 -0
  79. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  80. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  81. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  82. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  83. package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
  84. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +11 -0
  85. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +11 -0
  86. package/lib/src/business/hooks/usePageListAgGrid.d.ts +1 -1
  87. package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
  88. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  89. package/lib/src/config-provider/config-provider-props.d.ts +14 -1
  90. package/lib/src/config-provider/config-provider.d.ts +31 -1
  91. package/lib/src/config-provider/hooks/use-global-config.d.ts +14 -1
  92. package/lib/src/config-provider/index.d.ts +52 -1
  93. package/lib/src/utils/config-provider-preset.d.ts +11 -1
  94. package/lib/src/version.d.ts +1 -1
  95. package/lib/src/version.js +1 -1
  96. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +11 -0
  97. package/package.json +3 -3
  98. package/theme/ap-pro-card/index.css +5 -5
  99. package/theme/ap-pro-card/index.less +5 -5
  100. package/theme/ap-value-select-card/index.css +3 -4
  101. package/theme/ap-value-select-card/index.less +3 -4
  102. package/theme/index.css +8 -9
@@ -1,33 +1,33 @@
1
- import { defineComponent as G, inject as a, ref as H, watch as J, nextTick as K, createElementBlock as w, openBlock as x, normalizeClass as Q, unref as s, createVNode as k, withCtx as R, createElementVNode as T, createTextVNode as X, toDisplayString as b, withModifiers as Y, createCommentVNode as Z, createBlock as ee, resolveDynamicComponent as te } from "vue";
1
+ import { defineComponent as H, inject as a, ref as J, watch as K, nextTick as Q, createElementBlock as U, openBlock as h, normalizeClass as X, unref as s, createVNode as k, withCtx as T, createElementVNode as b, createTextVNode as Y, toDisplayString as M, withModifiers as Z, createCommentVNode as ee, createBlock as te, resolveDynamicComponent as oe } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getPath as oe, getName as ae, getReturnData as S } from "../utils/returnData.mjs";
4
- import { useOss as se, getOssInstance as ne } from "../hooks/useOss.mjs";
5
- import { message as c, Upload as re, Button as ie } from "@aplus-frontend/antdv";
6
- import { UploadOutlined as le } from "@ant-design/icons-vue";
7
- import { fileMatchesAccept as ue, getAcceptText as ce } from "../utils/accept.mjs";
8
- import { useLocale as pe } from "../../config-provider/hooks/use-locale.mjs";
9
- import { useNamespace as me } from "../../config-provider/hooks/use-namespace.mjs";
10
- const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 }, Ae = /* @__PURE__ */ G({
3
+ import { getPath as ae, getName as se, getReturnData as S } from "../utils/returnData.mjs";
4
+ import { useOss as ne, getOssInstance as re } from "../hooks/useOss.mjs";
5
+ import { message as c, Upload as ie, Button as le } from "@aplus-frontend/antdv";
6
+ import { UploadOutlined as ue } from "@ant-design/icons-vue";
7
+ import { fileMatchesAccept as ce, getAcceptText as pe } from "../utils/accept.mjs";
8
+ import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
9
+ import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
10
+ const fe = { class: "multiple-file-context" }, ge = { key: 0 }, ve = { key: 1 }, Fe = /* @__PURE__ */ H({
11
11
  __name: "MultipleFile",
12
- setup(ve, { expose: L }) {
13
- const { t: r } = pe(), { b: C } = me("ap-upload-multiple-file"), { put: M } = se(), z = a("theme"), B = a("dirName"), h = a("accept") || "*", U = a("maxSize") ?? 500, I = a("title") || r("ap.apUpload.uploadFile"), d = a("subTitle"), i = a("maxCount") ?? 10, p = a("uploadingCount"), E = a("beforeUpload"), _ = a("customRequest"), P = a("getOssAccess"), O = a("maxSizeErrorMsg"), V = a("maxCountErrorMsg"), q = a("acceptErrorMsg"), A = a("onRemove"), n = a("value"), l = [], f = a("needName"), m = H(null);
14
- J(
12
+ setup(he, { expose: L }) {
13
+ const { t: r } = me(), { b: C } = de("ap-upload-multiple-file"), { put: z } = ne(), B = a("theme"), I = a("dirName"), x = a("accept") || "*", E = a("maxSize") ?? 500, P = a("title") || r("ap.apUpload.uploadFile"), d = a("subTitle"), i = a("maxCount") ?? 10, p = a("uploadingCount"), _ = a("beforeUpload"), A = a("customRequest"), O = a("getOssAccess"), V = a("maxSizeErrorMsg"), q = a("maxCountErrorMsg"), D = a("acceptErrorMsg"), F = a("onRemove"), w = a("showUploadErrorMsg"), n = a("value"), l = [], f = a("needName"), m = J(null);
14
+ K(
15
15
  () => n?.value,
16
16
  function(e) {
17
- !m?.value?.fileList?.length && e && F(e);
17
+ !m?.value?.fileList?.length && e && N(e);
18
18
  },
19
19
  { immediate: !0 }
20
20
  );
21
- function F(e) {
21
+ function N(e) {
22
22
  if (!e) {
23
23
  u = [], m.value.fileList = [], n.value = void 0, l.splice(0, l.length);
24
24
  return;
25
25
  }
26
- K(() => {
26
+ Q(() => {
27
27
  const t = e.map((o) => {
28
- const v = oe(f, o), W = ae(f, o), y = new File(
28
+ const v = ae(f, o), G = se(f, o), y = new File(
29
29
  [o],
30
- W,
30
+ G,
31
31
  {}
32
32
  );
33
33
  return y.response = v, y.uid = v, y;
@@ -48,8 +48,8 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
48
48
  }), m.value.fileList = t, n.value = e;
49
49
  });
50
50
  }
51
- L({ setValue: F });
52
- let u = [], N;
51
+ L({ setValue: N });
52
+ let u = [], R;
53
53
  function g(e) {
54
54
  setTimeout(() => {
55
55
  const t = m.value.fileList.findIndex(
@@ -58,32 +58,32 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
58
58
  t >= 0 && m.value.fileList.splice(t, 1);
59
59
  });
60
60
  }
61
- async function D(e) {
61
+ async function $(e) {
62
62
  if (i && i > 1 && u.length >= i)
63
- return clearTimeout(N), N = setTimeout(() => {
63
+ return clearTimeout(R), R = setTimeout(() => {
64
64
  c.warning(
65
- V || r("ap.apUpload.maxUploadFiles", {
65
+ q || r("ap.apUpload.maxUploadFiles", {
66
66
  maxCount: i
67
67
  })
68
68
  );
69
69
  }), g(e), !1;
70
- if (e.size > U * 1024 * 1024)
70
+ if (e.size > E * 1024 * 1024)
71
71
  return c.warning(
72
- O || r("ap.apUpload.maxUploadFileSize", {
73
- maxSize: U
72
+ V || r("ap.apUpload.maxUploadFileSize", {
73
+ maxSize: E
74
74
  })
75
75
  ), g(e), !1;
76
- if (!ue(e, h))
76
+ if (!ce(e, x))
77
77
  return c.warning(
78
- q || r("ap.apUpload.fileFormatNotSupported")
78
+ D || r("ap.apUpload.fileFormatNotSupported")
79
79
  ), g(e), !1;
80
- if (typeof E == "function" && await E(e) === !1)
80
+ if (typeof _ == "function" && await _(e) === !1)
81
81
  return g(e), !1;
82
82
  i && i === 1 && (u = [], n.value = void 0), u.push(e);
83
83
  }
84
- async function $(e) {
85
- if (p.value++, typeof _ == "function") {
86
- _({
84
+ async function j(e) {
85
+ if (p.value++, typeof A == "function") {
86
+ A({
87
87
  onProgress: (t) => {
88
88
  setTimeout(() => {
89
89
  e.onProgress({
@@ -92,7 +92,7 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
92
92
  });
93
93
  },
94
94
  onError: (t) => {
95
- c.warning(t || r("ap.apUpload.networkAnomaly")), setTimeout(() => {
95
+ w && c.warning(t || r("ap.apUpload.networkAnomaly")), setTimeout(() => {
96
96
  e.onError({
97
97
  name: t,
98
98
  message: t
@@ -115,10 +115,10 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
115
115
  return;
116
116
  }
117
117
  try {
118
- const t = await ne(P);
119
- e.file.oss = t, M({
118
+ const t = await re(O);
119
+ e.file.oss = t, z({
120
120
  file: e.file,
121
- dirName: B,
121
+ dirName: I,
122
122
  oss: t,
123
123
  successCallBack(o) {
124
124
  e.onSuccess(o), n.value = [
@@ -130,7 +130,7 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
130
130
  }), p.value--;
131
131
  },
132
132
  errorCallBack(o) {
133
- c.warning(o || r("ap.apUpload.networkAnomaly")), e.onError({
133
+ w && c.warning(o || r("ap.apUpload.networkAnomaly")), e.onError({
134
134
  name: o,
135
135
  message: o
136
136
  }), p.value--;
@@ -142,7 +142,7 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
142
142
  }
143
143
  });
144
144
  } catch (t) {
145
- c.warning(
145
+ w && c.warning(
146
146
  typeof t?.message == "string" ? t.message : r("ap.apUpload.networkAnomaly")
147
147
  ), e.onError({
148
148
  name: t?.message || r("ap.apUpload.networkAnomaly"),
@@ -150,8 +150,8 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
150
150
  }), p.value--;
151
151
  }
152
152
  }
153
- function j(e) {
154
- if (A && A?.(e), e.response) {
153
+ function W(e) {
154
+ if (F && F?.(e), e.response) {
155
155
  if (Array.isArray(n.value)) {
156
156
  const o = l.findIndex((v) => v.uid === e.uid);
157
157
  o >= 0 && (n?.value.splice(o, 1), l.splice(o, 1)), n.value.length === 0 && (n.value = void 0);
@@ -163,16 +163,16 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
163
163
  );
164
164
  return u.splice(t, 1), Promise.resolve(!0);
165
165
  }
166
- return (e, t) => (x(), w("div", {
167
- class: Q({
166
+ return (e, t) => (h(), U("div", {
167
+ class: X({
168
168
  [s(C)()]: !0,
169
- [s(C)("admin")]: s(z) === "admin"
169
+ [s(C)("admin")]: s(B) === "admin"
170
170
  })
171
171
  }, [
172
- k(s(re), {
172
+ k(s(ie), {
173
173
  ref_key: "uploadRef",
174
174
  ref: m,
175
- accept: s(h),
175
+ accept: s(x),
176
176
  multiple: "",
177
177
  "max-count": s(i),
178
178
  progress: {
@@ -180,27 +180,27 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
180
180
  showInfo: !1,
181
181
  strokeColor: "#0070FF"
182
182
  },
183
- "before-upload": D,
184
- "custom-request": $,
185
- onRemove: j
183
+ "before-upload": $,
184
+ "custom-request": j,
185
+ onRemove: W
186
186
  }, {
187
- default: R(() => [
188
- T("div", de, [
189
- k(s(ie), { class: "file-btn" }, {
190
- default: R(() => [
191
- k(s(le)),
192
- X(" " + b(s(I)), 1)
187
+ default: T(() => [
188
+ b("div", fe, [
189
+ k(s(le), { class: "file-btn" }, {
190
+ default: T(() => [
191
+ k(s(ue)),
192
+ Y(" " + M(s(P)), 1)
193
193
  ]),
194
194
  _: 1
195
195
  }),
196
- T("div", {
196
+ b("div", {
197
197
  class: "sub-title",
198
- onClick: t[0] || (t[0] = Y(() => {
198
+ onClick: t[0] || (t[0] = Z(() => {
199
199
  }, ["stop"]))
200
200
  }, [
201
- typeof s(d) == "string" ? (x(), w("div", fe, b(s(d) || `${s(r)("ap.apUpload.supportExtension")}:${s(ce)(s(h))}`), 1)) : s(d) ? (x(), w("div", ge, [
202
- (x(), ee(te(s(d))))
203
- ])) : Z("", !0)
201
+ typeof s(d) == "string" ? (h(), U("div", ge, M(s(d) || `${s(r)("ap.apUpload.supportExtension")}:${s(pe)(s(x))}`), 1)) : s(d) ? (h(), U("div", ve, [
202
+ (h(), te(oe(s(d))))
203
+ ])) : ee("", !0)
204
204
  ])
205
205
  ])
206
206
  ]),
@@ -210,5 +210,5 @@ const de = { class: "multiple-file-context" }, fe = { key: 0 }, ge = { key: 1 },
210
210
  }
211
211
  });
212
212
  export {
213
- Ae as default
213
+ Fe as default
214
214
  };
@@ -1,23 +1,23 @@
1
- import { defineComponent as Y, inject as r, ref as M, watch as Z, nextTick as F, createElementBlock as g, openBlock as v, normalizeClass as ee, unref as o, createElementVNode as d, renderSlot as te, createCommentVNode as $, Fragment as ae, renderList as ne, withDirectives as oe, createVNode as U, vShow as se, toDisplayString as k } from "vue";
1
+ import { defineComponent as Z, inject as r, ref as $, watch as F, nextTick as ee, createElementBlock as g, openBlock as h, normalizeClass as te, unref as o, createElementVNode as d, renderSlot as ae, createCommentVNode as I, Fragment as ne, renderList as oe, withDirectives as se, createVNode as k, vShow as ie, toDisplayString as C } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getPath as ie, getName as re, getReturnData as I } from "../utils/returnData.mjs";
4
- import { CloseOutlined as ce, PlusOutlined as ue } from "@ant-design/icons-vue";
5
- import { useOss as le, getOssInstance as V } from "../hooks/useOss.mjs";
6
- import { fileMatchesAccept as pe, getAcceptText as de } from "../utils/accept.mjs";
7
- import { message as m, Progress as me } from "@aplus-frontend/antdv";
8
- import { omit as fe } from "lodash-unified";
9
- import { useLocale as ge } from "../../config-provider/hooks/use-locale.mjs";
3
+ import { getPath as re, getName as ce, getReturnData as V } from "../utils/returnData.mjs";
4
+ import { CloseOutlined as ue, PlusOutlined as le } from "@ant-design/icons-vue";
5
+ import { useOss as pe, getOssInstance as T } from "../hooks/useOss.mjs";
6
+ import { fileMatchesAccept as de, getAcceptText as me } from "../utils/accept.mjs";
7
+ import { message as m, Progress as fe } from "@aplus-frontend/antdv";
8
+ import { omit as ge } from "lodash-unified";
9
+ import { useLocale as he } from "../../config-provider/hooks/use-locale.mjs";
10
10
  import { useNamespace as ve } from "../../config-provider/hooks/use-namespace.mjs";
11
- const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture-item-box" }, _e = ["src"], we = { class: "picture-item-shadow" }, Ue = ["onClick"], ke = {
11
+ const xe = ["accept"], we = { class: "picture-context" }, ye = { class: "picture-item-box" }, _e = ["src"], Ue = { class: "picture-item-shadow" }, ke = ["onClick"], Ce = {
12
12
  key: 0,
13
13
  class: "picture-item-uploading"
14
- }, Ce = { class: "picture-title" }, Re = { key: 0 }, Se = { key: 1 }, De = /* @__PURE__ */ Y({
14
+ }, Ee = { class: "picture-title" }, Re = { key: 0 }, Se = { key: 1 }, Le = /* @__PURE__ */ Z({
15
15
  __name: "Picture",
16
- setup(Ee, { expose: T }) {
17
- const { t: u } = ge(), { b: C } = ve("ap-upload-picture"), { put: D } = le(), L = r("theme"), O = r("dirName"), _ = r("accept") || "image/*", w = r("maxSize") ?? 5, R = r("title"), l = r("maxCount") ?? 10, h = r("uploadingCount"), S = r("beforeUpload"), E = r("customRequest"), b = r("getOssAccess"), B = r("maxSizeErrorMsg"), q = r("maxCountErrorMsg"), j = r("acceptErrorMsg"), x = M(null), c = r("value"), y = r("needName"), z = r("onRemove");
18
- let s = M([]);
16
+ setup(Me, { expose: D }) {
17
+ const { t: u } = he(), { b: E } = ve("ap-upload-picture"), { put: L } = pe(), O = r("theme"), B = r("dirName"), y = r("accept") || "image/*", _ = r("maxSize") ?? 5, R = r("title"), l = r("maxCount") ?? 10, v = r("uploadingCount"), S = r("beforeUpload"), M = r("customRequest"), b = r("getOssAccess"), q = r("maxSizeErrorMsg"), j = r("maxCountErrorMsg"), G = r("acceptErrorMsg"), x = $(null), c = r("value"), w = r("needName"), z = r("onRemove"), U = r("showUploadErrorMsg");
18
+ let s = $([]);
19
19
  const f = [];
20
- Z(
20
+ F(
21
21
  () => c?.value,
22
22
  async function(t) {
23
23
  !s?.value?.length && t && A(t);
@@ -29,19 +29,19 @@ const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture
29
29
  c.value = void 0, f.splice(0, f.length), s.value = [];
30
30
  return;
31
31
  }
32
- F(async () => {
32
+ ee(async () => {
33
33
  const n = [];
34
34
  for (let e of t) {
35
- const a = ie(y, e), i = re(y, e), p = await V(b), W = await p.getSignatureUrl(a), X = {
35
+ const a = re(w, e), i = ce(w, e), p = await T(b), X = await p.getSignatureUrl(a), Y = {
36
36
  ...typeof e == "string" ? {} : e,
37
37
  ...new File([e], i, {}),
38
38
  uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
39
- thumbUrl: W,
39
+ thumbUrl: X,
40
40
  status: "success",
41
41
  percent: 100,
42
42
  path: a
43
43
  };
44
- n.push(X), p.destroy();
44
+ n.push(Y), p.destroy();
45
45
  }
46
46
  if (l && n.length > l) {
47
47
  m.warning(
@@ -59,35 +59,35 @@ const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture
59
59
  }), c.value = t;
60
60
  });
61
61
  }
62
- T({ setValue: A });
63
- function G() {
62
+ D({ setValue: A });
63
+ function H() {
64
64
  x.value?.click();
65
65
  }
66
- function H(t) {
66
+ function J(t) {
67
67
  const n = t.target;
68
- J(n?.files);
68
+ K(n?.files);
69
69
  }
70
- function J(t) {
70
+ function K(t) {
71
71
  if (t?.length)
72
72
  for (let n = 0; n < t.length; n++)
73
- K(t[n]);
73
+ Q(t[n]);
74
74
  x.value && (x.value.value = "");
75
75
  }
76
76
  let N;
77
- async function K(t) {
77
+ async function Q(t) {
78
78
  if (l && l > 1 && s.value.length >= l)
79
79
  return clearTimeout(N), N = setTimeout(() => {
80
80
  m.warning(
81
- q || u("ap.apUpload.maxUploadPicture", { maxCount: l })
81
+ j || u("ap.apUpload.maxUploadPicture", { maxCount: l })
82
82
  );
83
83
  }), !1;
84
- if (t.size > w * 1024 * 1024)
84
+ if (t.size > _ * 1024 * 1024)
85
85
  return m.warning(
86
- B || u("ap.apUpload.maxUploadFileSize", { maxSize: w })
86
+ q || u("ap.apUpload.maxUploadFileSize", { maxSize: _ })
87
87
  ), !1;
88
- if (!/image\/\w+/.test(t.type) || !pe(t, _))
88
+ if (!/image\/\w+/.test(t.type) || !de(t, y))
89
89
  return m.warning(
90
- j || u("ap.apUpload.pictureFormatNotSupported")
90
+ G || u("ap.apUpload.pictureFormatNotSupported")
91
91
  ), !1;
92
92
  if (typeof S == "function" && await S(t) === !1)
93
93
  return !1;
@@ -100,61 +100,61 @@ const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture
100
100
  status: "uploading",
101
101
  percent: 0
102
102
  };
103
- Q(e, t);
103
+ W(e, t);
104
104
  }, n.onerror = function() {
105
105
  m.warning(u("ap.apUpload.imageParsingFailed"));
106
106
  };
107
107
  }
108
- async function Q(t, n) {
109
- if (h.value++, typeof E == "function") {
110
- E({
108
+ async function W(t, n) {
109
+ if (v.value++, typeof M == "function") {
110
+ M({
111
111
  onProgress: (e) => {
112
112
  const a = s.value.find((i) => i.uid === t.uid);
113
113
  a && (a.percent = e);
114
114
  },
115
115
  onError: (e) => {
116
- m.warning(e || u("ap.apUpload.networkAnomaly"));
116
+ U && m.warning(e || u("ap.apUpload.networkAnomaly"));
117
117
  const a = s.value.findIndex(
118
118
  (i) => i.uid === t.uid
119
119
  );
120
- a > -1 && s.value.splice(a, 1), h.value--;
120
+ a > -1 && s.value.splice(a, 1), v.value--;
121
121
  },
122
122
  onSuccess: (e) => {
123
123
  const a = s.value.find((i) => i.uid === t.uid);
124
124
  a && (a.status = "success", a.path = e), c.value = [
125
125
  ...c.value || [],
126
- I(y, e, n.name)
126
+ V(w, e, n.name)
127
127
  ], f.push({
128
128
  uid: t.uid,
129
129
  path: e
130
- }), h.value--;
130
+ }), v.value--;
131
131
  },
132
132
  file: n
133
133
  });
134
134
  return;
135
135
  }
136
136
  try {
137
- const e = await V(b);
138
- t.oss = e, s.value.push(t), D({
137
+ const e = await T(b);
138
+ t.oss = e, s.value.push(t), L({
139
139
  file: n,
140
- dirName: O,
140
+ dirName: B,
141
141
  oss: e,
142
142
  successCallBack(a) {
143
143
  const i = s.value.find((p) => p.uid === t.uid);
144
144
  i && (i.status = "success", i.path = a), c.value = [
145
145
  ...c.value || [],
146
- I(y, a, n.name)
146
+ V(w, a, n.name)
147
147
  ], f.push({
148
148
  uid: t.uid,
149
149
  path: a
150
- }), h.value--;
150
+ }), v.value--;
151
151
  },
152
152
  errorCallBack(a) {
153
- m.warning(a || u("ap.apUpload.networkAnomaly"));
153
+ U && m.warning(a || u("ap.apUpload.networkAnomaly"));
154
154
  const i = s.value.findIndex(
155
155
  (p) => p.uid === t.uid
156
156
  );
157
- i > -1 && s.value.splice(i, 1), h.value--;
157
+ i > -1 && s.value.splice(i, 1), v.value--;
158
158
  },
159
159
  progressCallBack(a) {
160
160
  const i = s.value.find((p) => p.uid === t.uid);
@@ -162,11 +162,11 @@ const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture
162
162
  }
163
163
  });
164
164
  } catch (e) {
165
- m.warning(
165
+ U && m.warning(
166
166
  typeof e?.message == "string" ? e.message : u("ap.apUpload.networkAnomaly")
167
167
  );
168
168
  const a = s.value.findIndex((i) => i.uid === t.uid);
169
- a > -1 && s.value.splice(a, 1), h.value--;
169
+ a > -1 && s.value.splice(a, 1), v.value--;
170
170
  }
171
171
  }
172
172
  function P(t) {
@@ -188,10 +188,10 @@ const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture
188
188
  );
189
189
  return s.value.splice(n, 1), Promise.resolve(!0);
190
190
  }
191
- return (t, n) => (v(), g("div", {
192
- class: ee({
193
- [o(C)()]: !0,
194
- [o(C)("admin")]: o(L) === "admin"
191
+ return (t, n) => (h(), g("div", {
192
+ class: te({
193
+ [o(E)()]: !0,
194
+ [o(E)("admin")]: o(O) === "admin"
195
195
  })
196
196
  }, [
197
197
  d("input", {
@@ -199,20 +199,20 @@ const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture
199
199
  ref: x,
200
200
  style: { display: "none" },
201
201
  type: "file",
202
- accept: o(_),
203
- onChange: H
204
- }, null, 40, he),
205
- d("div", xe, [
206
- te(t.$slots, "pictureContext", {
202
+ accept: o(y),
203
+ onChange: J
204
+ }, null, 40, xe),
205
+ d("div", we, [
206
+ ae(t.$slots, "pictureContext", {
207
207
  fileList: o(s).map((e) => ({
208
- ...o(fe)(e, "oss"),
208
+ ...o(ge)(e, "oss"),
209
209
  oss: {
210
210
  pauseUpload: e?.oss?.pauseUpload
211
211
  }
212
212
  })),
213
213
  remove: P
214
214
  }, () => [
215
- (v(!0), g(ae, null, ne(o(s), (e) => (v(), g("div", {
215
+ (h(!0), g(ne, null, oe(o(s), (e) => (h(), g("div", {
216
216
  key: e.uid,
217
217
  class: "picture-item"
218
218
  }, [
@@ -221,46 +221,46 @@ const he = ["accept"], xe = { class: "picture-context" }, ye = { class: "picture
221
221
  src: e.thumbUrl,
222
222
  alt: ""
223
223
  }, null, 8, _e),
224
- oe(d("div", we, [
224
+ se(d("div", Ue, [
225
225
  d("div", {
226
226
  class: "picture-item-close",
227
227
  onClick: (a) => P(e)
228
228
  }, [
229
- U(o(ce))
230
- ], 8, Ue),
231
- e.status === "uploading" ? (v(), g("div", ke, [
232
- U(o(me), {
229
+ k(o(ue))
230
+ ], 8, ke),
231
+ e.status === "uploading" ? (h(), g("div", Ce, [
232
+ k(o(fe), {
233
233
  percent: e.percent,
234
234
  "stroke-color": "#ffffff",
235
235
  "trail-color": "rgba(255, 255, 255, 0.3)",
236
236
  size: 4,
237
237
  "show-info": !1
238
238
  }, null, 8, ["percent"])
239
- ])) : $("", !0)
239
+ ])) : I("", !0)
240
240
  ], 512), [
241
- [se, e.status === "uploading"]
241
+ [ie, e.status === "uploading"]
242
242
  ])
243
243
  ])
244
244
  ]))), 128))
245
245
  ]),
246
- o(l) === void 0 || o(s).length < o(l) ? (v(), g("div", {
246
+ o(l) === void 0 || o(s).length < o(l) ? (h(), g("div", {
247
247
  key: 0,
248
248
  class: "picture-upload",
249
- onClick: G
249
+ onClick: H
250
250
  }, [
251
- U(o(ue)),
252
- d("div", null, k(o(u)("ap.apUpload.update")), 1)
253
- ])) : $("", !0)
251
+ k(o(le)),
252
+ d("div", null, C(o(u)("ap.apUpload.update")), 1)
253
+ ])) : I("", !0)
254
254
  ]),
255
- d("div", Ce, [
256
- o(R) ? (v(), g("div", Re, k(o(R)), 1)) : (v(), g("div", Se, k(`${o(u)("ap.apUpload.supportExtension")}:${o(de)(o(_))},${o(u)(
255
+ d("div", Ee, [
256
+ o(R) ? (h(), g("div", Re, C(o(R)), 1)) : (h(), g("div", Se, C(`${o(u)("ap.apUpload.supportExtension")}:${o(me)(o(y))},${o(u)(
257
257
  "ap.apUpload.maxUploadPictureSize",
258
- { maxSize: o(w) }
258
+ { maxSize: o(_) }
259
259
  )}`), 1))
260
260
  ])
261
261
  ], 2));
262
262
  }
263
263
  });
264
264
  export {
265
- De as default
265
+ Le as default
266
266
  };