@aplus-frontend/ui 7.7.3 → 7.7.5

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 (131) hide show
  1. package/es/src/ap-action/group/index.vue.d.ts +1 -0
  2. package/es/src/ap-action/group/index.vue.mjs +28 -28
  3. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
  4. package/es/src/ap-button/ap-action-button.vue.d.ts +2 -1
  5. package/es/src/ap-button/ap-button.vue.d.ts +2 -1
  6. package/es/src/ap-field/checkbox/index.vue.mjs +18 -8
  7. package/es/src/ap-field/number/index.vue.d.ts +20 -0
  8. package/es/src/ap-field/number/index.vue.mjs +24 -23
  9. package/es/src/ap-field/number/read.vue2.mjs +3 -2
  10. package/es/src/ap-field/radio/index.vue.mjs +24 -24
  11. package/es/src/ap-field/rate/index.vue.mjs +10 -10
  12. package/es/src/ap-field/select/index.vue.d.ts +12 -4
  13. package/es/src/ap-field/select/index.vue.mjs +74 -71
  14. package/es/src/ap-field/slider/index.vue.d.ts +4 -2
  15. package/es/src/ap-field/slider/index.vue.mjs +12 -12
  16. package/es/src/ap-field/switch/index.vue.mjs +20 -20
  17. package/es/src/ap-field/text/index.vue2.mjs +23 -23
  18. package/es/src/ap-field/text/password.vue.mjs +9 -9
  19. package/es/src/ap-field/text-area/index.vue.mjs +24 -20
  20. package/es/src/ap-field/tree-select/index.vue.d.ts +2 -0
  21. package/es/src/ap-field/tree-select/index.vue.mjs +17 -17
  22. package/es/src/ap-form/ap-form.vue2.mjs +64 -64
  23. package/es/src/ap-form/drawer-form/index.vue.mjs +41 -41
  24. package/es/src/ap-form/item/index.vue.mjs +64 -64
  25. package/es/src/ap-form/items/number/index.vue.d.ts +22 -0
  26. package/es/src/ap-form/items/number/index.vue.mjs +10 -10
  27. package/es/src/ap-form/items/radio/index.vue.mjs +3 -3
  28. package/es/src/ap-form/items/select/index.vue.d.ts +18 -6
  29. package/es/src/ap-form/items/select/index.vue.mjs +5 -5
  30. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  31. package/es/src/ap-form/items/text/index.vue2.mjs +6 -6
  32. package/es/src/ap-form/items/text/password.vue.mjs +7 -7
  33. package/es/src/ap-form/items/text-area/index.vue.mjs +5 -5
  34. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
  35. package/es/src/ap-form/items/tree-select/index.vue.mjs +7 -7
  36. package/es/src/ap-form/modal-form/index.vue.d.ts +25 -1
  37. package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
  38. package/es/src/ap-form/search-form/index.vue.mjs +63 -63
  39. package/es/src/ap-form/style/item.mjs +8 -7
  40. package/es/src/ap-list/index.vue.mjs +6 -6
  41. package/es/src/ap-table/constants.d.ts +23 -4
  42. package/es/src/business/ap-batch-action-group/index.d.ts +34 -4
  43. package/es/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
  44. package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +58 -79
  45. package/es/src/business/ap-descriptions/interface.d.ts +2 -3
  46. package/es/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  47. package/es/src/business/ap-upload/apUpload.vue.mjs +33 -29
  48. package/es/src/business/ap-upload/apUploadTypes.d.ts +4 -0
  49. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +50 -49
  50. package/es/src/business/ap-upload/components/Picture.vue2.mjs +66 -65
  51. package/es/src/business/ap-upload/components/SingleFile.vue2.mjs +95 -94
  52. package/es/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  53. package/es/src/business/ap-upload/hooks/useOss.mjs +26 -24
  54. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  55. package/es/src/editable-table/form-item.vue.mjs +64 -64
  56. package/es/src/editable-table/index.vue.mjs +66 -66
  57. package/es/src/scroll-bar/index.vue.d.ts +7 -7
  58. package/es/src/scroll-bar/index.vue.mjs +21 -21
  59. package/es/src/scroll-bar/internal.vue.d.ts +4 -4
  60. package/es/src/scroll-bar/internal.vue.mjs +20 -20
  61. package/es/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  62. package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +13 -13
  63. package/es/src/scroll-view/index.vue.d.ts +25 -25
  64. package/es/src/version.d.ts +1 -1
  65. package/es/src/version.mjs +1 -1
  66. package/lib/src/ap-action/group/index.vue.d.ts +1 -0
  67. package/lib/src/ap-action/group/index.vue.js +1 -1
  68. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
  69. package/lib/src/ap-button/ap-action-button.vue.d.ts +2 -1
  70. package/lib/src/ap-button/ap-button.vue.d.ts +2 -1
  71. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  72. package/lib/src/ap-field/number/index.vue.d.ts +20 -0
  73. package/lib/src/ap-field/number/index.vue.js +1 -1
  74. package/lib/src/ap-field/number/read.vue2.js +1 -1
  75. package/lib/src/ap-field/radio/index.vue.js +1 -1
  76. package/lib/src/ap-field/rate/index.vue.js +1 -1
  77. package/lib/src/ap-field/select/index.vue.d.ts +12 -4
  78. package/lib/src/ap-field/select/index.vue.js +1 -1
  79. package/lib/src/ap-field/slider/index.vue.d.ts +4 -2
  80. package/lib/src/ap-field/slider/index.vue.js +1 -1
  81. package/lib/src/ap-field/switch/index.vue.js +1 -1
  82. package/lib/src/ap-field/text/index.vue2.js +1 -1
  83. package/lib/src/ap-field/text/password.vue.js +1 -1
  84. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  85. package/lib/src/ap-field/tree-select/index.vue.d.ts +2 -0
  86. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  87. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  88. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  89. package/lib/src/ap-form/item/index.vue.js +1 -1
  90. package/lib/src/ap-form/items/number/index.vue.d.ts +22 -0
  91. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  92. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  93. package/lib/src/ap-form/items/select/index.vue.d.ts +18 -6
  94. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  95. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  96. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  97. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  98. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  99. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
  100. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  101. package/lib/src/ap-form/modal-form/index.vue.d.ts +25 -1
  102. package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
  103. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  104. package/lib/src/ap-form/style/item.js +1 -1
  105. package/lib/src/ap-list/index.vue.js +1 -1
  106. package/lib/src/ap-table/constants.d.ts +23 -4
  107. package/lib/src/business/ap-batch-action-group/index.d.ts +34 -4
  108. package/lib/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
  109. package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
  110. package/lib/src/business/ap-descriptions/interface.d.ts +2 -3
  111. package/lib/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  112. package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
  113. package/lib/src/business/ap-upload/apUploadTypes.d.ts +4 -0
  114. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  115. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  116. package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -1
  117. package/lib/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  118. package/lib/src/business/ap-upload/hooks/useOss.js +1 -1
  119. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  120. package/lib/src/editable-table/form-item.vue.js +1 -1
  121. package/lib/src/editable-table/index.vue.js +1 -1
  122. package/lib/src/scroll-bar/index.vue.d.ts +7 -7
  123. package/lib/src/scroll-bar/index.vue.js +1 -1
  124. package/lib/src/scroll-bar/internal.vue.d.ts +4 -4
  125. package/lib/src/scroll-bar/internal.vue.js +1 -1
  126. package/lib/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  127. package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
  128. package/lib/src/scroll-view/index.vue.d.ts +25 -25
  129. package/lib/src/version.d.ts +1 -1
  130. package/lib/src/version.js +1 -1
  131. package/package.json +5 -5
@@ -1,70 +1,70 @@
1
- import { defineComponent as ne, inject as l, ref as g, watch as se, computed as re, createElementBlock as E, openBlock as h, normalizeClass as ie, unref as a, createElementVNode as r, createCommentVNode as N, toDisplayString as x, normalizeStyle as ce, createBlock as ue, withModifiers as pe, createVNode as de } from "vue";
1
+ import { defineComponent as se, inject as o, ref as g, watch as re, computed as ie, createElementBlock as N, openBlock as h, normalizeClass as ce, unref as t, createElementVNode as r, createCommentVNode as E, toDisplayString as b, normalizeStyle as ue, createBlock as pe, withModifiers as de, createVNode as ve } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
- import { getName as ve, getReturnData as $ } 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";
3
+ import { getName as fe, getReturnData as $ } from "../utils/returnData.mjs";
4
+ import { useOss as me, useOssInit as ge } from "../hooks/useOss.mjs";
5
+ import { fileMatchesAccept as he, getAcceptText as _e } from "../utils/accept.mjs";
6
+ import { message as c, Progress as ke } from "@aplus-frontend/antdv";
7
+ import { DeleteOutlined as ye } from "@ant-design/icons-vue";
8
8
  import q from "../assets/single-file-icon.png.mjs";
9
- import ye from "../style/index.mjs";
10
- import { useToken as we } from "../../../config-provider/hooks/use-token.mjs";
11
- import { useLocale as Ue } from "../../../config-provider/hooks/use-locale.mjs";
9
+ import we from "../style/index.mjs";
10
+ import { useToken as Ue } from "../../../config-provider/hooks/use-token.mjs";
11
+ import { useLocale as De } from "../../../config-provider/hooks/use-locale.mjs";
12
12
  import { useNamespace as Ce } from "../../../config-provider/hooks/use-namespace.mjs";
13
- const De = ["accept"], Fe = {
13
+ const Fe = ["accept"], Se = {
14
14
  key: 0,
15
15
  class: "state-un"
16
- }, Se = ["src"], Ee = { class: "state-un-title" }, Ne = { class: "state-un-subtitle" }, xe = {
16
+ }, Ne = ["src"], Ee = { class: "state-un-title" }, be = { class: "state-un-subtitle" }, xe = {
17
17
  key: 1,
18
18
  class: "state-ing"
19
- }, ze = { class: "left" }, be = ["src"], Ae = { class: "center" }, Re = { class: "center-progress" }, He = /* @__PURE__ */ ne({
19
+ }, ze = { class: "left" }, Ae = ["src"], Re = { class: "center" }, Be = { class: "center-progress" }, Je = /* @__PURE__ */ se({
20
20
  __name: "SingleFile",
21
- setup(Be, { expose: j }) {
22
- const { t: s } = Ue(), { b: z } = Ce("ap-upload-single-file"), G = ye("ap-upload"), { put: W, client: b } = fe(), H = l("dirName"), _ = l("accept") || "*", k = l("maxSize") ?? 500, J = l("title") || s("ap.apUpload.clickOrDragUpload"), y = l("subTitle"), { token: A } = we(), i = l("value"), w = l("needName"), u = l("uploadingCount"), R = l("beforeUpload"), B = l("customRequest"), K = l("getOssAccess"), Q = l("maxSizeErrorMsg"), X = l("acceptErrorMsg"), M = l("onRemove"), U = l("showUploadErrorMsg"), o = g(null);
23
- se(
21
+ setup(Me, { expose: j }) {
22
+ const { t: s } = De(), { b: x } = Ce("ap-upload-single-file"), G = we("ap-upload"), { put: W, client: z } = me(), H = o("dirName"), J = o("baseDirName"), _ = o("accept") || "*", k = o("maxSize") ?? 500, K = o("title") || s("ap.apUpload.clickOrDragUpload"), y = o("subTitle"), { token: A } = Ue(), i = o("value"), w = o("needName"), u = o("uploadingCount"), R = o("beforeUpload"), B = o("customRequest"), Q = o("getOssAccess"), X = o("maxSizeErrorMsg"), Y = o("acceptErrorMsg"), M = o("onRemove"), U = o("showUploadErrorMsg"), l = g(null);
23
+ re(
24
24
  () => i?.value,
25
25
  function(e) {
26
- o.value === null && e && P(e);
26
+ l.value === null && e && P(e);
27
27
  },
28
28
  { immediate: !0 }
29
29
  );
30
30
  function P(e) {
31
31
  e ? setTimeout(() => {
32
- const t = ve(w, e);
33
- n.value = 3, o.value = new File([e], t, {}), i.value = e;
34
- }) : (n.value = 1, o.value = null, i.value = void 0);
32
+ const a = fe(w, e);
33
+ n.value = 3, l.value = new File([e], a, {}), i.value = e;
34
+ }) : (n.value = 1, l.value = null, i.value = void 0);
35
35
  }
36
36
  j({ setValue: P });
37
- const n = g(1), d = g(0), v = g(null), T = re(() => o.value && i?.value);
38
- function Y() {
37
+ const n = g(1), d = g(0), v = g(null), T = ie(() => l.value && i?.value);
38
+ function Z() {
39
39
  n.value === 1 && v.value?.click();
40
40
  }
41
41
  function O(e) {
42
42
  e.preventDefault(), e.stopPropagation();
43
43
  }
44
- function Z(e) {
44
+ function ee(e) {
45
45
  e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
46
46
  }
47
- function ee(e) {
47
+ function ae(e) {
48
48
  L(e);
49
49
  }
50
50
  function te(e) {
51
51
  if (e.preventDefault(), e.stopPropagation(), n.value !== 1)
52
52
  return;
53
- var t = e.dataTransfer, f = [], V = 0, I = t.files.length;
53
+ var a = e.dataTransfer, f = [], V = 0, I = a.files.length;
54
54
  function p() {
55
- V === I - 1 && ee(f), V++;
55
+ V === I - 1 && ae(f), V++;
56
56
  }
57
- if (t.items !== void 0)
58
- for (var C = 0; C < t.items.length; C++) {
59
- var D = t.items[C];
60
- if (D.kind === "file" && D.webkitGetAsEntry().isFile) {
61
- var le = D.getAsFile();
62
- f.push(le), p();
57
+ if (a.items !== void 0)
58
+ for (var D = 0; D < a.items.length; D++) {
59
+ var C = a.items[D];
60
+ if (C.kind === "file" && C.webkitGetAsEntry().isFile) {
61
+ var ne = C.getAsFile();
62
+ f.push(ne), p();
63
63
  }
64
64
  }
65
65
  else
66
66
  for (let S = 0; S < I; S++) {
67
- var m = t.files[S];
67
+ var m = a.files[S];
68
68
  if (m.type)
69
69
  f.push(m), p();
70
70
  else
@@ -88,41 +88,41 @@ const De = ["accept"], Fe = {
88
88
  }
89
89
  }
90
90
  }
91
- async function ae(e) {
92
- const t = e.target;
93
- await L(t?.files), v.value && (v.value.value = "");
91
+ async function oe(e) {
92
+ const a = e.target;
93
+ await L(a?.files), v.value && (v.value.value = "");
94
94
  }
95
95
  async function L(e) {
96
96
  if (e?.length) {
97
97
  if (e[0].size > k * 1024 * 1024) {
98
98
  c.warning(
99
- Q || s("ap.apUpload.maxUploadFileSize", {
99
+ X || s("ap.apUpload.maxUploadFileSize", {
100
100
  maxSize: k
101
101
  })
102
102
  );
103
103
  return;
104
104
  }
105
- if (!ge(e[0], _)) {
105
+ if (!he(e[0], _)) {
106
106
  c.warning(
107
- X || s("ap.apUpload.fileFormatNotSupported")
107
+ Y || s("ap.apUpload.fileFormatNotSupported")
108
108
  );
109
109
  return;
110
110
  }
111
111
  if (typeof R == "function" && await R(e[0]) === !1)
112
112
  return;
113
- if (o.value = e[0], n.value = 2, d.value = 0, u.value++, typeof B == "function") {
113
+ if (l.value = e[0], n.value = 2, d.value = 0, u.value++, typeof B == "function") {
114
114
  B({
115
- onProgress: (t) => {
116
- d.value = t;
115
+ onProgress: (a) => {
116
+ d.value = a;
117
117
  },
118
- onError: (t) => {
119
- U && c.warning(t || s("ap.apUpload.networkAnomaly")), n.value = 1, o.value = null, u.value--;
118
+ onError: (a) => {
119
+ U && c.warning(a || s("ap.apUpload.networkAnomaly")), n.value = 1, l.value = null, u.value--;
120
120
  },
121
- onSuccess: (t) => {
121
+ onSuccess: (a) => {
122
122
  i.value = $(
123
123
  w,
124
- t,
125
- o.value.name
124
+ a,
125
+ l.value.name
126
126
  ), n.value = 3, u.value--;
127
127
  },
128
128
  file: e[0]
@@ -130,43 +130,44 @@ const De = ["accept"], Fe = {
130
130
  return;
131
131
  }
132
132
  try {
133
- await me(K), W({
134
- file: o.value,
133
+ await ge(Q), W({
134
+ file: l.value,
135
135
  dirName: H,
136
- oss: b,
137
- successCallBack(t) {
136
+ oss: z,
137
+ successCallBack(a) {
138
138
  i.value = $(
139
139
  w,
140
- t,
141
- o.value.name
140
+ a,
141
+ l.value.name
142
142
  ), n.value = 3, u.value--;
143
143
  },
144
- errorCallBack(t) {
145
- U && c.warning(t || s("ap.apUpload.networkAnomaly")), n.value = 1, o.value = null, u.value--;
144
+ errorCallBack(a) {
145
+ U && c.warning(a || s("ap.apUpload.networkAnomaly")), n.value = 1, l.value = null, u.value--;
146
146
  },
147
- progressCallBack(t) {
148
- d.value = t;
149
- }
147
+ progressCallBack(a) {
148
+ d.value = a;
149
+ },
150
+ baseDirName: J
150
151
  });
151
- } catch (t) {
152
+ } catch (a) {
152
153
  U && c.warning(
153
- typeof t?.message == "string" ? t.message : s("ap.apUpload.networkAnomaly")
154
- ), n.value = 1, o.value = null, u.value--;
154
+ typeof a?.message == "string" ? a.message : s("ap.apUpload.networkAnomaly")
155
+ ), n.value = 1, l.value = null, u.value--;
155
156
  }
156
157
  }
157
158
  }
158
- function oe() {
159
- M && M?.(o.value), o.value && !i?.value && b.pauseUpload(), n.value = 1, o.value = null, i.value = void 0;
159
+ function le() {
160
+ M && M?.(l.value), l.value && !i?.value && z.pauseUpload(), n.value = 1, l.value = null, i.value = void 0;
160
161
  }
161
- return (e, t) => (h(), E("div", {
162
- class: ie({
163
- [a(z)()]: !0,
164
- [a(z)("un")]: n.value === 1,
165
- [a(G) ?? ""]: !0
162
+ return (e, a) => (h(), N("div", {
163
+ class: ce({
164
+ [t(x)()]: !0,
165
+ [t(x)("un")]: n.value === 1,
166
+ [t(G) ?? ""]: !0
166
167
  }),
167
- onClick: Y,
168
+ onClick: Z,
168
169
  onDragenter: O,
169
- onDragover: Z,
170
+ onDragover: ee,
170
171
  onDragleave: O,
171
172
  onDrop: te
172
173
  }, [
@@ -175,53 +176,53 @@ const De = ["accept"], Fe = {
175
176
  ref: v,
176
177
  style: { display: "none" },
177
178
  type: "file",
178
- accept: a(_),
179
- onChange: ae
180
- }, null, 40, De),
181
- n.value === 1 ? (h(), E("div", Fe, [
179
+ accept: t(_),
180
+ onChange: oe
181
+ }, null, 40, Fe),
182
+ n.value === 1 ? (h(), N("div", Se, [
182
183
  r("img", {
183
184
  class: "state-un-icon",
184
- src: a(q)
185
- }, null, 8, Se),
186
- r("div", Ee, x(a(J)), 1),
187
- r("div", Ne, x(typeof a(y) == "string" && a(y).length > 0 ? a(y) : `${a(s)("ap.apUpload.supportExtension")}:${a(he)(
188
- a(_)
189
- )},${a(s)("ap.apUpload.maxWarnUploadFileSize", {
190
- maxSize: a(k)
185
+ src: t(q)
186
+ }, null, 8, Ne),
187
+ r("div", Ee, b(t(K)), 1),
188
+ r("div", be, b(typeof t(y) == "string" && t(y).length > 0 ? t(y) : `${t(s)("ap.apUpload.supportExtension")}:${t(_e)(
189
+ t(_)
190
+ )},${t(s)("ap.apUpload.maxWarnUploadFileSize", {
191
+ maxSize: t(k)
191
192
  })}`), 1)
192
- ])) : N("", !0),
193
- [2, 3].includes(n.value) ? (h(), E("div", xe, [
193
+ ])) : E("", !0),
194
+ [2, 3].includes(n.value) ? (h(), N("div", xe, [
194
195
  r("div", ze, [
195
- r("img", { src: a(q) }, null, 8, be)
196
+ r("img", { src: t(q) }, null, 8, Ae)
196
197
  ]),
197
- r("div", Ae, [
198
+ r("div", Re, [
198
199
  r("div", {
199
200
  class: "center-title",
200
- style: ce({
201
+ style: ue({
201
202
  color: T.value ? "#0070FF" : "#182948"
202
203
  })
203
- }, x(o.value?.name), 5),
204
- r("div", Re, [
205
- T.value ? N("", !0) : (h(), ue(a(_e), {
204
+ }, b(l.value?.name), 5),
205
+ r("div", Be, [
206
+ T.value ? E("", !0) : (h(), pe(t(ke), {
206
207
  key: 0,
207
208
  percent: d.value,
208
209
  size: 4,
209
210
  "show-info": !1,
210
- "trail-color": a(A).borderColorBase,
211
- "stroke-color": a(A).colorPrimary
211
+ "trail-color": t(A).borderColorBase,
212
+ "stroke-color": t(A).colorPrimary
212
213
  }, null, 8, ["percent", "trail-color", "stroke-color"]))
213
214
  ])
214
215
  ]),
215
216
  r("div", {
216
217
  class: "right",
217
- onClick: pe(oe, ["stop"])
218
+ onClick: de(le, ["stop"])
218
219
  }, [
219
- de(a(ke))
220
+ ve(t(ye))
220
221
  ])
221
- ])) : N("", !0)
222
+ ])) : E("", !0)
222
223
  ], 34));
223
224
  }
224
225
  });
225
226
  export {
226
- He as default
227
+ Je as default
227
228
  };
@@ -4,13 +4,14 @@ import { Ref } from 'vue';
4
4
  export type { Oss } from '@aplus-frontend/oss';
5
5
  export type GetOssAccess = () => Promise<accessCreate>;
6
6
  export declare function injectLocaleToOss(tValue: Translator, langValue: Ref<string>): void;
7
- declare function put({ file, dirName, oss, successCallBack, errorCallBack, progressCallBack }: {
7
+ declare function put({ file, dirName, oss, successCallBack, errorCallBack, progressCallBack, baseDirName }: {
8
8
  file: File;
9
9
  dirName: string;
10
10
  oss: Oss;
11
11
  successCallBack: (saveUrl: string, previewUrl: string) => void;
12
12
  errorCallBack: (msg: string) => void;
13
13
  progressCallBack: (p: number) => void;
14
+ baseDirName?: string;
14
15
  }): Promise<void>;
15
16
  export declare function useOss(): {
16
17
  client: Oss;
@@ -1,80 +1,82 @@
1
- import { client as i, createOssInstance as m } from "@aplus-frontend/oss";
2
- let t, l;
3
- function y(e, s) {
4
- t = e, l = s;
1
+ import { client as i, createOssInstance as w } from "@aplus-frontend/oss";
2
+ let n, l;
3
+ function U(e, s) {
4
+ n = e, l = s;
5
5
  }
6
- const w = {
6
+ const g = {
7
7
  "zh-cn": "zh_CN",
8
8
  en: "en_US"
9
9
  };
10
10
  function p() {
11
- return w[l.value] ?? "zh_CN";
11
+ return g[l.value] ?? "zh_CN";
12
12
  }
13
- async function g({
13
+ async function d({
14
14
  file: e,
15
15
  dirName: s,
16
- oss: n,
16
+ oss: t,
17
17
  successCallBack: c,
18
18
  errorCallBack: o,
19
- progressCallBack: u
19
+ progressCallBack: u,
20
+ baseDirName: f = "Frontend-Upload"
20
21
  }) {
21
22
  if (!s) {
22
23
  o("required dirName");
23
24
  return;
24
25
  }
25
26
  try {
26
- const a = await n.put({
27
+ const a = await t.put({
27
28
  fileName: e.name,
28
29
  dirName: s,
29
30
  data: e,
30
31
  progressCallBack: (r) => {
31
32
  u(r);
32
- }
33
+ },
34
+ baseDirName: f
33
35
  });
34
36
  if (a.status === 204)
35
37
  return;
36
38
  if (a.status === 200) {
37
- const { saveUrl: r, previewUrl: f } = a;
38
- c(r, f);
39
+ const { saveUrl: r, previewUrl: m } = a;
40
+ c(r, m);
39
41
  } else
40
- o(a?.message || t("ap.apUpload.networkAnomaly"));
42
+ o(a?.message || n("ap.apUpload.networkAnomaly"));
41
43
  } catch (a) {
42
44
  o(a);
43
45
  }
44
46
  }
45
47
  function O() {
46
- return { client: i, put: g };
48
+ return { client: i, put: d };
47
49
  }
48
50
  async function h(e) {
49
51
  if (!e)
50
- throw new Error(`${t("ap.apUpload.pleasePass")}getOssAccess`);
52
+ throw new Error(`${n("ap.apUpload.pleasePass")}getOssAccess`);
51
53
  return await i.initOssClient({
52
54
  getOssAccess: e,
53
55
  locale: p(),
54
56
  onFailure: (s) => {
55
57
  throw new Error(
56
- typeof s?.message == "string" ? s.message : t("ap.apUpload.FailedToObtainOssTemporaryPermissions")
58
+ typeof s?.message == "string" ? s.message : n("ap.apUpload.FailedToObtainOssTemporaryPermissions")
57
59
  );
58
60
  }
59
61
  }), O();
60
62
  }
61
- async function U(e) {
63
+ async function F(e) {
62
64
  if (!e)
63
- throw new Error(`${t("ap.apUpload.pleasePass")}getOssAccess`);
64
- const s = m();
65
+ throw new Error(`${n("ap.apUpload.pleasePass")}getOssAccess`);
66
+ const s = w();
65
67
  return await s.initOssClient({
66
68
  getOssAccess: e,
67
69
  locale: p(),
68
- onFailure: (n) => {
70
+ onFailure: (t) => {
69
71
  throw new Error(
70
- typeof n?.message == "string" ? n.message : t("ap.apUpload.FailedToObtainOssTemporaryPermissions")
72
+ typeof t?.message == "string" ? t.message : n("ap.apUpload.FailedToObtainOssTemporaryPermissions")
71
73
  );
72
74
  }
73
75
  }), s;
74
76
  }
75
77
  export {
76
- U as getOssInstance,
77
- y as injectLocaleToOss,
78
+ F as getOssInstance,
79
+ U as injectLocaleToOss,
78
80
  O as useOss,
79
81
  h as useOssInit
80
82
  };
@@ -139,7 +139,7 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
139
139
  allowClear: boolean;
140
140
  }> & Omit<Readonly< ApFieldTextProps> & Readonly<{
141
141
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
142
- }>, "blur" | "focus" | "input" | "select" | ("type" | "mode" | "disabled" | "bordered" | "emptyText" | "lazy" | "allowClear") | "setSelectionRange"> & ShallowUnwrapRef<{
142
+ }>, "blur" | "focus" | "input" | "select" | "setSelectionRange" | ("type" | "mode" | "disabled" | "bordered" | "emptyText" | "lazy" | "allowClear")> & ShallowUnwrapRef<{
143
143
  focus: (options?: InputFocusOptions) => void;
144
144
  blur: () => void;
145
145
  input: any;
@@ -1,19 +1,19 @@
1
- import { defineComponent as A, ref as p, unref as s, useSlots as K, toRef as O, watch as G, nextTick as W, createBlock as H, openBlock as U, mergeProps as c, withCtx as h, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
- import { Table as Z } from "@aplus-frontend/antdv";
3
- import { ApForm as b } from "../ap-form/index.mjs";
4
- import { isUndefined as M, isNumber as f, cloneDeep as ee, isArray as te, omit as g } from "lodash-unified";
1
+ import { defineComponent as z, ref as A, unref as s, useSlots as K, toRef as O, watch as G, nextTick as W, shallowRef as H, createBlock as U, openBlock as $, mergeProps as p, withCtx as c, createVNode as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
2
+ import { Table as M } from "@aplus-frontend/antdv";
3
+ import { ApForm as h } from "../ap-form/index.mjs";
4
+ import { isUndefined as ee, isNumber as d, cloneDeep as te, isArray as ae, omit as b } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
- import { useInjectForm as ae } from "../ap-form/context.mjs";
6
+ import { useInjectForm as oe } from "../ap-form/context.mjs";
7
7
  import "../utils/index.mjs";
8
- import oe from "./hooks/use-get-columns.mjs";
9
- import { scrollToRowIndex as ne } from "./utils.mjs";
10
- import { getModelValue as le } from "../ap-form/utils/get.mjs";
11
- import { useDevWarning as se } from "../utils/warning.mjs";
12
- import re from "./style/index.mjs";
13
- import { useNamespace as ie } from "../config-provider/hooks/use-namespace.mjs";
14
- import { useGlobalConfig as ue } from "../config-provider/hooks/use-global-config.mjs";
15
- import { isDef as w } from "../utils/is.mjs";
16
- const Te = /* @__PURE__ */ A({
8
+ import ne from "./hooks/use-get-columns.mjs";
9
+ import { scrollToRowIndex as le } from "./utils.mjs";
10
+ import { getModelValue as se } from "../ap-form/utils/get.mjs";
11
+ import { useDevWarning as re } from "../utils/warning.mjs";
12
+ import ie from "./style/index.mjs";
13
+ import { useNamespace as ue } from "../config-provider/hooks/use-namespace.mjs";
14
+ import { useGlobalConfig as fe } from "../config-provider/hooks/use-global-config.mjs";
15
+ import { isDef as g } from "../utils/is.mjs";
16
+ const ve = /* @__PURE__ */ z({
17
17
  name: "EditableTableFormItem",
18
18
  __name: "form-item",
19
19
  props: {
@@ -114,26 +114,26 @@ const Te = /* @__PURE__ */ A({
114
114
  default: () => ({})
115
115
  }
116
116
  },
117
- setup(x, {
118
- expose: y
117
+ setup(w, {
118
+ expose: x
119
119
  }) {
120
- const o = x;
121
- se("EditableTableFormItem")(!1, "breaking", "EditableTableFormItem has been EOL, Please use EditableAgGridFormItem(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
120
+ const o = w;
121
+ re("EditableTableFormItem")(!1, "breaking", "EditableTableFormItem has been EOL, Please use EditableAgGridFormItem(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
122
122
  const {
123
123
  internalInstance: i,
124
- model: C
125
- } = ae(), u = p(le(s(C), o.name) || []), R = K(), F = O(o, "name"), B = b.useWatch(F);
126
- G(() => B.value, async (e) => {
124
+ model: y
125
+ } = oe(), u = A(se(s(y), o.name) || []), C = K(), R = O(o, "name"), F = h.useWatch(R);
126
+ G(() => F.value, async (e) => {
127
127
  await W(), u.value = e, o.onChange?.(e);
128
128
  }, {
129
129
  deep: !0
130
130
  });
131
131
  const {
132
- b: I
133
- } = ie("editable-table"), T = re("editable-table"), m = p(), v = ue("valueTypeMap"), D = oe(o, v);
134
- function E(e, n) {
132
+ b: B
133
+ } = ue("editable-table"), I = ie("editable-table"), m = H(), T = fe("valueTypeMap"), v = ne(o, T);
134
+ function D(e, n) {
135
135
  const l = s(u)?.length || 0;
136
- if (w(o.maxLength) && l >= o.maxLength)
136
+ if (g(o.maxLength) && l >= o.maxLength)
137
137
  return;
138
138
  const t = {
139
139
  ...e || {}
@@ -143,41 +143,41 @@ const Te = /* @__PURE__ */ A({
143
143
  a[r] = [t];
144
144
  return;
145
145
  }
146
- M(n) ? a[r].push(t) : a[r].splice(n, 0, t);
146
+ ee(n) ? a[r].push(t) : a[r].splice(n, 0, t);
147
147
  });
148
148
  }
149
- function S(e, n = "suffix") {
150
- const l = s(u)?.length || 0, t = f(e) ? e : e.length;
151
- if (w(o.maxLength) && l + t > o.maxLength)
149
+ function E(e, n = "suffix") {
150
+ const l = s(u)?.length || 0, t = d(e) ? e : e.length;
151
+ if (g(o.maxLength) && l + t > o.maxLength)
152
152
  return;
153
- const a = f(e) ? new Array(e).fill(0).map(() => ({})) : ee(e);
154
- i?.setFieldValue(o.name, a, !0, (r, d) => {
155
- if (!r[d]) {
156
- r[d] = [...a];
153
+ const a = d(e) ? new Array(e).fill(0).map(() => ({})) : te(e);
154
+ i?.setFieldValue(o.name, a, !0, (r, f) => {
155
+ if (!r[f]) {
156
+ r[f] = [...a];
157
157
  return;
158
158
  }
159
- n === "suffix" ? r[d].push(...a) : r[d].unshift(...a);
159
+ n === "suffix" ? r[f].push(...a) : r[f].unshift(...a);
160
160
  });
161
161
  }
162
- function L(e) {
163
- const n = new Set(f(e) ? [e] : e);
162
+ function S(e) {
163
+ const n = new Set(d(e) ? [e] : e);
164
164
  i?.setFieldValue(o.name, void 0, !0, (l, t) => {
165
165
  l[t] = l[t].filter((a, r) => !n.has(r));
166
166
  });
167
167
  }
168
- function V(e) {
169
- const n = new Set(te(e) ? e : [e]);
168
+ function L(e) {
169
+ const n = new Set(ae(e) ? e : [e]);
170
170
  n.size !== 0 && i?.setFieldValue?.(o.name, void 0, !0, (l, t) => {
171
171
  l[t] = l[t].filter((a) => !n.has(a[o.rowKey]));
172
172
  });
173
173
  }
174
- function k() {
174
+ function V() {
175
175
  return s(u);
176
176
  }
177
- function N(e) {
177
+ function k(e) {
178
178
  return s(u)?.[e];
179
179
  }
180
- function _(e, n, l = !0) {
180
+ function N(e, n, l = !0) {
181
181
  i?.setFieldValue(o.name, void 0, !0, (t, a) => {
182
182
  !t[a] || !t[a][e] || (t[a][e] = {
183
183
  ...l ? t[a][e] : {},
@@ -185,47 +185,47 @@ const Te = /* @__PURE__ */ A({
185
185
  });
186
186
  });
187
187
  }
188
- function P(e) {
188
+ function _(e) {
189
189
  i?.setFieldValue(o.name, e);
190
190
  }
191
- function j(e, n) {
191
+ function P(e, n) {
192
192
  const l = e === "end" ? u.value.length - 1 : e;
193
- ne(l, m.value?.$el, n);
193
+ le(l, m.value?.$el, n);
194
194
  }
195
- function z() {
195
+ function j() {
196
196
  i?.setFieldValue?.(o.name, []);
197
197
  }
198
- return y({
199
- add: E,
200
- remove: L,
201
- getRowData: N,
202
- getRowsData: k,
203
- setRowData: _,
204
- addMultiple: S,
205
- scrollTo: j,
206
- setTableData: P,
207
- clear: z,
208
- removeByKey: V
209
- }), (e, n) => (U(), H(s(b).FormItem, c(e.formItem, {
198
+ return x({
199
+ add: D,
200
+ remove: S,
201
+ getRowData: k,
202
+ getRowsData: V,
203
+ setRowData: N,
204
+ addMultiple: E,
205
+ scrollTo: P,
206
+ setTableData: _,
207
+ clear: j,
208
+ removeByKey: L
209
+ }), (e, n) => ($(), U(s(h).FormItem, p(e.formItem, {
210
210
  name: e.name,
211
211
  label: e.label
212
212
  }), {
213
- default: h(() => [$(s(Z), c(s(g)(o, ["name", "maxLength", "onChange"]), {
213
+ default: c(() => [q(s(M), p(s(b)(o, ["name", "maxLength", "onChange"]), {
214
214
  ref_key: "tableRef",
215
215
  ref: m,
216
- class: [s(I)(), s(T)],
217
- columns: s(D),
216
+ class: [s(B)(), s(I)],
217
+ columns: s(v),
218
218
  "data-source": u.value
219
- }), q({
219
+ }), J({
220
220
  _: 2
221
- }, [J(s(g)(R, ["headerCell"]), (l, t) => ({
221
+ }, [Q(s(b)(C, ["headerCell"]), (l, t) => ({
222
222
  name: t,
223
- fn: h((a) => [Q(e.$slots, t, X(Y(a || {})))])
223
+ fn: c((a) => [X(e.$slots, t, Y(Z(a || {})))])
224
224
  }))]), 1040, ["class", "columns", "data-source"])]),
225
225
  _: 3
226
226
  }, 16, ["name", "label"]));
227
227
  }
228
228
  });
229
229
  export {
230
- Te as default
230
+ ve as default
231
231
  };