@aplus-frontend/ui 0.4.5 → 0.4.7

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 (57) hide show
  1. package/es/src/ap-field/date/index.vue.d.ts +1 -0
  2. package/es/src/ap-field/date/index.vue.mjs +22 -15
  3. package/es/src/ap-field/date-range/index.vue.mjs +46 -42
  4. package/es/src/ap-field/hooks/use-default-presets.d.ts +11 -0
  5. package/es/src/ap-field/hooks/use-default-presets.mjs +15 -0
  6. package/es/src/ap-field/interface.d.ts +7 -1
  7. package/es/src/ap-table/ap-table.vue2.mjs +87 -85
  8. package/es/src/ap-table/components/dynamic-component/diff.d.ts +2 -0
  9. package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +4 -0
  10. package/es/src/ap-table/components/dynamic-component/index.vue.mjs +4 -0
  11. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +14 -0
  12. package/es/src/ap-table/components/interface.d.ts +3 -0
  13. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +55 -55
  14. package/es/src/ap-table/constants.d.ts +3 -0
  15. package/es/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  16. package/es/src/ap-table/hooks/use-table-column-state.mjs +92 -92
  17. package/es/src/ap-table/utils.d.ts +1549 -1539
  18. package/es/src/ap-table/utils.mjs +115 -104
  19. package/es/src/ap-upload/components/Picture.vue2.mjs +59 -55
  20. package/es/src/business/batch-input-group/form-item.vue.mjs +7 -6
  21. package/es/src/business/batch-input-group/interface.d.ts +5 -0
  22. package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
  23. package/es/src/locale/lang/en.mjs +10 -1
  24. package/es/src/locale/lang/zh-cn.mjs +10 -1
  25. package/es/src/utils/data-range-persets.d.ts +87 -0
  26. package/es/src/utils/data-range-persets.mjs +107 -0
  27. package/lib/src/ap-field/date/index.vue.d.ts +1 -0
  28. package/lib/src/ap-field/date/index.vue.js +1 -1
  29. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  30. package/lib/src/ap-field/hooks/use-default-presets.d.ts +11 -0
  31. package/lib/src/ap-field/hooks/use-default-presets.js +1 -0
  32. package/lib/src/ap-field/interface.d.ts +7 -1
  33. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  34. package/lib/src/ap-table/components/dynamic-component/diff.d.ts +2 -0
  35. package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +4 -0
  36. package/lib/src/ap-table/components/dynamic-component/index.vue.js +1 -0
  37. package/lib/src/ap-table/components/dynamic-component/index.vue2.js +1 -0
  38. package/lib/src/ap-table/components/interface.d.ts +3 -0
  39. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  40. package/lib/src/ap-table/constants.d.ts +3 -0
  41. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  42. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  43. package/lib/src/ap-table/utils.d.ts +1549 -1539
  44. package/lib/src/ap-table/utils.js +1 -1
  45. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  46. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  47. package/lib/src/business/batch-input-group/interface.d.ts +5 -0
  48. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
  49. package/lib/src/locale/lang/en.js +1 -1
  50. package/lib/src/locale/lang/zh-cn.js +1 -1
  51. package/lib/src/utils/data-range-persets.d.ts +87 -0
  52. package/lib/src/utils/data-range-persets.js +1 -0
  53. package/package.json +3 -3
  54. package/theme/ap-table/ap-table.css +4 -4
  55. package/theme/ap-table/ap-table.less +4 -4
  56. package/theme/ap-table-modal/index.css +4 -4
  57. package/theme/index.css +4 -4
@@ -1,20 +1,22 @@
1
- import { isVNode as g, createVNode as u, mergeProps as m, cloneVNode as h, Fragment as j } from "vue";
2
- import { isObject as a, isArray as l, isUndefined as E, isFunction as y, omit as O, isBoolean as F, isString as N, isEqual as S, sortBy as p, isPlainObject as d, every as I, isEmpty as v } from "lodash-unified";
3
- import { apTableRenderItemMap as C, apTableFormItemMap as P } from "./constants.mjs";
4
- import { isType as V } from "@fruits-chain/utils";
1
+ import { isVNode as E, createVNode as l, mergeProps as y, cloneVNode as j, Fragment as O } from "vue";
2
+ import { isObject as a, isArray as c, isUndefined as g, isFunction as T, omit as C, isBoolean as F, isString as N, isEqual as S, sortBy as p, isPlainObject as m, every as I, isEmpty as v } from "lodash-unified";
3
+ import { apTableRenderItemMap as P, apTableFormItemMap as V } from "./constants.mjs";
4
+ import { isType as _ } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
6
6
  import { Tooltip as w } from "@aplus-frontend/antdv";
7
- import { QuestionCircleOutlined as A } from "@ant-design/icons-vue";
8
- import x from "../ap-form/item/index.vue.mjs";
9
- function _(t) {
10
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !g(t);
7
+ import { QuestionCircleOutlined as x } from "@ant-design/icons-vue";
8
+ import "./components/dynamic-component/index.vue.mjs";
9
+ import d from "./components/dynamic-component/index.vue2.mjs";
10
+ import A from "../ap-form/item/index.vue.mjs";
11
+ function R(t) {
12
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !E(t);
11
13
  }
12
14
  const q = (t, e, n) => {
13
15
  let o = {};
14
- return a(t) ? Object.keys(t).forEach((r) => {
15
- a(t[r]) ? o[r] = q(t[r], e[r], n) : o[r] = n(t[r], e);
16
+ return a(t) ? Object.keys(t).forEach((i) => {
17
+ a(t[i]) ? o[i] = q(t[i], e[i], n) : o[i] = n(t[i], e);
16
18
  }) : o = n(t, e), o;
17
- }, X = (t, e) => {
19
+ }, k = (t, e) => {
18
20
  switch (t) {
19
21
  case "dayjs":
20
22
  return e.valueOf();
@@ -26,7 +28,7 @@ const q = (t, e, n) => {
26
28
  }
27
29
  case "multiple":
28
30
  case "multipleNumber":
29
- return l(e) ? e : [e];
31
+ return c(e) ? e : [e];
30
32
  case "boolean":
31
33
  return e;
32
34
  case "object":
@@ -35,103 +37,112 @@ const q = (t, e, n) => {
35
37
  return e;
36
38
  }
37
39
  };
38
- function Y(t) {
39
- return l(t) ? t.join(".") : t;
40
+ function H(t) {
41
+ return c(t) ? t.join(".") : t;
40
42
  }
41
43
  function W(t) {
42
44
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
43
45
  return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
44
46
  }
45
- const B = (t) => W(t) === "map" ? t : new Map(Object.entries(t || {})), T = (t) => {
46
- const e = [], n = B(t);
47
- return n.forEach((o, r) => {
48
- const i = n.get(r) || n.get(`${r}`);
49
- if (i) {
50
- if (typeof i == "object" && (i != null && i.text)) {
47
+ const $ = (t) => W(t) === "map" ? t : new Map(Object.entries(t || {})), b = (t) => {
48
+ const e = [], n = $(t);
49
+ return n.forEach((o, i) => {
50
+ const r = n.get(i) || n.get(`${i}`);
51
+ if (r) {
52
+ if (typeof r == "object" && (r != null && r.text)) {
51
53
  e.push({
52
- text: i == null ? void 0 : i.text,
53
- value: r,
54
- label: i == null ? void 0 : i.text,
55
- disabled: i.disabled
54
+ text: r == null ? void 0 : r.text,
55
+ value: i,
56
+ label: r == null ? void 0 : r.text,
57
+ disabled: r.disabled
56
58
  });
57
59
  return;
58
60
  }
59
61
  e.push({
60
- text: i,
61
- label: i,
62
- value: r
62
+ text: r,
63
+ label: r,
64
+ value: i
63
65
  });
64
66
  }
65
67
  }), e;
66
- }, Z = (t) => E(t) || t < 0 ? 0 : t;
67
- function R(t, e) {
68
- return !t || !y(t) ? t : t(e);
68
+ }, M = (t) => g(t) || t < 0 ? 0 : t;
69
+ function B(t, e) {
70
+ return !t || !T(t) ? t : t(e);
69
71
  }
70
- function k(t) {
72
+ function tt(t) {
71
73
  let e = t.valueType || "text";
72
74
  return t.valueEnum && (e = "status"), e;
73
75
  }
74
- function H(t, e, n, o) {
75
- var s;
76
- const r = C[t];
77
- if (r)
78
- return u(r, m(e, {
76
+ function et(t, e, n, o) {
77
+ var u;
78
+ const i = P[t];
79
+ if (i)
80
+ return l(i, y(e, {
79
81
  mode: "read"
80
82
  }), null);
81
- const i = o == null ? void 0 : o[t];
82
- return ((s = i == null ? void 0 : i.render) == null ? void 0 : s.call(i, e.value, n, e)) || e.value;
83
+ const r = o == null ? void 0 : o[t];
84
+ return ((u = r == null ? void 0 : r.render) == null ? void 0 : u.call(r, e.value, n, e)) || e.value;
83
85
  }
84
- function M(t, e) {
86
+ function nt(t, e) {
85
87
  if (t.customRenderFormItem)
86
- return () => {
87
- const r = t.customRenderFormItem(t);
88
- return h(r, {
89
- ...t.fieldProps,
90
- span: t.span,
91
- ...r.props || {}
92
- });
88
+ return {
89
+ Comp: d,
90
+ render: function(u) {
91
+ const s = u.item.customRenderFormItem(u.item);
92
+ return j(s, {
93
+ ...u.item.fieldProps,
94
+ span: u.item.span,
95
+ ...s.props || {}
96
+ });
97
+ }
93
98
  };
94
- const n = P[t.valueType];
99
+ const n = V[t.valueType];
95
100
  if (n)
96
- return n;
101
+ return {
102
+ Comp: n
103
+ };
97
104
  const o = e == null ? void 0 : e[t.valueType];
98
- return () => {
99
- var i;
100
- const r = (i = o == null ? void 0 : o.renderFormItem) == null ? void 0 : i.call(o, t.fieldProps.field);
101
- return r ? u(x, m(t.fieldProps, {
102
- span: t.span
103
- }), _(r) ? r : {
104
- default: () => [r]
105
+ function i(r) {
106
+ var s;
107
+ const u = (s = o == null ? void 0 : o.renderFormItem) == null ? void 0 : s.call(o, r.item.fieldProps.field);
108
+ return u ? l(A, y(r.item.fieldProps, {
109
+ span: r.item.fieldProps
110
+ }), R(u) ? u : {
111
+ default: () => [u]
105
112
  }) : null;
113
+ }
114
+ return {
115
+ Comp: d,
116
+ render: i
106
117
  };
107
118
  }
108
- function tt(t, e) {
109
- const n = R(t.fieldProps, e), o = (n == null ? void 0 : n.field) || n || {}, r = t.valueType === "switch", i = t.valueType === "index", s = r ? {
119
+ function rt(t, e) {
120
+ const n = B(t.fieldProps, e), o = (n == null ? void 0 : n.field) || n || {}, i = t.valueType === "switch", r = t.valueType === "index", u = i ? {
110
121
  checked: e.value
111
122
  } : {
112
- value: i ? e.index + 1 : e.value
123
+ value: r ? e.index + 1 : e.value
113
124
  };
114
125
  return t.valueEnum && (o.valueEnum = t.valueEnum), {
115
- ...O(o, ["request"]),
116
- ...s
126
+ ...C(o, ["request"]),
127
+ ...u
117
128
  };
118
129
  }
119
- function et(t) {
130
+ function ot(t) {
120
131
  const e = {
121
132
  ...t
122
133
  };
123
- return F(t.filters) && t.filters && t.valueEnum && (e.filters = T(t.valueEnum)), e;
134
+ return F(t.filters) && t.filters && t.valueEnum && (e.filters = b(t.valueEnum)), e;
124
135
  }
125
- function nt(t, e) {
136
+ function it(t, e) {
126
137
  var o;
127
138
  const n = e || {};
128
139
  return t.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
129
140
  ...n.field,
130
- options: T(t.valueEnum)
141
+ options: b(t.valueEnum)
131
142
  }), n;
132
143
  }
133
- function rt(t) {
134
- if (!V("Object")(t))
144
+ function ut(t) {
145
+ if (!_("Object")(t))
135
146
  return t;
136
147
  try {
137
148
  return JSON.stringify(t);
@@ -139,75 +150,75 @@ function rt(t) {
139
150
  return t;
140
151
  }
141
152
  }
142
- function ot(t, e, n, o) {
143
- const r = n == null ? void 0 : n({
153
+ function st(t, e, n, o) {
154
+ const i = n == null ? void 0 : n({
144
155
  title: t.title,
145
156
  column: t
146
- }), i = (r == null ? void 0 : r.filter((b) => b.type !== Symbol.for("v-cmt"))) || [];
147
- if (r && i.length > 0)
148
- return r;
149
- const c = N(t.title) ? u("span", {
157
+ }), r = (i == null ? void 0 : i.filter((h) => h.type !== Symbol.for("v-cmt"))) || [];
158
+ if (i && r.length > 0)
159
+ return i;
160
+ const s = N(t.title) ? l("span", {
150
161
  class: e,
151
162
  title: t.title
152
- }, [t.title]) : t.title, f = t.tooltip ? y(t.tooltip) ? t.tooltip(t) : u(j, null, [t.tooltip]) : null;
153
- return f ? u("span", {
163
+ }, [t.title]) : t.title, f = t.tooltip ? T(t.tooltip) ? t.tooltip(t) : l(O, null, [t.tooltip]) : null;
164
+ return f ? l("span", {
154
165
  style: {
155
166
  display: "inline-flex",
156
167
  alignItems: "center",
157
168
  maxWidth: "100%"
158
169
  }
159
- }, [c, u(w, {
170
+ }, [s, l(w, {
160
171
  title: f,
161
172
  placement: "bottom"
162
173
  }, {
163
- default: () => [u(A, {
174
+ default: () => [l(x, {
164
175
  style: {
165
176
  padding: "4px",
166
177
  color: o,
167
178
  verticalAlign: "middle"
168
179
  }
169
180
  }, null)]
170
- })]) : c;
181
+ })]) : s;
171
182
  }
172
- function it(t, e) {
183
+ function lt(t, e) {
173
184
  const n = [];
174
- function o(r) {
175
- var i;
176
- for (const s of r)
177
- (i = s.children) != null && i.length ? o(s.children) : n.push(e(s));
185
+ function o(i) {
186
+ var r;
187
+ for (const u of i)
188
+ (r = u.children) != null && r.length ? o(u.children) : n.push(e(u));
178
189
  }
179
190
  return o(t), n;
180
191
  }
181
- function st(t, e) {
182
- if (l(t) && l(e))
192
+ function ct(t, e) {
193
+ if (c(t) && c(e))
183
194
  return S(p(t), p(e));
184
- if (d(t) && d(e)) {
185
- const n = (o) => I(o, (r) => r == null) || v(o);
195
+ if (m(t) && m(e)) {
196
+ const n = (o) => I(o, (i) => i == null) || v(o);
186
197
  if (n(t) && n(e))
187
198
  return !0;
188
199
  }
189
200
  }
190
- function ut(t) {
201
+ function ft(t) {
191
202
  if (t !== !1)
192
203
  return t;
193
204
  }
194
205
  export {
195
- et as apColumnToColumn,
196
- Y as dataIndexToStr,
197
- ut as falseToUndefined,
206
+ ot as apColumnToColumn,
207
+ H as dataIndexToStr,
208
+ ft as falseToUndefined,
198
209
  q as formatParamsValueType,
199
- Z as getColumnOrder,
200
- R as getFieldProps,
201
- M as getSearchFormItemRenderNode,
202
- H as getTableCellRenderNode,
203
- tt as getTableRenderProps,
204
- k as getTableRenderType,
205
- ot as getTableTitle,
206
- st as isEqualCustom,
207
- B as objectToMap,
208
- rt as objectToString,
209
- X as parseFieldValue,
210
- it as recursionApColumns,
211
- nt as updateFormProps,
212
- T as valueEnumToArray
210
+ M as getColumnOrder,
211
+ B as getFieldProps,
212
+ nt as getSearchFormItemRenderNode,
213
+ et as getTableCellRenderNode,
214
+ rt as getTableRenderProps,
215
+ tt as getTableRenderType,
216
+ st as getTableTitle,
217
+ ct as isEqualCustom,
218
+ $ as objectToMap,
219
+ ut as objectToString,
220
+ k as parseFieldValue,
221
+ lt as recursionApColumns,
222
+ it as updateFormProps,
223
+ b as valueEnumToArray
213
224
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as X, inject as c, ref as R, watch as Y, nextTick as Z, openBlock as g, createElementBlock as h, normalizeClass as F, unref as i, createElementVNode as d, renderSlot as ee, Fragment as te, renderList as ne, withDirectives as ae, createVNode as U, createCommentVNode as M, vShow as se, toDisplayString as k } from "vue";
1
+ import { defineComponent as X, inject as u, ref as R, watch as Y, nextTick as Z, openBlock as g, createElementBlock as h, normalizeClass as F, unref as i, createElementVNode as d, renderSlot as ee, Fragment as te, renderList as ne, withDirectives as ae, createVNode as U, createCommentVNode as $, vShow as se, toDisplayString as k } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getPath as oe, getName as ie, getReturnData as $ } from "../utils/returnData.mjs";
3
+ import { getPath as oe, getName as ie, getReturnData as I } from "../utils/returnData.mjs";
4
4
  import { CloseOutlined as re, PlusOutlined as ce } from "@ant-design/icons-vue";
5
- import { useOss as ue, getOssInstance as I } from "../hooks/useOss.mjs";
5
+ import { useOss as ue, getOssInstance as M } from "../hooks/useOss.mjs";
6
6
  import { fileMatchesAccept as le, getAcceptText as pe } from "../utils/accept.mjs";
7
7
  import { message as m, Progress as de } from "@aplus-frontend/antdv";
8
8
  import { omit as me } from "lodash-unified";
@@ -14,46 +14,46 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
14
14
  }, ke = { class: "picture-title" }, Ce = { key: 0 }, Se = { key: 1 }, De = /* @__PURE__ */ X({
15
15
  __name: "Picture",
16
16
  setup(Ee, { expose: T }) {
17
- const { t: u } = fe(), { b: C } = ge("ap-upload-picture"), { put: D } = ue(), O = c("theme"), B = c("dirName"), _ = c("accept") || "image/*", w = c("maxSize") ?? 5, S = c("title"), l = c("maxCount") ?? 10, v = c("uploadingCount"), E = c("beforeUpload"), b = c("customRequest"), z = c("getOssAccess"), L = c("maxSizeErrorMsg"), q = c("maxCountErrorMsg"), V = c("acceptErrorMsg"), x = R(null), r = c("value"), y = c("needName");
18
- let s = R([]);
17
+ const { t: l } = fe(), { b: C } = ge("ap-upload-picture"), { put: D } = ue(), O = u("theme"), B = u("dirName"), _ = u("accept") || "image/*", w = u("maxSize") ?? 5, S = u("title"), p = u("maxCount") ?? 10, v = u("uploadingCount"), E = u("beforeUpload"), b = u("customRequest"), z = u("getOssAccess"), L = u("maxSizeErrorMsg"), q = u("maxCountErrorMsg"), V = u("acceptErrorMsg"), x = R(null), r = u("value"), y = u("needName");
18
+ let o = R([]);
19
19
  const f = [];
20
20
  Y(
21
21
  () => r == null ? void 0 : r.value,
22
22
  async function(e) {
23
23
  var a;
24
- !((a = s == null ? void 0 : s.value) != null && a.length) && e && A(e);
24
+ !((a = o == null ? void 0 : o.value) != null && a.length) && e && A(e);
25
25
  },
26
26
  { immediate: !0 }
27
27
  );
28
28
  function A(e) {
29
29
  if (!e) {
30
- r.value = void 0, f.splice(0, f.length), s.value = [];
30
+ r.value = void 0, f.splice(0, f.length), o.value = [];
31
31
  return;
32
32
  }
33
33
  Z(async () => {
34
34
  const a = [];
35
35
  for (let t of e) {
36
- const n = oe(y, t), o = ie(y, t), p = await I(z), Q = await p.getSignatureUrl(n), W = {
36
+ const n = oe(y, t), s = ie(y, t), c = await M(z), Q = await c.getSignatureUrl(n), W = {
37
37
  ...typeof t == "string" ? {} : t,
38
- ...new File([t], o, {}),
38
+ ...new File([t], s, {}),
39
39
  uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
40
40
  thumbUrl: Q,
41
41
  status: "success",
42
42
  percent: 100,
43
43
  path: n
44
44
  };
45
- a.push(W), p.destroy();
45
+ a.push(W), c.destroy();
46
46
  }
47
- if (l && a.length > l) {
47
+ if (p && a.length > p) {
48
48
  m.warning(
49
- u("ap.apUpload.fileInitializationException", {
50
- maxCount: l
49
+ l("ap.apUpload.fileInitializationException", {
50
+ maxCount: p
51
51
  })
52
52
  );
53
53
  return;
54
54
  }
55
55
  a.forEach((t) => {
56
- s.value.push(t), f.push({
56
+ o.value.push(t), f.push({
57
57
  uid: t.uid,
58
58
  path: t.path
59
59
  });
@@ -77,19 +77,19 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
77
77
  }
78
78
  let N;
79
79
  async function J(e) {
80
- if (l && l > 1 && s.value.length >= l)
80
+ if (p && p > 1 && o.value.length >= p)
81
81
  return clearTimeout(N), N = setTimeout(() => {
82
82
  m.warning(
83
- q || u("ap.apUpload.maxUploadPicture", { maxCount: l })
83
+ q || l("ap.apUpload.maxUploadPicture", { maxCount: p })
84
84
  );
85
85
  }), !1;
86
86
  if (e.size > w * 1024 * 1024)
87
87
  return m.warning(
88
- L || u("ap.apUpload.maxUploadFileSize", { maxSize: w })
88
+ L || l("ap.apUpload.maxUploadFileSize", { maxSize: w })
89
89
  ), !1;
90
90
  if (!/image\/\w+/.test(e.type) || !le(e, _))
91
91
  return m.warning(
92
- V || u("ap.apUpload.pictureFormatNotSupported")
92
+ V || l("ap.apUpload.pictureFormatNotSupported")
93
93
  ), !1;
94
94
  if (typeof E == "function" && await E(e) === !1)
95
95
  return !1;
@@ -104,28 +104,28 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
104
104
  };
105
105
  K(t, e);
106
106
  }, a.onerror = function() {
107
- m.warning(u("ap.apUpload.imageParsingFailed"));
107
+ m.warning(l("ap.apUpload.imageParsingFailed"));
108
108
  };
109
109
  }
110
110
  async function K(e, a) {
111
111
  if (v.value++, typeof b == "function") {
112
112
  b({
113
113
  onProgress: (t) => {
114
- const n = s.value.find((o) => o.uid === e.uid);
114
+ const n = o.value.find((s) => s.uid === e.uid);
115
115
  n && (n.percent = t);
116
116
  },
117
117
  onError: (t) => {
118
- m.warning(t || u("ap.apUpload.networkAnomaly"));
119
- const n = s.value.findIndex(
120
- (o) => o.uid === e.uid
118
+ m.warning(t || l("ap.apUpload.networkAnomaly"));
119
+ const n = o.value.findIndex(
120
+ (s) => s.uid === e.uid
121
121
  );
122
- n > -1 && s.value.splice(n, 1), v.value--;
122
+ n > -1 && o.value.splice(n, 1), v.value--;
123
123
  },
124
124
  onSuccess: (t) => {
125
- const n = s.value.find((o) => o.uid === e.uid);
125
+ const n = o.value.find((s) => s.uid === e.uid);
126
126
  n && (n.status = "success", n.path = t), r.value = [
127
127
  ...r.value || [],
128
- $(y, t, a.name)
128
+ I(y, t, a.name)
129
129
  ], f.push({
130
130
  uid: e.uid,
131
131
  path: t
@@ -136,56 +136,60 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
136
136
  return;
137
137
  }
138
138
  try {
139
- const t = await I(z);
140
- e.oss = t, s.value.push(e), D({
139
+ const t = await M(z);
140
+ e.oss = t, o.value.push(e), D({
141
141
  file: a,
142
142
  dirName: B,
143
143
  oss: t,
144
144
  successCallBack(n) {
145
- const o = s.value.find((p) => p.uid === e.uid);
146
- o && (o.status = "success", o.path = n), r.value = [
145
+ const s = o.value.find((c) => c.uid === e.uid);
146
+ s && (s.status = "success", s.path = n), r.value = [
147
147
  ...r.value || [],
148
- $(y, n, a.name)
148
+ I(y, n, a.name)
149
149
  ], f.push({
150
150
  uid: e.uid,
151
151
  path: n
152
152
  }), v.value--;
153
153
  },
154
154
  errorCallBack(n) {
155
- m.warning(n || u("ap.apUpload.networkAnomaly"));
156
- const o = s.value.findIndex(
157
- (p) => p.uid === e.uid
155
+ m.warning(n || l("ap.apUpload.networkAnomaly"));
156
+ const s = o.value.findIndex(
157
+ (c) => c.uid === e.uid
158
158
  );
159
- o > -1 && s.value.splice(o, 1), v.value--;
159
+ s > -1 && o.value.splice(s, 1), v.value--;
160
160
  },
161
161
  progressCallBack(n) {
162
- const o = s.value.find((p) => p.uid === e.uid);
163
- o && (o.percent = n);
162
+ const s = o.value.find((c) => c.uid === e.uid);
163
+ s && (s.percent = n);
164
164
  }
165
165
  });
166
166
  } catch (t) {
167
167
  m.warning(
168
- typeof (t == null ? void 0 : t.message) == "string" ? t.message : u("ap.apUpload.networkAnomaly")
168
+ typeof (t == null ? void 0 : t.message) == "string" ? t.message : l("ap.apUpload.networkAnomaly")
169
169
  );
170
- const n = s.value.findIndex((o) => o.uid === e.uid);
171
- n > -1 && s.value.splice(n, 1), v.value--;
170
+ const n = o.value.findIndex((s) => s.uid === e.uid);
171
+ n > -1 && o.value.splice(n, 1), v.value--;
172
172
  }
173
173
  }
174
174
  function P(e) {
175
- var t;
175
+ var t, n;
176
176
  if (e.path && r) {
177
177
  if (Array.isArray(r.value)) {
178
- const n = f.findIndex(
179
- (o) => o.uid === e.uid
178
+ const s = f.findIndex(
179
+ (c) => c.uid === e.uid
180
180
  );
181
- n >= 0 && (r.value = r == null ? void 0 : r.value.toSpliced(n, 1), f.splice(n, 1)), r.value.length === 0 && (r.value = void 0);
181
+ if (s >= 0) {
182
+ const c = ((t = r == null ? void 0 : r.value) == null ? void 0 : t.slice()) ?? [];
183
+ c == null || c.splice(s, 1), r.value = c, f.splice(s, 1);
184
+ }
185
+ r.value.length === 0 && (r.value = void 0);
182
186
  }
183
187
  } else
184
- (t = e == null ? void 0 : e.oss) == null || t.pauseUpload();
185
- const a = s.value.findIndex(
186
- (n) => n.uid === e.uid
188
+ (n = e == null ? void 0 : e.oss) == null || n.pauseUpload();
189
+ const a = o.value.findIndex(
190
+ (s) => s.uid === e.uid
187
191
  );
188
- return s.value.splice(a, 1), Promise.resolve(!0);
192
+ return o.value.splice(a, 1), Promise.resolve(!0);
189
193
  }
190
194
  return (e, a) => (g(), h("div", {
191
195
  class: F({
@@ -203,7 +207,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
203
207
  }, null, 40, he),
204
208
  d("div", ve, [
205
209
  ee(e.$slots, "pictureContext", {
206
- fileList: i(s).map((t) => {
210
+ fileList: i(o).map((t) => {
207
211
  var n;
208
212
  return {
209
213
  ...i(me)(t, "oss"),
@@ -214,7 +218,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
214
218
  }),
215
219
  remove: P
216
220
  }, () => [
217
- (g(!0), h(te, null, ne(i(s), (t) => (g(), h("div", {
221
+ (g(!0), h(te, null, ne(i(o), (t) => (g(), h("div", {
218
222
  key: t.uid,
219
223
  class: "picture-item"
220
224
  }, [
@@ -238,24 +242,24 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
238
242
  size: 4,
239
243
  "show-info": !1
240
244
  }, null, 8, ["percent"])
241
- ])) : M("", !0)
245
+ ])) : $("", !0)
242
246
  ], 512), [
243
247
  [se, t.status === "uploading"]
244
248
  ])
245
249
  ])
246
250
  ]))), 128))
247
251
  ]),
248
- i(l) === void 0 || i(s).length < i(l) ? (g(), h("div", {
252
+ i(p) === void 0 || i(o).length < i(p) ? (g(), h("div", {
249
253
  key: 0,
250
254
  class: "picture-upload",
251
255
  onClick: j
252
256
  }, [
253
257
  U(i(ce)),
254
- d("div", null, k(i(u)("ap.apUpload.update")), 1)
255
- ])) : M("", !0)
258
+ d("div", null, k(i(l)("ap.apUpload.update")), 1)
259
+ ])) : $("", !0)
256
260
  ]),
257
261
  d("div", ke, [
258
- i(S) ? (g(), h("div", Ce, k(i(S)), 1)) : (g(), h("div", Se, k(`${i(u)("ap.apUpload.supportExtension")}:${i(pe)(i(_))},${i(u)(
262
+ i(S) ? (g(), h("div", Ce, k(i(S)), 1)) : (g(), h("div", Se, k(`${i(l)("ap.apUpload.supportExtension")}:${i(pe)(i(_))},${i(l)(
259
263
  "ap.apUpload.maxUploadPictureSize",
260
264
  { maxSize: i(w) }
261
265
  )}`), 1))
@@ -5,7 +5,7 @@ import { isValid as s } from "@aplus-frontend/utils";
5
5
  import { omit as p } from "lodash-unified";
6
6
  import x from "../../ap-form/item/index.vue.mjs";
7
7
  import k from "./index.vue.mjs";
8
- const A = /* @__PURE__ */ b({
8
+ const q = /* @__PURE__ */ b({
9
9
  __name: "form-item",
10
10
  props: {
11
11
  htmlFor: {},
@@ -50,10 +50,11 @@ const A = /* @__PURE__ */ b({
50
50
  field: { default: () => ({}) },
51
51
  disabled: { type: Boolean, default: void 0 },
52
52
  placeholer: {},
53
- trim: { type: Boolean, default: !0 }
53
+ trim: { type: Boolean, default: !0 },
54
+ defaultSelectedAllKey: { type: Boolean }
54
55
  },
55
- setup(v) {
56
- const l = v, c = r(() => (l == null ? void 0 : l.transform) || {
56
+ setup(c) {
57
+ const l = c, v = r(() => (l == null ? void 0 : l.transform) || {
57
58
  flat: !1,
58
59
  transformer: (e) => {
59
60
  var a, o, i, n, d, f;
@@ -84,7 +85,7 @@ const A = /* @__PURE__ */ b({
84
85
  ]),
85
86
  {
86
87
  "initial-value": h.value,
87
- transform: c.value,
88
+ transform: v.value,
88
89
  bordered: (i = (o = e.field) == null ? void 0 : o.options) != null && i.length ? !1 : e.bordered
89
90
  }
90
91
  ), {
@@ -101,5 +102,5 @@ const A = /* @__PURE__ */ b({
101
102
  }
102
103
  });
103
104
  export {
104
- A as default
105
+ q as default
105
106
  };
@@ -39,4 +39,9 @@ export type ApFormItemBatchInputProps = ApFormItemProps & {
39
39
  disabled?: boolean;
40
40
  placeholer?: string;
41
41
  trim?: boolean;
42
+ /**
43
+ * 是否默认选择所有的key
44
+ * @default true
45
+ */
46
+ defaultSelectedAllKey?: boolean;
42
47
  };
@@ -30,7 +30,7 @@ export interface UsePageListApTable extends ApTableProps {
30
30
  export declare function usePageListApTable(props?: UsePageListApTable): [ApTableProps, {
31
31
  reload: () => void;
32
32
  reset: () => void;
33
- getSearchFormValues: (transform: boolean) => any;
33
+ getSearchFormValues: (transform?: boolean) => any;
34
34
  getApTableInstance: () => {
35
35
  submit: () => void;
36
36
  reset: () => void;
@@ -50,6 +50,6 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
50
50
  } | undefined;
51
51
  getShownColumns: () => TableColumnsType<any>;
52
52
  } | null | undefined;
53
- getSearchFormValuesAndSorted: (transform: boolean) => any;
53
+ getSearchFormValuesAndSorted: (transform?: boolean) => any;
54
54
  clearSelection: () => void;
55
55
  }];