@aplus-frontend/ui 7.10.4 → 7.10.6

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 (59) hide show
  1. package/es/src/ap-field/interface.d.ts +1 -1
  2. package/es/src/ap-field/slider/index.vue.d.ts +196 -412
  3. package/es/src/ap-field/slider/index.vue.mjs +50 -39
  4. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +68 -67
  5. package/es/src/business/ap-attachment/ApAttachment.d.ts +2 -8
  6. package/es/src/business/ap-attachment/ApAttachment.mjs +46 -40
  7. package/es/src/business/ap-attachment/constans.d.ts +1 -4
  8. package/es/src/business/ap-attachment/constans.mjs +3 -6
  9. package/es/src/business/ap-attachment/index.d.ts +3 -12
  10. package/es/src/business/ap-ladder/components/RenderValue.mjs +25 -22
  11. package/es/src/business/ap-ladder/utils.d.ts +1 -0
  12. package/es/src/business/ap-ladder/utils.mjs +10 -9
  13. package/es/src/business/ap-title/ApTitle.vue.d.ts +1 -1
  14. package/es/src/business/ap-title/index.d.ts +3 -3
  15. package/es/src/business/ap-title/interface.d.ts +1 -1
  16. package/es/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  17. package/es/src/business/ap-upload/apUpload.vue.mjs +22 -18
  18. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +128 -123
  19. package/es/src/business/ap-upload/components/Picture.vue2.mjs +150 -147
  20. package/es/src/business/ap-upload/components/SingleFile.vue2.mjs +130 -127
  21. package/es/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  22. package/es/src/business/ap-upload/hooks/useOss.mjs +52 -51
  23. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +11 -10
  24. package/es/src/business/ap-upload-file/hook/useOss.d.ts +6 -1
  25. package/es/src/business/ap-upload-file/hook/useOss.mjs +19 -16
  26. package/es/src/business/ap-upload-file/interface.d.ts +3 -1
  27. package/es/src/business/ap-upload-file/utils/upload.mjs +22 -20
  28. package/es/src/version.d.ts +1 -1
  29. package/es/src/version.mjs +1 -1
  30. package/lib/src/ap-field/interface.d.ts +1 -1
  31. package/lib/src/ap-field/slider/index.vue.d.ts +196 -412
  32. package/lib/src/ap-field/slider/index.vue.js +1 -1
  33. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  34. package/lib/src/business/ap-attachment/ApAttachment.d.ts +2 -8
  35. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  36. package/lib/src/business/ap-attachment/constans.d.ts +1 -4
  37. package/lib/src/business/ap-attachment/constans.js +1 -1
  38. package/lib/src/business/ap-attachment/index.d.ts +3 -12
  39. package/lib/src/business/ap-ladder/components/RenderValue.js +1 -1
  40. package/lib/src/business/ap-ladder/utils.d.ts +1 -0
  41. package/lib/src/business/ap-ladder/utils.js +1 -1
  42. package/lib/src/business/ap-title/ApTitle.vue.d.ts +1 -1
  43. package/lib/src/business/ap-title/index.d.ts +3 -3
  44. package/lib/src/business/ap-title/interface.d.ts +1 -1
  45. package/lib/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  46. package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
  47. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  48. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  49. package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -1
  50. package/lib/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  51. package/lib/src/business/ap-upload/hooks/useOss.js +1 -1
  52. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  53. package/lib/src/business/ap-upload-file/hook/useOss.d.ts +6 -1
  54. package/lib/src/business/ap-upload-file/hook/useOss.js +1 -1
  55. package/lib/src/business/ap-upload-file/interface.d.ts +3 -1
  56. package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
  57. package/lib/src/version.d.ts +1 -1
  58. package/lib/src/version.js +1 -1
  59. package/package.json +3 -3
@@ -1,65 +1,76 @@
1
- import { defineComponent as B, useSlots as x, shallowRef as g, computed as k, unref as t, createElementBlock as C, createBlock as S, openBlock as n, Fragment as _, createTextVNode as h, toDisplayString as P, mergeProps as T, createSlots as V, renderList as b, withCtx as R, renderSlot as F, normalizeProps as U, guardReactiveProps as A } from "vue";
2
- import { Slider as $ } from "@aplus-frontend/antdv";
3
- import { isNil as w, isArray as N, omit as z } from "lodash-unified";
1
+ import { defineComponent as B, useSlots as x, shallowRef as C, computed as b, unref as t, createElementBlock as g, createBlock as k, openBlock as n, Fragment as F, createTextVNode as S, toDisplayString as h, mergeProps as T, createSlots as V, renderList as _, withCtx as P, renderSlot as R, normalizeProps as N, guardReactiveProps as U } from "vue";
2
+ import { Slider as A } from "@aplus-frontend/antdv";
3
+ import { isNil as H, isArray as L, omit as $ } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
- import { useControllableValue as D } from "../../hooks/useControllableValue.mjs";
6
- const I = /* @__PURE__ */ B({
5
+ import { useControllableValue as w } from "../../hooks/useControllableValue.mjs";
6
+ const G = /* @__PURE__ */ B({
7
7
  name: "ApFieldSlider",
8
8
  __name: "index",
9
9
  props: {
10
10
  mode: {},
11
11
  class: {},
12
12
  style: {},
13
- id: {},
13
+ range: { type: [Boolean, Object] },
14
+ value: {},
15
+ defaultValue: {},
16
+ onChange: {},
17
+ "onUpdate:value": {},
18
+ onAfterChange: {},
19
+ onChangeComplete: {},
20
+ handleStyle: {},
21
+ trackStyle: {},
14
22
  prefixCls: {},
15
- tooltipPrefixCls: {},
16
- range: {},
17
23
  reverse: { type: Boolean },
18
24
  min: { default: 0 },
19
25
  max: { default: 100 },
20
26
  step: { default: 1 },
21
27
  marks: {},
22
28
  dots: { type: Boolean },
23
- value: {},
24
- defaultValue: {},
25
29
  included: { type: Boolean, default: !0 },
26
30
  disabled: { type: Boolean, default: void 0 },
31
+ keyboard: { type: Boolean },
27
32
  vertical: { type: Boolean },
33
+ className: {},
34
+ rootClassName: {},
35
+ id: {},
36
+ tooltip: {},
37
+ autoFocus: { type: Boolean },
38
+ styles: {},
39
+ classNames: {},
40
+ onFocus: {},
41
+ onBlur: {},
42
+ tooltipPrefixCls: {},
28
43
  tipFormatter: {},
29
- tooltipOpen: { type: Boolean, default: void 0 },
30
44
  tooltipVisible: { type: Boolean, default: void 0 },
31
- tooltipPlacement: {},
32
45
  getTooltipPopupContainer: {},
33
- autofocus: { type: Boolean },
34
- handleStyle: {},
35
- trackStyle: {},
36
- onChange: {},
37
- onAfterChange: {},
38
- onFocus: {},
39
- onBlur: {},
40
- "onUpdate:value": {},
46
+ tooltipPlacement: {},
47
+ tabIndex: {},
48
+ ariaLabelForHandle: {},
49
+ ariaLabelledByForHandle: {},
50
+ ariaRequired: { type: Boolean },
51
+ ariaValueTextFormatterForHandle: {},
41
52
  emptyText: { default: "--" }
42
53
  },
43
54
  emits: ["update:value"],
44
- setup(u, { expose: s, emit: i }) {
45
- const p = x(), o = g(), l = u, d = i, { value: a, updateValue: f } = D(l, d), m = k(() => {
46
- const e = t(a);
47
- return w(e) ? l.emptyText : N(e) ? `${e[0]}-${e[1]}` : e;
55
+ setup(s, { expose: u, emit: i }) {
56
+ const p = x(), o = C(), a = s, d = i, { value: l, updateValue: m } = w(a, d), c = b(() => {
57
+ const e = t(l);
58
+ return H(e) ? a.emptyText : L(e) ? `${e[0]}-${e[1]}` : e;
48
59
  });
49
- function c() {
60
+ function f() {
50
61
  o.value?.focus?.();
51
62
  }
52
- function v() {
63
+ function y() {
53
64
  o.value?.blur?.();
54
65
  }
55
- return s({
56
- focus: c,
57
- blur: v
58
- }), (e, E) => e.mode === "read" ? (n(), C(_, { key: 0 }, [
59
- h(P(m.value), 1)
60
- ], 64)) : (n(), S(t($), T(
66
+ return u({
67
+ focus: f,
68
+ blur: y
69
+ }), (e, j) => e.mode === "read" ? (n(), g(F, { key: 0 }, [
70
+ S(h(c.value), 1)
71
+ ], 64)) : (n(), k(t(A), T(
61
72
  { key: 1 },
62
- t(z)(l, [
73
+ t($)(a, [
63
74
  "value",
64
75
  "onUpdate:value",
65
76
  "mode",
@@ -69,19 +80,19 @@ const I = /* @__PURE__ */ B({
69
80
  {
70
81
  ref_key: "sliderRef",
71
82
  ref: o,
72
- value: t(a),
73
- "onUpdate:value": t(f)
83
+ value: t(l),
84
+ "onUpdate:value": t(m)
74
85
  }
75
86
  ), V({ _: 2 }, [
76
- b(p, (L, r) => ({
87
+ _(p, (q, r) => ({
77
88
  name: r,
78
- fn: R((y) => [
79
- F(e.$slots, r, U(A(y || {})))
89
+ fn: P((v) => [
90
+ R(e.$slots, r, N(U(v || {})))
80
91
  ])
81
92
  }))
82
93
  ]), 1040, ["value", "onUpdate:value"]));
83
94
  }
84
95
  });
85
96
  export {
86
- I as default
97
+ G as default
87
98
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, computed as d, ref as S, createElementBlock as L, openBlock as r, mergeProps as T, unref as e, renderSlot as c, createCommentVNode as C, createVNode as p, withCtx as u, createElementVNode as n, normalizeClass as i, createBlock as N, Fragment as V, renderList as D, createSlots as j, createTextVNode as P, toDisplayString as G } from "vue";
1
+ import { defineComponent as O, computed as f, ref as S, 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 s, normalizeClass as i, createBlock as C, Fragment as V, renderList as D, createSlots as j, createTextVNode as P, toDisplayString as G } from "vue";
2
2
  import { LoadingOutlined as M } from "@ant-design/icons-vue";
3
3
  import { Tooltip as U, TypographyText as z, Empty as $ } from "@aplus-frontend/antdv";
4
4
  import { IconVariantDownload as R, IconApAdLineCloseAttachments as q } from "@aplus-frontend/icon";
@@ -24,114 +24,115 @@ const Y = ["onClick"], de = /* @__PURE__ */ O({
24
24
  isFileAreaBorder: { type: Boolean, default: !1 }
25
25
  },
26
26
  setup(E) {
27
- const { b: F, e: l, em: k } = K("ap-appendix"), { t: v } = Q(), I = H("ap-appendix"), a = E, h = w("apUpload"), _ = w(
27
+ const { b: F, e: a, em: k } = K("ap-appendix"), { t: u } = Q(), I = H("ap-appendix"), t = E, h = w("apUpload"), _ = w(
28
28
  "downloadCenterTriggerConfig"
29
- ), m = d(
29
+ ), v = f(
30
30
  () => J(
31
- a?.needName ?? h?.value?.needName,
32
- a?.fileList ?? []
31
+ t?.needName ?? h?.value?.needName,
32
+ t?.fileList ?? []
33
33
  )
34
- ), x = d(
35
- () => a.getOssAccess || h.value?.getOssAccess
36
- ), g = d(
37
- () => !(Array.isArray(m.value) && m.value.length)
38
- ), o = S([]), B = d(() => a.title || v("ap.apAppendix.appendix"));
39
- async function b(s, f) {
40
- if (!(o.value.findIndex((t) => t === f) > -1)) {
41
- o.value = [...o.value, f];
34
+ ), x = f(
35
+ () => t.getOssAccess || h.value?.getOssAccess
36
+ ), g = f(
37
+ () => !(Array.isArray(v.value) && v.value.length)
38
+ ), o = S([]), B = f(() => t.title || u("ap.apAppendix.appendix"));
39
+ async function b(n, m) {
40
+ if (!(o.value.findIndex((l) => l === m) > -1)) {
41
+ o.value = [...o.value, m];
42
42
  try {
43
43
  if (_.value?.trigger) {
44
- let t = [s].map((A) => ({
45
- objectName: A.path,
46
- fileName: A.fileName
44
+ let l = [n].map((L) => ({
45
+ objectName: L.path,
46
+ fileName: L.fileName
47
47
  }));
48
- await _.value?.trigger(t);
48
+ await _.value?.trigger(l);
49
49
  }
50
50
  } finally {
51
- o.value = o.value.filter((t) => t !== f);
51
+ o.value = o.value.filter((l) => l !== m);
52
52
  }
53
53
  }
54
54
  }
55
- return (s, f) => (r(), L("div", T({
55
+ return (n, m) => (r(), A("div", T({
56
56
  class: [e(F)(), e(I)]
57
57
  }, {
58
- ...s.$attrs
58
+ ...n.$attrs
59
59
  }, {
60
60
  style: {
61
- "--ap-appendix-column": `repeat(${Number(a?.column || 2)}, 1fr)`
61
+ "--ap-appendix-column": `repeat(${Number(t?.column || 2)}, 1fr)`
62
62
  }
63
63
  }), [
64
- c(s.$slots, "title", {
65
- fileList: a.fileList
64
+ c(n.$slots, "title", {
65
+ fileList: t.fileList
66
66
  }, () => [
67
67
  p(W, {
68
68
  title: B.value,
69
- "help-message": a?.tooltip
69
+ "help-message": t?.tooltip
70
70
  }, {
71
- suffix: u(() => [
72
- n("div", {
73
- class: i([e(l)("suffix")])
71
+ suffix: d(() => [
72
+ s("div", {
73
+ class: i([e(a)("suffix")])
74
74
  }, [
75
- c(s.$slots, "titleSuffix", {
76
- fileList: a.fileList
75
+ c(n.$slots, "titleSuffix", {
76
+ fileList: t.fileList
77
77
  }),
78
- c(s.$slots, "titleDownloadAllBtn", {
79
- fileList: a.fileList
78
+ c(n.$slots, "titleDownloadAllBtn", {
79
+ fileList: t.fileList
80
80
  }, () => [
81
- g.value ? C("", !0) : (r(), N(X, {
81
+ g.value ? N("", !0) : (r(), C(X, {
82
82
  key: 0,
83
- class: i([e(l)("download-all")]),
84
- text: e(v)("ap.apAppendix.downloadAll"),
83
+ class: i([e(a)("download-all")]),
84
+ text: e(u)("ap.apAppendix.downloadAll"),
85
85
  "get-oss-access": x.value,
86
- "file-name": m.value
86
+ "file-name": t?.fileList ?? [],
87
+ "need-name": t.needName
87
88
  }, {
88
- icon: u(() => [
89
+ icon: d(() => [
89
90
  p(e(R))
90
91
  ]),
91
92
  _: 1
92
- }, 8, ["class", "text", "get-oss-access", "file-name"]))
93
+ }, 8, ["class", "text", "get-oss-access", "file-name", "need-name"]))
93
94
  ])
94
95
  ], 2)
95
96
  ]),
96
97
  _: 3
97
98
  }, 8, ["title", "help-message"])
98
99
  ]),
99
- g.value ? C("", !0) : c(s.$slots, "fileArea", {
100
+ g.value ? N("", !0) : c(n.$slots, "fileArea", {
100
101
  key: 0,
101
- fileList: a.fileList
102
+ fileList: t.fileList
102
103
  }, () => [
103
- n("div", {
104
+ s("div", {
104
105
  class: i({
105
- [e(l)("file-area")]: !0,
106
- [e(k)("file-area", "border")]: !!a.isFileAreaBorder
106
+ [e(a)("file-area")]: !0,
107
+ [e(k)("file-area", "border")]: !!t.isFileAreaBorder
107
108
  })
108
109
  }, [
109
- n("div", {
110
- class: i([e(l)("file-area-content")])
110
+ s("div", {
111
+ class: i([e(a)("file-area-content")])
111
112
  }, [
112
- (r(!0), L(V, null, D(m.value, (y, t) => (r(), L("div", {
113
- key: t,
113
+ (r(!0), A(V, null, D(v.value, (y, l) => (r(), A("div", {
114
+ key: l,
114
115
  class: i({
115
- [e(l)("file-area-content-item")]: !0,
116
- [e(k)("file-area-content-item", "loading")]: o.value.includes(t)
116
+ [e(a)("file-area-content-item")]: !0,
117
+ [e(k)("file-area-content-item", "loading")]: o.value.includes(l)
117
118
  })
118
119
  }, [
119
120
  p(e(U), null, j({
120
- default: u(() => [
121
- n("div", {
121
+ default: d(() => [
122
+ s("div", {
122
123
  class: i({
123
- [e(l)("file-area-content-item-content")]: !0,
124
- [e(l)("file-area-content-item--loading-content")]: o.value.includes(t)
124
+ [e(a)("file-area-content-item-content")]: !0,
125
+ [e(a)("file-area-content-item--loading-content")]: o.value.includes(l)
125
126
  }),
126
- onClick: (A) => b(y, t)
127
+ onClick: (L) => b(y, l)
127
128
  }, [
128
- n("div", {
129
- class: i([e(l)("file-area-content-item-icon")])
129
+ s("div", {
130
+ class: i([e(a)("file-area-content-item-icon")])
130
131
  }, [
131
- o.value.includes(t) ? (r(), N(e(M), { key: 0 })) : (r(), N(e(q), { key: 1 }))
132
+ o.value.includes(l) ? (r(), C(e(M), { key: 0 })) : (r(), C(e(q), { key: 1 }))
132
133
  ], 2),
133
- n("div", {
134
- class: i([e(l)("file-area-content-item-file-name")])
134
+ s("div", {
135
+ class: i([e(a)("file-area-content-item-file-name")])
135
136
  }, [
136
137
  p(e(z), {
137
138
  ellipsis: "",
@@ -142,10 +143,10 @@ const Y = ["onClick"], de = /* @__PURE__ */ O({
142
143
  ]),
143
144
  _: 2
144
145
  }, [
145
- o.value.includes(t) ? void 0 : {
146
+ o.value.includes(l) ? void 0 : {
146
147
  name: "title",
147
- fn: u(() => [
148
- P(G(e(v)("ap.apAppendix.downloadFile")), 1)
148
+ fn: d(() => [
149
+ P(G(e(u)("ap.apAppendix.downloadFile")), 1)
149
150
  ]),
150
151
  key: "0"
151
152
  }
@@ -154,19 +155,19 @@ const Y = ["onClick"], de = /* @__PURE__ */ O({
154
155
  ], 2)
155
156
  ], 2)
156
157
  ]),
157
- g.value ? c(s.$slots, "empty", { key: 1 }, () => [
158
- n("div", {
159
- class: i([e(l)("empty")])
158
+ g.value ? c(n.$slots, "empty", { key: 1 }, () => [
159
+ s("div", {
160
+ class: i([e(a)("empty")])
160
161
  }, [
161
- n("div", {
162
- class: i([e(l)("empty-content")])
162
+ s("div", {
163
+ class: i([e(a)("empty-content")])
163
164
  }, [
164
165
  p(e($), {
165
166
  image: e($).PRESENTED_IMAGE_SIMPLE
166
167
  }, null, 8, ["image"])
167
168
  ], 2)
168
169
  ], 2)
169
- ]) : C("", !0)
170
+ ]) : N("", !0)
170
171
  ], 16));
171
172
  }
172
173
  });
@@ -31,10 +31,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
31
31
  nameKey?: string;
32
32
  pathKey?: string;
33
33
  }>;
34
- default: () => {
35
- nameKey: string;
36
- pathKey: string;
37
- };
34
+ default: undefined;
38
35
  };
39
36
  getOssAccess: {
40
37
  type: PropType< ApAttachmentProps["getOssAccess"]>;
@@ -76,10 +73,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
76
73
  nameKey?: string;
77
74
  pathKey?: string;
78
75
  }>;
79
- default: () => {
80
- nameKey: string;
81
- pathKey: string;
82
- };
76
+ default: undefined;
83
77
  };
84
78
  getOssAccess: {
85
79
  type: PropType< ApAttachmentProps["getOssAccess"]>;
@@ -1,5 +1,5 @@
1
- import { defineComponent as W, ref as k, useSlots as _, computed as o, cloneVNode as j, toRaw as h, unref as K, createVNode as t, createTextVNode as R } from "vue";
2
- import { LoadingOutlined as g } from "@ant-design/icons-vue";
1
+ import { defineComponent as U, ref as k, useSlots as W, computed as o, cloneVNode as _, toRaw as g, unref as j, createVNode as t, createTextVNode as R } from "vue";
2
+ import { LoadingOutlined as p } from "@ant-design/icons-vue";
3
3
  import { Tooltip as B, Popover as G } from "@aplus-frontend/antdv";
4
4
  import { debounce as H, isArray as M } from "lodash-unified";
5
5
  import { useToken as q } from "../../config-provider/hooks/use-token.mjs";
@@ -12,44 +12,50 @@ import X from "./style/index.mjs";
12
12
  import { useNamespace as Y } from "../../config-provider/hooks/use-namespace.mjs";
13
13
  import { useGlobalConfig as T } from "../../config-provider/hooks/use-global-config.mjs";
14
14
  import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
15
- const fe = /* @__PURE__ */ W({
15
+ const fe = /* @__PURE__ */ U({
16
16
  name: "ApAttachment",
17
17
  props: Q(),
18
18
  setup(e, {
19
- emit: p
19
+ emit: N
20
20
  }) {
21
21
  const {
22
22
  b: x,
23
23
  e: a
24
- } = Y("ap-attachment"), L = X("ap-attachment"), C = T("apUpload"), N = T("downloadCenterTriggerConfig"), {
25
- token: w
24
+ } = Y("ap-attachment"), y = X("ap-attachment"), r = T("apUpload"), L = T("downloadCenterTriggerConfig"), {
25
+ token: C
26
26
  } = q(), {
27
27
  lang: O,
28
- t: m
29
- } = Z(), i = k(!1), c = k(""), d = _(), P = o(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), s = o(() => e.needName ?? C?.value?.needName), f = o(() => e.attachmentList.length === 1), y = o(() => s.value ? e.attachmentList.length > 0 && s.value && s.value?.nameKey ? e.attachmentList[0][s.value.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), I = o(() => f.value ? y.value : m("ap.apAttachment.downloadall")), A = o(() => ({
30
- "--download-main-color": w.value?.colorLink,
31
- "--download-main-color-opacity": J(w.value?.colorLink, 0.6)
32
- })), S = o(() => e.getOssAccess || C.value?.getOssAccess), V = o(() => {
33
- const l = d.default ? d.default()[0] : null;
34
- return l ? j(l, {
28
+ t: d
29
+ } = Z(), i = k(!1), c = k(""), f = W(), K = o(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), s = o(() => e.needName ?? (r?.value?.needName === !0 ? {
30
+ nameKey: "fileName",
31
+ pathKey: "path"
32
+ } : r?.value?.needName ?? {
33
+ nameKey: "fileName",
34
+ pathKey: "filePath"
35
+ })), v = o(() => e.attachmentList.length === 1), w = o(() => s.value ? e.attachmentList.length > 0 && s.value && s.value?.nameKey ? e.attachmentList[0][s.value.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), P = o(() => v.value ? w.value : d("ap.apAttachment.downloadall")), A = o(() => ({
36
+ "--download-main-color": C.value?.colorLink,
37
+ "--download-main-color-opacity": J(C.value?.colorLink, 0.6)
38
+ })), I = o(() => e.getOssAccess || r.value?.getOssAccess), S = o(() => {
39
+ const l = f.default ? f.default()[0] : null;
40
+ return l ? _(l, {
35
41
  style: {
36
42
  "font-size": "16px"
37
43
  }
38
44
  }) : null;
39
- }), v = H(async (l, r) => {
45
+ }), h = H(async (l, u) => {
40
46
  if (!e.disabled) {
41
- i.value = !0, r && (c.value = r);
47
+ i.value = !0, u && (c.value = u);
42
48
  try {
43
- const n = M(h(l)) ? h(l) : [h(l)];
44
- if (N.value?.trigger) {
45
- const u = F(s.value, n).map((b) => ({
49
+ const n = M(g(l)) ? g(l) : [g(l)];
50
+ if (L.value?.trigger) {
51
+ const m = F(s.value, n).map((b) => ({
46
52
  objectName: b.path,
47
53
  fileName: b.fileName
48
54
  }));
49
- N.value?.trigger(u), p("downloadCallback", u);
55
+ L.value?.trigger(m), N("downloadCallback", m);
50
56
  } else {
51
- const u = await (await E(S.value, K(P))).downloadFile(F(e.needName, n));
52
- p("downloadCallback", u);
57
+ const m = await (await E(I.value, j(K))).downloadFile(F(e.needName, n));
58
+ N("downloadCallback", m);
53
59
  }
54
60
  } catch (n) {
55
61
  D(!1, n);
@@ -57,56 +63,56 @@ const fe = /* @__PURE__ */ W({
57
63
  i.value = !1, c.value = "";
58
64
  }
59
65
  }
60
- }, 500), z = (l) => l && l.length > 0 ? t("ul", {
61
- class: [a("file-list"), L.value],
66
+ }, 500), V = (l) => l && l.length > 0 ? t("ul", {
67
+ class: [a("file-list"), y.value],
62
68
  style: A.value
63
- }, [l.map((r, n) => t("li", {
69
+ }, [l.map((u, n) => t("li", {
64
70
  key: n,
65
71
  class: [a("file-item")],
66
- onClick: () => v(r, n + 1)
72
+ onClick: () => h(u, n + 1)
67
73
  }, [i.value && c.value === n + 1 ? t("span", {
68
74
  class: [a("spin")]
69
- }, [t(g, {
75
+ }, [t(p, {
70
76
  spin: !0
71
- }, null)]) : null, r.fileName])), t("li", {
77
+ }, null)]) : null, u.fileName])), t("li", {
72
78
  class: [a("download-all")],
73
- onClick: () => v(e.attachmentList, "all")
79
+ onClick: () => h(e.attachmentList, "all")
74
80
  }, [i.value && c.value === "all" ? t("span", {
75
81
  class: [a("spin")]
76
- }, [t(g, {
82
+ }, [t(p, {
77
83
  spin: !0
78
- }, null)]) : null, m("ap.apAttachment.downloadall")])]) : null;
84
+ }, null)]) : null, d("ap.apAttachment.downloadall")])]) : null;
79
85
  return () => e.attachmentList?.length > 0 && t("div", {
80
- class: [x(), L.value],
86
+ class: [x(), y.value],
81
87
  style: [A.value]
82
88
  }, [t(B, {
83
- title: I.value,
89
+ title: P.value,
84
90
  placement: e.textToolTipPlacement,
85
91
  color: e.toolTipBgColor
86
92
  }, {
87
93
  default: () => [t("div", {
88
94
  class: [a("content")],
89
- onClick: () => v(f.value ? e.attachmentList[0] : e.attachmentList, "global")
95
+ onClick: () => h(v.value ? e.attachmentList[0] : e.attachmentList, "global")
90
96
  }, [i.value && c.value === "global" ? t("div", {
91
97
  class: [a("spin")]
92
- }, [t(g, {
98
+ }, [t(p, {
93
99
  spin: !0
94
- }, null)]) : null, d.default ? t("div", {
100
+ }, null)]) : null, f.default ? t("div", {
95
101
  class: [a("text-render")]
96
- }, [V.value, R(" ")]) : null, t("div", {
102
+ }, [S.value, R(" ")]) : null, t("div", {
97
103
  class: [a("text-inner")],
98
104
  style: {
99
105
  "max-width": e.maxWidth ? e.maxWidth + "px" : "auto"
100
106
  }
101
- }, [y.value])])]
107
+ }, [w.value])])]
102
108
  }), t(G, {
103
- content: z(e.attachmentList),
109
+ content: V(e.attachmentList),
104
110
  placement: e.fileMorePopoverPlacement,
105
111
  color: "#fff"
106
112
  }, {
107
- default: () => [!f.value && t("div", {
113
+ default: () => [!v.value && t("div", {
108
114
  class: [a("more")]
109
- }, [m("ap.apAttachment.more")])]
115
+ }, [d("ap.apAttachment.more")])]
110
116
  })]);
111
117
  }
112
118
  });
@@ -30,10 +30,7 @@ export declare const ApAttachmentProps: () => {
30
30
  nameKey?: string;
31
31
  pathKey?: string;
32
32
  }>;
33
- default: () => {
34
- nameKey: string;
35
- pathKey: string;
36
- };
33
+ default: undefined;
37
34
  };
38
35
  getOssAccess: {
39
36
  type: PropType<_ApAttachmentProps["getOssAccess"]>;
@@ -1,4 +1,4 @@
1
- const e = () => ({
1
+ const t = () => ({
2
2
  attachmentList: {
3
3
  type: Array,
4
4
  default: [],
@@ -25,10 +25,7 @@ const e = () => ({
25
25
  },
26
26
  needName: {
27
27
  type: Object,
28
- default: () => ({
29
- nameKey: "fileName",
30
- pathKey: "filePath"
31
- })
28
+ default: void 0
32
29
  },
33
30
  getOssAccess: {
34
31
  type: Function
@@ -42,5 +39,5 @@ const e = () => ({
42
39
  }
43
40
  });
44
41
  export {
45
- e as ApAttachmentProps
42
+ t as ApAttachmentProps
46
43
  };
@@ -33,10 +33,7 @@ declare const ApAttachment: {
33
33
  nameKey?: string;
34
34
  pathKey?: string;
35
35
  }>;
36
- default: () => {
37
- nameKey: string;
38
- pathKey: string;
39
- };
36
+ default: undefined;
40
37
  };
41
38
  getOssAccess: {
42
39
  type: PropType< ApAttachmentProps["getOssAccess"]>;
@@ -96,10 +93,7 @@ declare const ApAttachment: {
96
93
  nameKey?: string;
97
94
  pathKey?: string;
98
95
  }>;
99
- default: () => {
100
- nameKey: string;
101
- pathKey: string;
102
- };
96
+ default: undefined;
103
97
  };
104
98
  getOssAccess: {
105
99
  type: PropType< ApAttachmentProps["getOssAccess"]>;
@@ -156,10 +150,7 @@ declare const ApAttachment: {
156
150
  nameKey?: string;
157
151
  pathKey?: string;
158
152
  }>;
159
- default: () => {
160
- nameKey: string;
161
- pathKey: string;
162
- };
153
+ default: undefined;
163
154
  };
164
155
  getOssAccess: {
165
156
  type: PropType< ApAttachmentProps["getOssAccess"]>;