@aplus-frontend/ui 6.33.0 → 6.35.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 (70) hide show
  1. package/es/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  2. package/es/src/ag-grid/components/tooltip/index.vue.mjs +4 -0
  3. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +29 -0
  4. package/es/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  5. package/es/src/ag-grid/hooks/use-columns-def.mjs +94 -87
  6. package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
  7. package/es/src/ag-grid/index.vue.mjs +164 -161
  8. package/es/src/ag-grid/interface.d.ts +5 -1
  9. package/es/src/ap-download/ap-download.vue.mjs +31 -25
  10. package/es/src/ap-form/ap-form.vue.d.ts +2 -6
  11. package/es/src/ap-form/ap-form.vue2.mjs +71 -69
  12. package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
  13. package/es/src/ap-grid/editable/index.vue.mjs +94 -91
  14. package/es/src/ap-grid/index.vue.mjs +74 -69
  15. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  16. package/es/src/ap-table/ap-table.vue2.mjs +72 -69
  17. package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
  18. package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
  19. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +21 -18
  20. package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
  21. package/es/src/business/ap-copy/ApCopy.mjs +5 -6
  22. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
  23. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
  24. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  25. package/es/src/business/ap-label/index.d.ts +3 -3
  26. package/es/src/business/hooks/usePageListApTable.mjs +10 -9
  27. package/es/src/editable-table/form-item.vue.mjs +75 -72
  28. package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
  29. package/es/src/editable-table/index.vue.mjs +68 -65
  30. package/es/src/utils/warning.d.ts +25 -0
  31. package/es/src/utils/warning.mjs +74 -0
  32. package/es/src/version.d.ts +1 -1
  33. package/es/src/version.mjs +1 -1
  34. package/lib/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  35. package/lib/src/ag-grid/components/tooltip/index.vue.js +1 -0
  36. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -0
  37. package/lib/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  38. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  39. package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
  40. package/lib/src/ag-grid/index.vue.js +1 -1
  41. package/lib/src/ag-grid/interface.d.ts +5 -1
  42. package/lib/src/ap-download/ap-download.vue.js +1 -1
  43. package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
  44. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  45. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  46. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  47. package/lib/src/ap-grid/index.vue.js +1 -1
  48. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  49. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  50. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  51. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  52. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  53. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  54. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  55. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  56. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
  57. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  58. package/lib/src/business/ap-label/index.d.ts +3 -3
  59. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  60. package/lib/src/editable-table/form-item.vue.js +1 -1
  61. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  62. package/lib/src/editable-table/index.vue.js +1 -1
  63. package/lib/src/utils/warning.d.ts +25 -0
  64. package/lib/src/utils/warning.js +1 -0
  65. package/lib/src/version.d.ts +1 -1
  66. package/lib/src/version.js +1 -1
  67. package/package.json +1 -1
  68. package/theme/ag-grid/index.css +5 -1
  69. package/theme/ag-grid/index.less +5 -1
  70. package/theme/index.css +5 -1
@@ -1,124 +1,124 @@
1
- import { defineComponent as le, inject as o, ref as h, watch as se, computed as re, createElementBlock as z, openBlock as _, normalizeClass as ie, unref as t, createElementVNode as r, createCommentVNode as A, toDisplayString as b, normalizeStyle as ce, createBlock as ue, withModifiers as pe, createVNode as de } from "vue";
1
+ import { defineComponent as ne, inject as o, ref as g, watch as le, computed as se, createElementBlock as x, openBlock as h, normalizeClass as re, unref as t, createElementVNode as r, createCommentVNode as z, toDisplayString as A, normalizeStyle as ie, createBlock as ce, withModifiers as ue, createVNode as pe } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getName as ve, getReturnData as I } from "../utils/returnData.mjs";
4
- import { useOss as fe, useOssInit as me } from "../hooks/useOss.mjs";
5
- import { fileMatchesAccept as ge, getAcceptText as he } from "../utils/accept.mjs";
6
- import { message as c, Progress as _e } from "@aplus-frontend/antdv";
7
- import { DeleteOutlined as ke } from "@ant-design/icons-vue";
8
- import j from "../assets/single-file-icon.png.mjs";
9
- import { useLocale as we } from "../../config-provider/hooks/use-locale.mjs";
3
+ import { getName as de, getReturnData as q } from "../utils/returnData.mjs";
4
+ import { useOss as ve, useOssInit as fe } from "../hooks/useOss.mjs";
5
+ import { fileMatchesAccept as me, getAcceptText as ge } from "../utils/accept.mjs";
6
+ import { message as c, Progress as he } from "@aplus-frontend/antdv";
7
+ import { DeleteOutlined as _e } from "@ant-design/icons-vue";
8
+ import I from "../assets/single-file-icon.png.mjs";
9
+ import { useLocale as ke } from "../../config-provider/hooks/use-locale.mjs";
10
10
  import { useNamespace as ye } from "../../config-provider/hooks/use-namespace.mjs";
11
- const De = ["accept"], Ue = {
11
+ const De = ["accept"], we = {
12
12
  key: 0,
13
13
  class: "state-un"
14
- }, Fe = ["src"], Ce = { class: "state-un-title" }, Ee = { class: "state-un-subtitle" }, Se = {
14
+ }, Ue = ["src"], Fe = { class: "state-un-title" }, Ce = { class: "state-un-subtitle" }, Ee = {
15
15
  key: 1,
16
16
  class: "state-ing"
17
- }, Ne = { class: "left" }, xe = ["src"], ze = { class: "center" }, Ae = { class: "center-progress" }, Ie = /* @__PURE__ */ le({
17
+ }, Se = { class: "left" }, Ne = ["src"], xe = { class: "center" }, ze = { class: "center-progress" }, qe = /* @__PURE__ */ ne({
18
18
  __name: "SingleFile",
19
- setup(be, { expose: G }) {
20
- const { t: s } = we(), { b: k } = ye("ap-upload-single-file"), { put: W, client: R } = fe(), w = o("theme"), H = o("dirName"), y = o("accept") || "*", D = o("maxSize") ?? 500, J = o("title") || s("ap.apUpload.clickOrDragUpload"), U = o("subTitle"), i = o("value"), F = o("needName"), u = o("uploadingCount"), B = o("beforeUpload"), M = o("customRequest"), K = o("getOssAccess"), Q = o("maxSizeErrorMsg"), X = o("acceptErrorMsg"), O = o("onRemove"), C = o("showUploadErrorMsg"), n = h(null);
21
- se(
19
+ setup(Ae, { expose: j }) {
20
+ const { t: s } = ke(), { b: _ } = ye("ap-upload-single-file"), { put: G, client: b } = ve(), k = o("theme"), W = o("dirName"), y = o("accept") || "*", D = o("maxSize") ?? 500, H = o("title") || s("ap.apUpload.clickOrDragUpload"), w = o("subTitle"), i = o("value"), U = o("needName"), u = o("uploadingCount"), R = o("beforeUpload"), B = o("customRequest"), J = o("getOssAccess"), K = o("maxSizeErrorMsg"), Q = o("acceptErrorMsg"), M = o("onRemove"), F = o("showUploadErrorMsg"), n = g(null);
21
+ le(
22
22
  () => i?.value,
23
23
  function(e) {
24
- n.value === null && e && P(e);
24
+ n.value === null && e && O(e);
25
25
  },
26
26
  { immediate: !0 }
27
27
  );
28
- function P(e) {
28
+ function O(e) {
29
29
  e ? setTimeout(() => {
30
- const a = ve(F, e);
30
+ const a = de(U, e);
31
31
  l.value = 3, n.value = new File([e], a, {}), i.value = e;
32
32
  }) : (l.value = 1, n.value = null, i.value = void 0);
33
33
  }
34
- G({ setValue: P });
35
- const l = h(1), v = h(0), f = h(null), T = re(() => n.value && i?.value);
36
- function Y() {
37
- l.value === 1 && f.value?.click();
34
+ j({ setValue: O });
35
+ const l = g(1), d = g(0), v = g(null), P = se(() => n.value && i?.value);
36
+ function X() {
37
+ l.value === 1 && v.value?.click();
38
38
  }
39
- function L(e) {
39
+ function T(e) {
40
40
  e.preventDefault(), e.stopPropagation();
41
41
  }
42
- function Z(e) {
42
+ function Y(e) {
43
43
  e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
44
44
  }
45
- function ee(e) {
46
- V(e);
45
+ function Z(e) {
46
+ L(e);
47
47
  }
48
- function ae(e) {
48
+ function ee(e) {
49
49
  if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
50
50
  return;
51
- var a = e.dataTransfer, m = [], $ = 0, q = a.files.length;
51
+ var a = e.dataTransfer, f = [], V = 0, $ = a.files.length;
52
52
  function p() {
53
- $ === q - 1 && ee(m), $++;
53
+ V === $ - 1 && Z(f), V++;
54
54
  }
55
55
  if (a.items !== void 0)
56
- for (var E = 0; E < a.items.length; E++) {
57
- var S = a.items[E];
58
- if (S.kind === "file" && S.webkitGetAsEntry().isFile) {
59
- var ne = S.getAsFile();
60
- m.push(ne), p();
56
+ for (var C = 0; C < a.items.length; C++) {
57
+ var E = a.items[C];
58
+ if (E.kind === "file" && E.webkitGetAsEntry().isFile) {
59
+ var oe = E.getAsFile();
60
+ f.push(oe), p();
61
61
  }
62
62
  }
63
63
  else
64
- for (let x = 0; x < q; x++) {
65
- var g = a.files[x];
66
- if (g.type)
67
- m.push(g), p();
64
+ for (let N = 0; N < $; N++) {
65
+ var m = a.files[N];
66
+ if (m.type)
67
+ f.push(m), p();
68
68
  else
69
69
  try {
70
- var N = new FileReader();
71
- N.readAsDataURL(g.slice(0, 3)), N.addEventListener(
70
+ var S = new FileReader();
71
+ S.readAsDataURL(m.slice(0, 3)), S.addEventListener(
72
72
  "load",
73
- function(d) {
74
- console.warn(d, "load"), m.push(g), p();
73
+ function() {
74
+ f.push(m), p();
75
75
  },
76
76
  !1
77
- ), N.addEventListener(
77
+ ), S.addEventListener(
78
78
  "error",
79
- function(d) {
80
- console.warn(d, "error"), c.warning(s("ap.apUpload.foldersNotSupported")), p();
79
+ function() {
80
+ c.warning(s("ap.apUpload.foldersNotSupported")), p();
81
81
  },
82
82
  !1
83
83
  );
84
- } catch (d) {
85
- console.warn(d), c.warning(s("ap.apUpload.foldersNotSupported")), p();
84
+ } catch {
85
+ c.warning(s("ap.apUpload.foldersNotSupported")), p();
86
86
  }
87
87
  }
88
88
  }
89
- async function te(e) {
89
+ async function ae(e) {
90
90
  const a = e.target;
91
- await V(a?.files), f.value && (f.value.value = "");
91
+ await L(a?.files), v.value && (v.value.value = "");
92
92
  }
93
- async function V(e) {
93
+ async function L(e) {
94
94
  if (e?.length) {
95
95
  if (e[0].size > D * 1024 * 1024) {
96
96
  c.warning(
97
- Q || s("ap.apUpload.maxUploadFileSize", {
97
+ K || s("ap.apUpload.maxUploadFileSize", {
98
98
  maxSize: D
99
99
  })
100
100
  );
101
101
  return;
102
102
  }
103
- if (!ge(e[0], y)) {
103
+ if (!me(e[0], y)) {
104
104
  c.warning(
105
- X || s("ap.apUpload.fileFormatNotSupported")
105
+ Q || s("ap.apUpload.fileFormatNotSupported")
106
106
  );
107
107
  return;
108
108
  }
109
- if (typeof B == "function" && await B(e[0]) === !1)
109
+ if (typeof R == "function" && await R(e[0]) === !1)
110
110
  return;
111
- if (n.value = e[0], l.value = 2, v.value = 0, u.value++, typeof M == "function") {
112
- M({
111
+ if (n.value = e[0], l.value = 2, d.value = 0, u.value++, typeof B == "function") {
112
+ B({
113
113
  onProgress: (a) => {
114
- v.value = a;
114
+ d.value = a;
115
115
  },
116
116
  onError: (a) => {
117
- C && c.warning(a || s("ap.apUpload.networkAnomaly")), l.value = 1, n.value = null, u.value--;
117
+ F && c.warning(a || s("ap.apUpload.networkAnomaly")), l.value = 1, n.value = null, u.value--;
118
118
  },
119
119
  onSuccess: (a) => {
120
- i.value = I(
121
- F,
120
+ i.value = q(
121
+ U,
122
122
  a,
123
123
  n.value.name
124
124
  ), l.value = 3, u.value--;
@@ -128,98 +128,98 @@ const De = ["accept"], Ue = {
128
128
  return;
129
129
  }
130
130
  try {
131
- await me(K), W({
131
+ await fe(J), G({
132
132
  file: n.value,
133
- dirName: H,
134
- oss: R,
133
+ dirName: W,
134
+ oss: b,
135
135
  successCallBack(a) {
136
- i.value = I(
137
- F,
136
+ i.value = q(
137
+ U,
138
138
  a,
139
139
  n.value.name
140
140
  ), l.value = 3, u.value--;
141
141
  },
142
142
  errorCallBack(a) {
143
- C && c.warning(a || s("ap.apUpload.networkAnomaly")), l.value = 1, n.value = null, u.value--;
143
+ F && c.warning(a || s("ap.apUpload.networkAnomaly")), l.value = 1, n.value = null, u.value--;
144
144
  },
145
145
  progressCallBack(a) {
146
- v.value = a;
146
+ d.value = a;
147
147
  }
148
148
  });
149
149
  } catch (a) {
150
- C && c.warning(
150
+ F && c.warning(
151
151
  typeof a?.message == "string" ? a.message : s("ap.apUpload.networkAnomaly")
152
152
  ), l.value = 1, n.value = null, u.value--;
153
153
  }
154
154
  }
155
155
  }
156
- function oe() {
157
- O && O?.(n.value), n.value && !i?.value && R.pauseUpload(), l.value = 1, n.value = null, i.value = void 0;
156
+ function te() {
157
+ M && M?.(n.value), n.value && !i?.value && b.pauseUpload(), l.value = 1, n.value = null, i.value = void 0;
158
158
  }
159
- return (e, a) => (_(), z("div", {
160
- class: ie({
161
- [t(k)()]: !0,
162
- [t(k)("admin")]: t(w) === "admin",
163
- [t(k)("un")]: l.value === 1
159
+ return (e, a) => (h(), x("div", {
160
+ class: re({
161
+ [t(_)()]: !0,
162
+ [t(_)("admin")]: t(k) === "admin",
163
+ [t(_)("un")]: l.value === 1
164
164
  }),
165
- onClick: Y,
166
- onDragenter: L,
167
- onDragover: Z,
168
- onDragleave: L,
169
- onDrop: ae
165
+ onClick: X,
166
+ onDragenter: T,
167
+ onDragover: Y,
168
+ onDragleave: T,
169
+ onDrop: ee
170
170
  }, [
171
171
  r("input", {
172
172
  ref_key: "fileRef",
173
- ref: f,
173
+ ref: v,
174
174
  style: { display: "none" },
175
175
  type: "file",
176
176
  accept: t(y),
177
- onChange: te
177
+ onChange: ae
178
178
  }, null, 40, De),
179
- l.value === 1 ? (_(), z("div", Ue, [
179
+ l.value === 1 ? (h(), x("div", we, [
180
180
  r("img", {
181
181
  class: "state-un-icon",
182
- src: t(j)
183
- }, null, 8, Fe),
184
- r("div", Ce, b(t(J)), 1),
185
- r("div", Ee, b(typeof t(U) == "string" && t(U).length > 0 ? t(U) : `${t(s)("ap.apUpload.supportExtension")}:${t(he)(
182
+ src: t(I)
183
+ }, null, 8, Ue),
184
+ r("div", Fe, A(t(H)), 1),
185
+ r("div", Ce, A(typeof t(w) == "string" && t(w).length > 0 ? t(w) : `${t(s)("ap.apUpload.supportExtension")}:${t(ge)(
186
186
  t(y)
187
187
  )},${t(s)("ap.apUpload.maxWarnUploadFileSize", {
188
188
  maxSize: t(D)
189
189
  })}`), 1)
190
- ])) : A("", !0),
191
- [2, 3].includes(l.value) ? (_(), z("div", Se, [
192
- r("div", Ne, [
193
- r("img", { src: t(j) }, null, 8, xe)
190
+ ])) : z("", !0),
191
+ [2, 3].includes(l.value) ? (h(), x("div", Ee, [
192
+ r("div", Se, [
193
+ r("img", { src: t(I) }, null, 8, Ne)
194
194
  ]),
195
- r("div", ze, [
195
+ r("div", xe, [
196
196
  r("div", {
197
197
  class: "center-title",
198
- style: ce({
199
- color: T.value ? "#0070FF" : "#182948"
198
+ style: ie({
199
+ color: P.value ? "#0070FF" : "#182948"
200
200
  })
201
- }, b(n.value?.name), 5),
202
- r("div", Ae, [
203
- T.value ? A("", !0) : (_(), ue(t(_e), {
201
+ }, A(n.value?.name), 5),
202
+ r("div", ze, [
203
+ P.value ? z("", !0) : (h(), ce(t(he), {
204
204
  key: 0,
205
- percent: v.value,
205
+ percent: d.value,
206
206
  size: 4,
207
207
  "show-info": !1,
208
- "trail-color": t(w) === "admin" ? "#D9D9D9" : "#DEE4ED",
209
- "stroke-color": t(w) === "admin" ? "#34B77C" : "#0070FF"
208
+ "trail-color": t(k) === "admin" ? "#D9D9D9" : "#DEE4ED",
209
+ "stroke-color": t(k) === "admin" ? "#34B77C" : "#0070FF"
210
210
  }, null, 8, ["percent", "trail-color", "stroke-color"]))
211
211
  ])
212
212
  ]),
213
213
  r("div", {
214
214
  class: "right",
215
- onClick: pe(oe, ["stop"])
215
+ onClick: ue(te, ["stop"])
216
216
  }, [
217
- de(t(ke))
217
+ pe(t(_e))
218
218
  ])
219
- ])) : A("", !0)
219
+ ])) : z("", !0)
220
220
  ], 34));
221
221
  }
222
222
  });
223
223
  export {
224
- Ie as default
224
+ qe as default
225
225
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as x, computed as u, ref as O, createElementBlock as A, openBlock as r, mergeProps as T, unref as e, renderSlot as c, createCommentVNode as k, createVNode as p, withCtx as d, createElementVNode as n, normalizeClass as i, createBlock as C, Fragment as S, renderList as V, createSlots as D, createTextVNode as j, toDisplayString as P } from "vue";
1
+ import { defineComponent as x, computed as u, ref as O, createElementBlock as A, openBlock as r, mergeProps as T, unref as e, renderSlot as c, createCommentVNode as N, createVNode as p, withCtx as d, createElementVNode as n, normalizeClass as i, createBlock as k, Fragment as S, renderList as V, createSlots as D, createTextVNode as j, toDisplayString as P } from "vue";
2
2
  import G from "./icons/file-icon.vue.mjs";
3
- import { Tooltip as M, TypographyText as U, Empty as F } from "@aplus-frontend/antdv";
3
+ import { Tooltip as M, TypographyText as U, Empty as $ } from "@aplus-frontend/antdv";
4
4
  import { IconVariantDownload as z } from "@aplus-frontend/icon";
5
5
  import { LoadingOutlined as R } from "@ant-design/icons-vue";
6
6
  import "../ap-title/ApTitle.vue.mjs";
@@ -9,7 +9,7 @@ import "../../config-provider/index.mjs";
9
9
  import { getFileInfo as q } from "./utils/index.mjs";
10
10
  import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
11
11
  import { useLocale as J } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useGlobalConfig as $ } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useGlobalConfig as h } from "../../config-provider/hooks/use-global-config.mjs";
13
13
  import K from "../ap-title/ApTitle.vue2.mjs";
14
14
  import Q from "../../ap-download/ap-download.vue.mjs";
15
15
  const W = ["onClick"], fe = /* @__PURE__ */ x({
@@ -23,13 +23,16 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
23
23
  column: { default: 2 },
24
24
  isFileAreaBorder: { type: Boolean, default: !1 }
25
25
  },
26
- setup(h) {
27
- const { b: w, e: l, em: N } = H("ap-appendix"), { t: v } = J(), a = h, E = $("apUpload"), _ = $(
26
+ setup(w) {
27
+ const { b: E, e: l, em: C } = H("ap-appendix"), { t: v } = J(), a = w, _ = h("apUpload"), F = h(
28
28
  "downloadCenterTriggerConfig"
29
29
  ), f = u(
30
- () => q(a?.needName, a?.fileList ?? [])
30
+ () => q(
31
+ a?.needName ?? _?.value?.needName,
32
+ a?.fileList ?? []
33
+ )
31
34
  ), B = u(
32
- () => a.getOssAccess || E.value?.getOssAccess
35
+ () => a.getOssAccess || _.value?.getOssAccess
33
36
  ), g = u(
34
37
  () => !(Array.isArray(f.value) && f.value.length)
35
38
  ), o = O([]), I = u(() => a.title || v("ap.apAppendix.appendix"));
@@ -37,12 +40,12 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
37
40
  if (!(o.value.findIndex((t) => t === m) > -1)) {
38
41
  o.value = [...o.value, m];
39
42
  try {
40
- if (_.value?.trigger) {
43
+ if (F.value?.trigger) {
41
44
  let t = [s].map((L) => ({
42
45
  objectName: L.path,
43
46
  fileName: L.fileName
44
47
  }));
45
- await _.value?.trigger(t);
48
+ await F.value?.trigger(t);
46
49
  }
47
50
  } finally {
48
51
  o.value = o.value.filter((t) => t !== m);
@@ -50,7 +53,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
50
53
  }
51
54
  }
52
55
  return (s, m) => (r(), A("div", T({
53
- class: [e(w)()]
56
+ class: [e(E)()]
54
57
  }, {
55
58
  ...s.$attrs
56
59
  }, {
@@ -75,7 +78,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
75
78
  c(s.$slots, "titleDownloadAllBtn", {
76
79
  fileList: a.fileList
77
80
  }, () => [
78
- g.value ? k("", !0) : (r(), C(Q, {
81
+ g.value ? N("", !0) : (r(), k(Q, {
79
82
  key: 0,
80
83
  class: i([e(l)("download-all")]),
81
84
  text: e(v)("ap.apAppendix.downloadAll"),
@@ -93,14 +96,14 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
93
96
  _: 3
94
97
  }, 8, ["title", "help-message"])
95
98
  ]),
96
- g.value ? k("", !0) : c(s.$slots, "fileArea", {
99
+ g.value ? N("", !0) : c(s.$slots, "fileArea", {
97
100
  key: 0,
98
101
  fileList: a.fileList
99
102
  }, () => [
100
103
  n("div", {
101
104
  class: i({
102
105
  [e(l)("file-area")]: !0,
103
- [e(N)("file-area", "border")]: !!a.isFileAreaBorder
106
+ [e(C)("file-area", "border")]: !!a.isFileAreaBorder
104
107
  })
105
108
  }, [
106
109
  n("div", {
@@ -110,7 +113,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
110
113
  key: t,
111
114
  class: i({
112
115
  [e(l)("file-area-content-item")]: !0,
113
- [e(N)("file-area-content-item", "loading")]: o.value.includes(t)
116
+ [e(C)("file-area-content-item", "loading")]: o.value.includes(t)
114
117
  })
115
118
  }, [
116
119
  p(e(M), null, D({
@@ -125,7 +128,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
125
128
  n("div", {
126
129
  class: i([e(l)("file-area-content-item-icon")])
127
130
  }, [
128
- o.value.includes(t) ? (r(), C(e(R), { key: 0 })) : (r(), C(G, { key: 1 }))
131
+ o.value.includes(t) ? (r(), k(e(R), { key: 0 })) : (r(), k(G, { key: 1 }))
129
132
  ], 2),
130
133
  n("div", {
131
134
  class: i([e(l)("file-area-content-item-file-name")])
@@ -158,12 +161,12 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
158
161
  n("div", {
159
162
  class: i([e(l)("empty-content")])
160
163
  }, [
161
- p(e(F), {
162
- image: e(F).PRESENTED_IMAGE_SIMPLE
164
+ p(e($), {
165
+ image: e($).PRESENTED_IMAGE_SIMPLE
163
166
  }, null, 8, ["image"])
164
167
  ], 2)
165
168
  ], 2)
166
- ]) : k("", !0)
169
+ ]) : N("", !0)
167
170
  ], 16));
168
171
  }
169
172
  });
@@ -2,28 +2,29 @@ import { defineComponent as M, ref as C, useSlots as U, computed as n, cloneVNod
2
2
  import { Tooltip as B, Popover as G } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
4
  import { ApAttachmentProps as H } from "./constans.mjs";
5
- import { getHexWithOpacity as R, getFileInfo as y } from "../../ap-download/utils/getFileInfo.mjs";
5
+ import { getHexWithOpacity as R, getFileInfo as w } from "../../ap-download/utils/getFileInfo.mjs";
6
6
  import { useOssInit as W } from "../../ap-download/hooks/index.mjs";
7
7
  import { debounce as q, isArray as D } from "lodash-unified";
8
8
  import { LoadingOutlined as v } from "@ant-design/icons-vue";
9
- import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
9
+ import { warning as E } from "../../utils/warning.mjs";
10
+ import { useNamespace as J } from "../../config-provider/hooks/use-namespace.mjs";
10
11
  import { useGlobalConfig as g } from "../../config-provider/hooks/use-global-config.mjs";
11
- import { useLocale as J } from "../../config-provider/hooks/use-locale.mjs";
12
- const ie = /* @__PURE__ */ M({
12
+ import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
13
+ const se = /* @__PURE__ */ M({
13
14
  name: "ApAttachment",
14
15
  props: H(),
15
16
  setup(e) {
16
17
  const {
17
- b: F,
18
+ b: y,
18
19
  e: l
19
- } = E("ap-attachment"), w = g("uiMode"), b = g("apUpload"), h = g("downloadCenterTriggerConfig"), {
20
+ } = J("ap-attachment"), F = g("uiMode"), b = g("apUpload"), h = g("downloadCenterTriggerConfig"), {
20
21
  lang: O,
21
22
  t: r
22
- } = J(), i = C(!1), c = C(""), m = U(), T = n(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), u = n(() => e.attachmentList.length === 1), N = n(() => e.needName ? e.attachmentList.length > 0 && e.needName && e.needName.nameKey ? e.attachmentList[0][e.needName.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), x = n(() => u.value ? N.value : r("ap.apAttachment.downloadall")), p = n(() => e.color ? e.color : w.value === "aplus" ? "#0070FF" : "#1890FF"), P = n(() => ({
23
+ } = Q(), i = C(!1), c = C(""), m = U(), T = n(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), u = n(() => e.attachmentList.length === 1), p = n(() => e.needName ? e.attachmentList.length > 0 && e.needName && e.needName.nameKey ? e.attachmentList[0][e.needName.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), x = n(() => u.value ? p.value : r("ap.apAttachment.downloadall")), N = n(() => e.color ? e.color : F.value === "aplus" ? "#0070FF" : "#1890FF"), P = n(() => ({
23
24
  width: u.value ? "auto" : "266px"
24
25
  })), A = n(() => ({
25
- "--download-main-color": p.value,
26
- "--download-main-color-opacity": R(p.value, 0.6)
26
+ "--download-main-color": N.value,
27
+ "--download-main-color-opacity": R(N.value, 0.6)
27
28
  })), k = n(() => e.getOssAccess || b.value?.getOssAccess), S = n(() => {
28
29
  const a = m.default ? m.default()[0] : null;
29
30
  return a ? _(a, {
@@ -37,15 +38,15 @@ const ie = /* @__PURE__ */ M({
37
38
  try {
38
39
  const o = D(f(a)) ? f(a) : [f(a)];
39
40
  if (h.value?.trigger) {
40
- const I = y(e.needName, o).map((L) => ({
41
+ const I = w(e.needName, o).map((L) => ({
41
42
  objectName: L.path,
42
43
  fileName: L.fileName
43
44
  }));
44
45
  h.value?.trigger(I);
45
46
  } else
46
- await (await W(k.value, j(T))).downloadFile(y(e.needName, o));
47
+ await (await W(k.value, j(T))).downloadFile(w(e.needName, o));
47
48
  } catch (o) {
48
- console.error(o);
49
+ E(!1, o);
49
50
  } finally {
50
51
  i.value = !1, c.value = "";
51
52
  }
@@ -70,7 +71,7 @@ const ie = /* @__PURE__ */ M({
70
71
  spin: !0
71
72
  }, null)]) : null, r("ap.apAttachment.downloadall")])]) : null;
72
73
  return () => e.attachmentList?.length > 0 && t("div", {
73
- class: [F()],
74
+ class: [y()],
74
75
  style: [P.value, A.value]
75
76
  }, [t(B, {
76
77
  title: x.value,
@@ -88,7 +89,7 @@ const ie = /* @__PURE__ */ M({
88
89
  class: [l("text-render")]
89
90
  }, [S.value, K(" ")]) : null, t("div", {
90
91
  class: [l("text-inner")]
91
- }, [N.value])])]
92
+ }, [p.value])])]
92
93
  }), t(G, {
93
94
  content: V(e.attachmentList),
94
95
  placement: e.fileMorePopoverPlacement,
@@ -101,5 +102,5 @@ const ie = /* @__PURE__ */ M({
101
102
  }
102
103
  });
103
104
  export {
104
- ie as default
105
+ se as default
105
106
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, Text as f, isVNode as y, computed as m, createVNode as r, Fragment as b } from "vue";
1
+ import { defineComponent as b, Text as f, isVNode as y, computed as m, createVNode as r, Fragment as k } from "vue";
2
2
  import { ApCopyProps as T } from "./constans.mjs";
3
3
  import { IconApAdLineCopy as h } from "@aplus-frontend/icon";
4
4
  import "../../config-provider/index.mjs";
@@ -6,24 +6,23 @@ import { message as d } from "@aplus-frontend/antdv";
6
6
  import { isNull as P, isUndefined as j, isString as A, isBoolean as N } from "lodash-unified";
7
7
  import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
8
8
  import { useLocale as w } from "../../config-provider/hooks/use-locale.mjs";
9
- const D = /* @__PURE__ */ C({
9
+ const D = /* @__PURE__ */ b({
10
10
  name: "CopyBtn",
11
11
  props: T(),
12
12
  setup(e, {
13
13
  slots: p
14
14
  }) {
15
- console.log("props.link", e.link);
16
15
  const {
17
16
  b: x,
18
17
  e: l,
19
18
  m: a
20
19
  } = V("ap-copy"), {
21
20
  t: s
22
- } = w(), g = (t, n, k) => {
21
+ } = w(), g = (t, n, C) => {
23
22
  t.stopPropagation(), t.preventDefault(), t.stopImmediatePropagation(), navigator.clipboard.writeText(e.text || c() || "").then(() => {
24
23
  d.success(n || s("ap.apCopy.copySuccess"));
25
24
  }).catch(() => {
26
- d.error(k || s("ap.apCopy.copyError"));
25
+ d.error(C || s("ap.apCopy.copyError"));
27
26
  });
28
27
  }, v = (t) => {
29
28
  if (t.length === 1) {
@@ -57,7 +56,7 @@ const D = /* @__PURE__ */ C({
57
56
  };
58
57
  return {};
59
58
  }), i = m(() => c() || e.text || "");
60
- return () => r(b, null, [r("div", {
59
+ return () => r(k, null, [r("div", {
61
60
  class: [x()]
62
61
  }, [r("div", {
63
62
  class: [l("text"), typeof o.value == "string" && a(o.value)],