@aplus-frontend/ui 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/es/src/ap-action/item/index.vue2.mjs +11 -11
  2. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  3. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +24 -24
  4. package/es/src/ap-drawer/utils/createDrawer.mjs +10 -10
  5. package/es/src/ap-field/checkbox/index.vue.mjs +3 -3
  6. package/es/src/ap-field/date/index.vue.mjs +2 -2
  7. package/es/src/ap-field/date-range/index.vue.mjs +2 -2
  8. package/es/src/ap-field/number/index.vue.mjs +3 -3
  9. package/es/src/ap-field/radio/index.vue.mjs +5 -5
  10. package/es/src/ap-field/rate/index.vue.mjs +4 -4
  11. package/es/src/ap-field/segmented/index.vue.mjs +3 -3
  12. package/es/src/ap-field/select/index.vue.mjs +4 -4
  13. package/es/src/ap-field/slider/index.vue.mjs +3 -3
  14. package/es/src/ap-field/switch/index.vue.mjs +4 -4
  15. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  16. package/es/src/ap-form/ap-form.vue2.mjs +2 -2
  17. package/es/src/ap-form/drawer-form/index.vue.mjs +2 -2
  18. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  19. package/es/src/ap-form/search-form/index.vue.mjs +2 -2
  20. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +6 -6
  21. package/es/src/ap-list/index.vue.mjs +27 -27
  22. package/es/src/ap-modal/utils/createModal.mjs +10 -10
  23. package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +3 -3
  24. package/es/src/ap-table/ap-table.vue2.mjs +3 -3
  25. package/es/src/ap-table/components/index/index.vue2.mjs +3 -3
  26. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +4 -4
  27. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +2 -2
  28. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +3 -3
  29. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +8 -8
  30. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +6 -6
  31. package/es/src/ap-table/components/status/index.vue2.mjs +4 -4
  32. package/es/src/ap-table/hooks/use-table-content-height.mjs +13 -11
  33. package/es/src/ap-tag/ap-tag-group.vue.mjs +1 -1
  34. package/es/src/ap-upload/apUpload.vue.d.ts +57 -8
  35. package/es/src/ap-upload/apUpload.vue.mjs +56 -37
  36. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +10 -10
  37. package/es/src/ap-upload/components/Picture.vue2.mjs +26 -26
  38. package/es/src/ap-upload/components/SingleFile.vue2.mjs +27 -27
  39. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +49 -49
  40. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
  41. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +5 -5
  42. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +11 -11
  43. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
  44. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +26 -26
  45. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +15 -15
  46. package/es/src/business/ap-group-search/index.d.ts +1 -1
  47. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
  48. package/es/src/business/ap-image/ApImage.vue2.mjs +28 -28
  49. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  50. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -9
  51. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
  52. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +74 -70
  53. package/es/src/business/ap-upload-file/hook/useProps.mjs +8 -8
  54. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +1 -1
  55. package/es/src/business/ap-upload-file/interface.d.ts +2 -0
  56. package/es/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  57. package/es/src/business/ap-upload-file/utils/fileList.mjs +12 -12
  58. package/es/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  59. package/es/src/business/ap-upload-file/utils/upload.mjs +23 -23
  60. package/es/src/business/batch-input-group/index.vue.mjs +5 -5
  61. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +15 -15
  62. package/es/src/editable-table/form-item.vue.mjs +3 -3
  63. package/es/src/editable-table/index.vue.mjs +6 -6
  64. package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
  65. package/lib/src/ap-action/item/index.vue2.js +1 -1
  66. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  67. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  68. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  69. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  70. package/lib/src/ap-field/date/index.vue.js +1 -1
  71. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  72. package/lib/src/ap-field/number/index.vue.js +1 -1
  73. package/lib/src/ap-field/radio/index.vue.js +1 -1
  74. package/lib/src/ap-field/rate/index.vue.js +1 -1
  75. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  76. package/lib/src/ap-field/select/index.vue.js +1 -1
  77. package/lib/src/ap-field/slider/index.vue.js +1 -1
  78. package/lib/src/ap-field/switch/index.vue.js +1 -1
  79. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  80. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  81. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  82. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  83. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  84. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -1
  85. package/lib/src/ap-list/index.vue.js +1 -1
  86. package/lib/src/ap-modal/utils/createModal.js +1 -1
  87. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +1 -1
  88. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  89. package/lib/src/ap-table/components/index/index.vue2.js +1 -1
  90. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  91. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  92. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
  93. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  94. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  95. package/lib/src/ap-table/components/status/index.vue2.js +1 -1
  96. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  97. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  98. package/lib/src/ap-upload/apUpload.vue.d.ts +57 -8
  99. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  100. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  101. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  102. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  103. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  104. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  105. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  106. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  107. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
  108. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  109. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  110. package/lib/src/business/ap-group-search/index.d.ts +1 -1
  111. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
  112. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  113. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  114. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  115. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
  116. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  117. package/lib/src/business/ap-upload-file/hook/useProps.js +1 -1
  118. package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
  119. package/lib/src/business/ap-upload-file/interface.d.ts +2 -0
  120. package/lib/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  121. package/lib/src/business/ap-upload-file/utils/fileList.js +1 -1
  122. package/lib/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  123. package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
  124. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  125. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  126. package/lib/src/editable-table/form-item.vue.js +1 -1
  127. package/lib/src/editable-table/index.vue.js +1 -1
  128. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  129. package/package.json +4 -4
@@ -1,14 +1,14 @@
1
- import { defineComponent as L, ref as P, computed as c, onMounted as N, watch as R, unref as t, resolveComponent as D, openBlock as C, createElementBlock as K, normalizeClass as d, createVNode as p, withCtx as S, normalizeStyle as O, createBlock as T, createCommentVNode as F, renderSlot as $ } from "vue";
1
+ import { defineComponent as P, ref as M, computed as c, onMounted as N, watch as R, unref as t, resolveComponent as D, openBlock as w, createElementBlock as K, normalizeClass as d, createVNode as p, withCtx as C, normalizeStyle as O, createBlock as F, createCommentVNode as T, renderSlot as $ } from "vue";
2
2
  import { Flex as j, Select as E } from "@aplus-frontend/antdv";
3
3
  import G from "./images/icon-down.vue.mjs";
4
4
  import "./extension-select/index.vue.mjs";
5
- import { useControllableValue as W } from "../../hooks/useControllableValue.mjs";
5
+ import { useControllableValue as z } from "../../hooks/useControllableValue.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { useLocale as z } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useGlobalConfig as H } from "../../config-provider/hooks/use-global-config.mjs";
9
- import { useNamespace as U } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import { useLocale as H } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useGlobalConfig as U } from "../../config-provider/hooks/use-global-config.mjs";
9
+ import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs";
10
10
  import Y from "./extension-select/index.vue2.mjs";
11
- const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */ L({
11
+ const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */ P({
12
12
  __name: "ap-group-search",
13
13
  props: {
14
14
  value: {},
@@ -90,11 +90,11 @@ const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */ L({
90
90
  style: {}
91
91
  },
92
92
  emits: ["update:value"],
93
- setup(w, { emit: _ }) {
94
- const { t: h } = z(), f = H("uiMode", "aplus"), y = P(), l = w, B = c(() => ({
93
+ setup(S, { emit: _ }) {
94
+ const { t: h } = H(), f = U("uiMode", "aplus"), y = M(), l = S, B = c(() => ({
95
95
  width: "auto",
96
96
  ...l.style
97
- })), b = _, { value: a, updateValue: u } = W(l, b), A = (e) => {
97
+ })), b = _, { value: a, updateValue: u } = z(l, b), A = (e) => {
98
98
  let o = e;
99
99
  e === m ? o = l.options.map((n) => n.value) : o = toString.call(o) === "[object Array]" ? e : [e], u({
100
100
  ...a.value,
@@ -139,52 +139,52 @@ const m = "GROUP_SEARCH_ALL", ne = /* @__PURE__ */ L({
139
139
  ...a.value,
140
140
  value: e
141
141
  });
142
- }, { b: I, e: g, em: M } = U("ap-group-search");
142
+ }, { b: I, e: g, em: L } = W("ap-group-search");
143
143
  return (e, o) => {
144
144
  const n = D("Divider");
145
- return C(), K("div", {
146
- class: d(t(I)()),
145
+ return w(), K("div", {
147
146
  ref_key: "containerRef",
148
- ref: y
147
+ ref: y,
148
+ class: d(t(I)())
149
149
  }, [
150
150
  p(t(j), null, {
151
- default: S(() => {
151
+ default: C(() => {
152
152
  var s, i;
153
153
  return [
154
154
  p(t(E), {
155
155
  value: V.value,
156
156
  style: O(B.value),
157
- class: d(`${e.$attrs.class} ${t(f) === "admin" ? t(M)("search", "admin") : t(g)("search")}`),
157
+ class: d(`${e.$attrs.class} ${t(f) === "admin" ? t(L)("search", "admin") : t(g)("search")}`),
158
158
  options: k.value,
159
159
  bordered: !1,
160
- dropdownMatchSelectWidth: l.dropdownMatchSelectWidth,
160
+ "dropdown-match-select-width": l.dropdownMatchSelectWidth,
161
161
  onChange: A
162
162
  }, {
163
- suffixIcon: S(() => [
163
+ suffixIcon: C(() => [
164
164
  p(G)
165
165
  ]),
166
166
  _: 1
167
- }, 8, ["value", "style", "class", "options", "dropdownMatchSelectWidth"]),
168
- t(f) === "aplus" ? (C(), T(n, {
167
+ }, 8, ["value", "style", "class", "options", "dropdown-match-select-width"]),
168
+ t(f) === "aplus" ? (w(), F(n, {
169
169
  key: 0,
170
170
  class: d(t(g)("divider")),
171
171
  type: "vertical",
172
172
  style: {}
173
- }, null, 8, ["class"])) : F("", !0),
173
+ }, null, 8, ["class"])) : T("", !0),
174
174
  $(e.$slots, "search", {
175
- value: (s = t(a)) == null ? void 0 : s.value,
176
- change: v,
177
- key: (i = t(a)) == null ? void 0 : i.key
175
+ key: (s = t(a)) == null ? void 0 : s.key,
176
+ value: (i = t(a)) == null ? void 0 : i.value,
177
+ change: v
178
178
  }, () => {
179
179
  var r;
180
180
  return [
181
181
  p(Y, {
182
182
  style: { width: "100%" },
183
- maxTagCount: "responsive",
183
+ "max-tag-count": "responsive",
184
184
  value: (r = t(a)) == null ? void 0 : r.value,
185
- onChange: v,
186
185
  placeholder: x.value,
187
- "__parent-ref": y.value
186
+ "__parent-ref": y.value,
187
+ onChange: v
188
188
  }, null, 8, ["value", "placeholder", "__parent-ref"])
189
189
  ];
190
190
  })
@@ -1,11 +1,11 @@
1
- import { defineComponent as v, ref as t, computed as y, watch as w, openBlock as B, createElementBlock as _, createVNode as s, unref as l, normalizeClass as x, normalizeStyle as b, withCtx as S } from "vue";
1
+ import { defineComponent as y, ref as t, computed as C, watch as w, openBlock as B, createElementBlock as _, createVNode as s, unref as l, normalizeClass as x, normalizeStyle as b, withCtx as S } from "vue";
2
2
  import { Select as I } from "@aplus-frontend/antdv";
3
3
  import "../popover-select/index.vue.mjs";
4
4
  import "../../../config-provider/index.mjs";
5
5
  import { useGlobalConfig as R } from "../../../config-provider/hooks/use-global-config.mjs";
6
- import { useNamespace as T } from "../../../config-provider/hooks/use-namespace.mjs";
7
- import V from "../popover-select/index.vue2.mjs";
8
- const O = /* @__PURE__ */ v({
6
+ import { useNamespace as V } from "../../../config-provider/hooks/use-namespace.mjs";
7
+ import N from "../popover-select/index.vue2.mjs";
8
+ const O = /* @__PURE__ */ y({
9
9
  __name: "index",
10
10
  props: {
11
11
  value: {},
@@ -85,7 +85,7 @@ const O = /* @__PURE__ */ v({
85
85
  },
86
86
  emits: ["change"],
87
87
  setup(u, { emit: c }) {
88
- const d = R("uiMode", "aplus"), o = u, r = t(), n = t(), a = t(!1), m = y(() => o.__parentRef || r.value), f = c, h = (e) => {
88
+ const d = R("uiMode", "aplus"), o = u, r = t(), n = t(), a = t(!1), m = C(() => o.__parentRef || r.value), f = c, h = (e) => {
89
89
  e && (a.value = !1);
90
90
  };
91
91
  w(
@@ -97,7 +97,7 @@ const O = /* @__PURE__ */ v({
97
97
  );
98
98
  const p = (e) => {
99
99
  n.value = e, f("change", e);
100
- }, { b: g } = T("ap-extension-select");
100
+ }, { b: g } = V("ap-extension-select");
101
101
  return (e, i) => (B(), _("div", {
102
102
  ref_key: "containerRef",
103
103
  ref: r
@@ -108,24 +108,24 @@ const O = /* @__PURE__ */ v({
108
108
  style: b(e.$attrs.style),
109
109
  bordered: l(d) === "admin",
110
110
  mode: "tags",
111
- showArrow: !0,
111
+ "show-arrow": !0,
112
112
  "not-found-content": !0,
113
113
  open: a.value,
114
- onDropdownVisibleChange: i[0] || (i[0] = (C) => a.value = C),
115
- onChange: p,
116
- maxTagCount: o.maxTagCount,
117
- placeholder: o.placeholder
114
+ "max-tag-count": o.maxTagCount,
115
+ placeholder: o.placeholder,
116
+ onDropdownVisibleChange: i[0] || (i[0] = (v) => a.value = v),
117
+ onChange: p
118
118
  }, {
119
119
  suffixIcon: S(() => [
120
- s(V, {
120
+ s(N, {
121
121
  value: n.value,
122
+ "__parent-ref": m.value,
122
123
  onSubmit: p,
123
- onOpenChange: h,
124
- "__parent-ref": m.value
124
+ onOpenChange: h
125
125
  }, null, 8, ["value", "__parent-ref"])
126
126
  ]),
127
127
  _: 1
128
- }, 8, ["class", "value", "style", "bordered", "open", "maxTagCount", "placeholder"])
128
+ }, 8, ["class", "value", "style", "bordered", "open", "max-tag-count", "placeholder"])
129
129
  ], 512));
130
130
  }
131
131
  });
@@ -42,9 +42,9 @@ declare const ApGroupSearch: {
42
42
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
43
43
  $slots: {
44
44
  search?(_: {
45
+ key: SelectValue;
45
46
  value: any;
46
47
  change: (e: any) => void;
47
- key: SelectValue;
48
48
  }): any;
49
49
  };
50
50
  }) & ( Plugin & (new (...args: any[]) => {
@@ -86,14 +86,14 @@ const Y = /* @__PURE__ */ P({
86
86
  },
87
87
  emits: ["submit", "open-change"],
88
88
  setup(S, { emit: w }) {
89
- const { t: r } = F(), h = E("uiMode", "aplus"), i = S, v = w, t = u([]), c = u(!1), g = u();
89
+ const { t: r } = F(), h = E("uiMode", "aplus"), c = S, v = w, t = u([]), i = u(!1), g = u();
90
90
  R(() => {
91
- t.value = i.value;
91
+ t.value = c.value;
92
92
  });
93
- const B = (o) => i.__parentRef || o, b = (o) => {
94
- c.value = o, v("open-change", o);
93
+ const B = (o) => c.__parentRef || o, b = (o) => {
94
+ i.value = o, v("open-change", o);
95
95
  }, C = () => {
96
- c.value = !1;
96
+ i.value = !1;
97
97
  }, _ = () => {
98
98
  t.value = [];
99
99
  }, x = (o) => {
@@ -101,15 +101,15 @@ const Y = /* @__PURE__ */ P({
101
101
  }, k = async () => {
102
102
  var o;
103
103
  (o = g.value) == null || o.blur(), C(), await D(150), v("submit", t.value);
104
- }, { b: N, e: V, em: l } = K("ap-popover-select");
104
+ }, { b: V, e: I, em: l } = K("ap-popover-select");
105
105
  return (o, y) => (L(), M("div", {
106
- class: p(e(N)())
106
+ class: p(e(V)())
107
107
  }, [
108
108
  a(e(T), {
109
- overlayClassName: e(V)("popover"),
109
+ "overlay-class-name": e(I)("popover"),
110
110
  "get-popup-container": B,
111
111
  trigger: "click",
112
- open: c.value,
112
+ open: i.value,
113
113
  placement: "bottomLeft",
114
114
  onOpenChange: b
115
115
  }, {
@@ -118,18 +118,18 @@ const Y = /* @__PURE__ */ P({
118
118
  s("div", {
119
119
  class: p(e(l)("popover", "content"))
120
120
  }, [
121
- a(e(z), O({ ...i }, {
121
+ a(e(z), O({ ...c }, {
122
+ ref_key: "selectRef",
123
+ ref: g,
122
124
  mode: "tags",
123
125
  bordered: !1,
124
126
  value: t.value,
125
- onChange: y[0] || (y[0] = (I) => x(I)),
126
127
  placeholder: e(r)("ap.apGroupSearch.tokenSeparatorsPlaceholder"),
127
- tokenSeparators: [",", `
128
+ "token-separators": [",", `
128
129
  `, "\r"],
129
130
  "max-tag-count": 200,
130
131
  open: !1,
131
- ref_key: "selectRef",
132
- ref: g
132
+ onChange: y[0] || (y[0] = (N) => x(N))
133
133
  }), null, 16, ["value", "placeholder"])
134
134
  ], 2),
135
135
  s("div", {
@@ -183,7 +183,7 @@ const Y = /* @__PURE__ */ P({
183
183
  ], 2)
184
184
  ]),
185
185
  _: 1
186
- }, 8, ["overlayClassName", "open"])
186
+ }, 8, ["overlay-class-name", "open"])
187
187
  ], 2));
188
188
  }
189
189
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent as S, computed as s, ref as U, watchEffect as j, openBlock as i, createBlock as g, unref as n, mergeProps as p, withCtx as B, renderSlot as E, normalizeProps as I, guardReactiveProps as L, createElementVNode as b, normalizeClass as D, createElementBlock as M, Fragment as P, renderList as R, resolveDynamicComponent as T, createVNode as x } from "vue";
1
+ import { defineComponent as S, computed as c, ref as U, watchEffect as j, openBlock as i, createBlock as p, unref as n, mergeProps as g, withCtx as B, renderSlot as E, normalizeProps as I, guardReactiveProps as L, createElementVNode as b, normalizeClass as D, createElementBlock as M, Fragment as P, renderList as R, resolveDynamicComponent as T, createVNode as x } from "vue";
2
2
  import { Image as z } from "@aplus-frontend/antdv";
3
3
  import { DownloadOutlined as V } from "@ant-design/icons-vue";
4
4
  import { injectLocaleToOss as W, getOssInstance as G, getSignatureUrl as $ } from "./hooks/useOss.mjs";
@@ -9,7 +9,7 @@ import { omit as J } from "lodash-unified";
9
9
  import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
10
10
  import { useGlobalConfig as m } from "../../config-provider/hooks/use-global-config.mjs";
11
11
  import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
12
- const se = /* @__PURE__ */ S({
12
+ const ce = /* @__PURE__ */ S({
13
13
  __name: "ApImage",
14
14
  props: {
15
15
  getOssAccess: {},
@@ -27,70 +27,70 @@ const se = /* @__PURE__ */ S({
27
27
  admin: q
28
28
  }, k = m("uiMode"), w = m("apUpload"), f = m(
29
29
  "downloadCenterTriggerConfig"
30
- ), { t: h, lang: C } = Q(), O = s(
30
+ ), { t: h, lang: C } = Q(), O = c(
31
31
  () => {
32
- var a;
33
- return e.getOssAccess || ((a = w.value) == null ? void 0 : a.getOssAccess);
32
+ var r;
33
+ return e.getOssAccess || ((r = w.value) == null ? void 0 : r.getOssAccess);
34
34
  }
35
- ), A = s(
35
+ ), A = c(
36
36
  () => d[k.value] || d.aplus
37
- ), N = s(() => (e == null ? void 0 : e.fallback) || A.value), r = U("");
37
+ ), N = c(() => (e == null ? void 0 : e.fallback) || A.value), o = U("");
38
38
  W(h, C), j(async () => {
39
- var a;
39
+ var r;
40
40
  if (!(e != null && e.src)) {
41
- r.value = "";
41
+ o.value = "";
42
42
  return;
43
43
  }
44
- if (!((a = e.src) != null && a.startsWith("Frontend-Upload"))) {
45
- r.value = e.src;
44
+ if (!((r = e.src) != null && r.startsWith("Frontend-Upload"))) {
45
+ o.value = e.src;
46
46
  return;
47
47
  }
48
48
  try {
49
- const o = await G(O.value), t = await $({
50
- oss: o,
49
+ const a = await G(O.value), t = await $({
50
+ oss: a,
51
51
  fileName: e.src
52
52
  });
53
- t && (r.value = t);
53
+ t && (o.value = t);
54
54
  } catch {
55
- r.value = "";
55
+ o.value = "";
56
56
  }
57
57
  });
58
58
  async function y() {
59
- var t, l, c;
59
+ var t, l, s;
60
60
  if (!(e != null && e.src))
61
61
  return;
62
- const a = e.src, o = e.fileName ?? e.src;
62
+ const r = e.src, a = e.fileName ?? e.src;
63
63
  if (!((t = e.src) != null && t.startsWith("Frontend-Upload"))) {
64
- _(a, o);
64
+ _(r, a);
65
65
  return;
66
66
  }
67
67
  if ((l = f.value) != null && l.trigger) {
68
68
  let F = [
69
69
  {
70
- objectName: a,
71
- fileName: o
70
+ objectName: r,
71
+ fileName: a
72
72
  }
73
73
  ];
74
- await ((c = f.value) == null ? void 0 : c.trigger(F));
74
+ await ((s = f.value) == null ? void 0 : s.trigger(F));
75
75
  }
76
76
  }
77
- const _ = (a, o) => {
77
+ const _ = (r, a) => {
78
78
  const t = document.createElement("a");
79
- t.href = a, t.rel = "noopener noreferrer", t.setAttribute("download", o), document.body.appendChild(t), t.click(), document.body.removeChild(t);
79
+ t.href = r, t.rel = "noopener noreferrer", t.setAttribute("download", a), document.body.appendChild(t), t.click(), document.body.removeChild(t);
80
80
  };
81
- return (a, o) => (i(), g(n(z), p({
81
+ return (r, a) => (i(), p(n(z), g({
82
82
  class: [n(u)()]
83
83
  }, {
84
84
  ...n(J)(e, ["src", "getOssAccess"]),
85
85
  fallback: N.value,
86
- src: r.value
86
+ src: o.value
87
87
  }), {
88
88
  toolbarRender: B((t) => [
89
- E(a.$slots, "toolbarRender", I(L({ ...t })), () => [
89
+ E(r.$slots, "toolbarRender", I(L({ ...t })), () => [
90
90
  b("div", {
91
91
  class: D([n(u)("toolbar")])
92
92
  }, [
93
- (i(!0), M(P, null, R(t.originalNodes, (l, c) => (i(), g(T(l), p({ ref_for: !0 }, t, { key: c }), null, 16))), 128)),
93
+ (i(!0), M(P, null, R(t.originalNodes, (l, s) => (i(), p(T(l), g({ ref_for: !0 }, e, { key: s }), null, 16))), 128)),
94
94
  b("div", {
95
95
  class: "ant-image-preview-operations-operation",
96
96
  onClick: y
@@ -105,5 +105,5 @@ const se = /* @__PURE__ */ S({
105
105
  }
106
106
  });
107
107
  export {
108
- se as default
108
+ ce as default
109
109
  };
@@ -73,8 +73,8 @@ const Q = /* @__PURE__ */ I({
73
73
  class: f(r(S)())
74
74
  }, {
75
75
  default: x(() => [(m(!0), w(y, null, z(C.value, (e, t) => (m(), i(r(F), {
76
- class: f(`${n.size === "small" ? r(g)("item", "small") : r(_)("item")}`),
77
76
  key: e.key,
77
+ class: f(`${n.size === "small" ? r(g)("item", "small") : r(_)("item")}`),
78
78
  index: t,
79
79
  style: B({
80
80
  textAlign: e.align
@@ -175,8 +175,6 @@ const fe = /* @__PURE__ */ F({
175
175
  getApTableInstance: N
176
176
  }), (o, t) => ($(), z(s(H), b(
177
177
  {
178
- onOk: L,
179
- onCancel: w,
180
178
  open: i.value,
181
179
  "onUpdate:open": t[0] || (t[0] = (l) => i.value = l)
182
180
  },
@@ -197,27 +195,28 @@ const fe = /* @__PURE__ */ F({
197
195
  {
198
196
  title: D(),
199
197
  "body-style": { maxHeight: "calc(100vh - 205px)", overflowY: "scroll" },
200
- centered: e.centered ?? !0
198
+ centered: e.centered ?? !0,
199
+ onOk: L,
200
+ onCancel: w
201
201
  }
202
202
  ), {
203
203
  default: k(() => [
204
204
  T(X, b(e.tableLayoutConfig || {}, {
205
- onClear: O,
206
205
  "selected-list": a.value,
206
+ onClear: O,
207
207
  onDeleteItem: G
208
208
  }), {
209
209
  default: k(() => [
210
- T(s(Z), b({
210
+ T(s(Z), b(s(S)(e.apTableProps, "dataSource"), {
211
+ ref_key: "apTableRef",
212
+ ref: d,
211
213
  scroll: { y: "100%" },
212
214
  style: { padding: "0px" },
213
215
  columns: o.columns,
214
216
  request: I,
215
217
  "row-key": o.getRowKey,
216
218
  "row-selection": A.value,
217
- bordered: s(K) === "admin"
218
- }, s(S)(e.apTableProps, "dataSource"), {
219
- ref_key: "apTableRef",
220
- ref: d,
219
+ bordered: s(K) === "admin",
221
220
  "data-source": C.value
222
221
  }), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
223
222
  ]),
@@ -1,10 +1,13 @@
1
- import { ApUploadSingleProps } from '../interface';
1
+ import { ApUploadFile, ApUploadSingleProps } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Props = ApUploadSingleProps;
4
4
  declare function __VLS_template(): {
5
5
  attrs: Partial<{}>;
6
6
  slots: {
7
- default?(_: {}): any;
7
+ default?(_: {
8
+ file: ApUploadFile | undefined;
9
+ clear: () => void | undefined;
10
+ }): any;
8
11
  };
9
12
  refs: {};
10
13
  rootEl: any;