@aplus-frontend/ui 7.17.4 → 7.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +1 -1
  2. package/es/src/ap-field/cascader/index.vue.mjs +9 -8
  3. package/es/src/ap-field/cascader/read.vue2.mjs +3 -2
  4. package/es/src/ap-field/checkbox/index.vue.mjs +12 -11
  5. package/es/src/ap-field/checkbox/read.vue2.mjs +5 -4
  6. package/es/src/ap-field/date/index.vue.mjs +83 -73
  7. package/es/src/ap-field/date/read.vue2.mjs +1 -0
  8. package/es/src/ap-field/date-range/index.vue.mjs +80 -70
  9. package/es/src/ap-field/date-range/read.vue2.mjs +3 -2
  10. package/es/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
  11. package/es/src/ap-field/hooks/use-read-mode-render.mjs +6 -0
  12. package/es/src/ap-field/interface.d.ts +8 -0
  13. package/es/src/ap-field/number/index.vue.mjs +57 -46
  14. package/es/src/ap-field/number/read.vue2.mjs +1 -0
  15. package/es/src/ap-field/radio/index.vue.mjs +17 -16
  16. package/es/src/ap-field/radio/read.vue2.mjs +1 -0
  17. package/es/src/ap-field/rate/index.vue.mjs +6 -5
  18. package/es/src/ap-field/second/index.vue.mjs +35 -20
  19. package/es/src/ap-field/second/read.vue2.mjs +1 -0
  20. package/es/src/ap-field/segmented/index.vue.mjs +15 -14
  21. package/es/src/ap-field/select/index.vue.mjs +53 -52
  22. package/es/src/ap-field/select/read.vue2.mjs +1 -0
  23. package/es/src/ap-field/slider/index.vue.mjs +11 -10
  24. package/es/src/ap-field/switch/index.vue.mjs +20 -19
  25. package/es/src/ap-field/switch/read.vue2.mjs +5 -4
  26. package/es/src/ap-field/text/index.vue2.mjs +35 -31
  27. package/es/src/ap-field/text/password.vue.d.ts +4 -4
  28. package/es/src/ap-field/text/password.vue.mjs +57 -48
  29. package/es/src/ap-field/text/read-password.vue2.mjs +6 -5
  30. package/es/src/ap-field/text/read.vue2.mjs +3 -2
  31. package/es/src/ap-field/text-area/index.vue.mjs +46 -36
  32. package/es/src/ap-field/text-area/read.vue2.mjs +1 -0
  33. package/es/src/ap-field/tree-select/index.vue.mjs +9 -8
  34. package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
  35. package/es/src/ap-form/items/cascader/index.vue.d.ts +3 -1
  36. package/es/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
  37. package/es/src/ap-form/items/date/index.vue.d.ts +3 -1
  38. package/es/src/ap-form/items/date-range/index.vue.d.ts +3 -1
  39. package/es/src/ap-form/items/number/index.vue.d.ts +3 -1
  40. package/es/src/ap-form/items/select/index.vue.d.ts +3 -1
  41. package/es/src/ap-form/items/switch/index.vue.d.ts +3 -1
  42. package/es/src/ap-form/items/text/index.vue.d.ts +3 -1
  43. package/es/src/ap-form/items/text/password.vue.d.ts +3 -1
  44. package/es/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
  45. package/es/src/ap-table/constants.d.ts +11 -1
  46. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +109 -98
  47. package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
  48. package/es/src/business/batch-input-group/index.vue.mjs +11 -10
  49. package/es/src/version.d.ts +1 -1
  50. package/es/src/version.mjs +1 -1
  51. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  52. package/lib/src/ap-field/cascader/index.vue.js +1 -1
  53. package/lib/src/ap-field/cascader/read.vue2.js +1 -1
  54. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  55. package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
  56. package/lib/src/ap-field/date/index.vue.js +1 -1
  57. package/lib/src/ap-field/date/read.vue2.js +1 -1
  58. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  59. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  60. package/lib/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
  61. package/lib/src/ap-field/hooks/use-read-mode-render.js +1 -0
  62. package/lib/src/ap-field/interface.d.ts +8 -0
  63. package/lib/src/ap-field/number/index.vue.js +1 -1
  64. package/lib/src/ap-field/number/read.vue2.js +1 -1
  65. package/lib/src/ap-field/radio/index.vue.js +1 -1
  66. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  67. package/lib/src/ap-field/rate/index.vue.js +1 -1
  68. package/lib/src/ap-field/second/index.vue.js +1 -1
  69. package/lib/src/ap-field/second/read.vue2.js +1 -1
  70. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  71. package/lib/src/ap-field/select/index.vue.js +1 -1
  72. package/lib/src/ap-field/select/read.vue2.js +1 -1
  73. package/lib/src/ap-field/slider/index.vue.js +1 -1
  74. package/lib/src/ap-field/switch/index.vue.js +1 -1
  75. package/lib/src/ap-field/switch/read.vue2.js +1 -1
  76. package/lib/src/ap-field/text/index.vue2.js +1 -1
  77. package/lib/src/ap-field/text/password.vue.d.ts +4 -4
  78. package/lib/src/ap-field/text/password.vue.js +1 -1
  79. package/lib/src/ap-field/text/read-password.vue2.js +1 -1
  80. package/lib/src/ap-field/text/read.vue2.js +1 -1
  81. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  82. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  83. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  84. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  85. package/lib/src/ap-form/items/cascader/index.vue.d.ts +3 -1
  86. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
  87. package/lib/src/ap-form/items/date/index.vue.d.ts +3 -1
  88. package/lib/src/ap-form/items/date-range/index.vue.d.ts +3 -1
  89. package/lib/src/ap-form/items/number/index.vue.d.ts +3 -1
  90. package/lib/src/ap-form/items/select/index.vue.d.ts +3 -1
  91. package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -1
  92. package/lib/src/ap-form/items/text/index.vue.d.ts +3 -1
  93. package/lib/src/ap-form/items/text/password.vue.d.ts +3 -1
  94. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
  95. package/lib/src/ap-table/constants.d.ts +11 -1
  96. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  97. package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
  98. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  99. package/lib/src/version.d.ts +1 -1
  100. package/lib/src/version.js +1 -1
  101. package/package.json +3 -3
@@ -1,11 +1,14 @@
1
- import { defineComponent as B, computed as b, shallowRef as x, useSlots as S, createElementBlock as _, createBlock as g, openBlock as r, toDisplayString as k, unref as e, mergeProps as P, createSlots as C, renderList as I, withCtx as U, renderSlot as w, normalizeProps as R, guardReactiveProps as V } from "vue";
1
+ import { defineComponent as R, computed as l, shallowRef as _, useSlots as P, createBlock as u, openBlock as d, unref as e, withCtx as p, createElementVNode as k, toDisplayString as C, mergeProps as I, createSlots as M, renderList as N, renderSlot as U, normalizeProps as V, guardReactiveProps as w } from "vue";
2
2
  import { InputNumber as z } from "@aplus-frontend/antdv";
3
3
  import { omit as A } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
+ import "../../render/index.mjs";
5
6
  import { useDefaultPlaceholder as D } from "../hooks/use-default-placeholder.mjs";
6
- import { formatSecond as E } from "./helper.mjs";
7
+ import { useReadModeRender as E } from "../hooks/use-read-mode-render.mjs";
8
+ import { formatSecond as s } from "./helper.mjs";
7
9
  import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
8
- const M = { key: 0 }, H = /* @__PURE__ */ B({
10
+ import O from "../../render/render.mjs";
11
+ const Y = /* @__PURE__ */ R({
9
12
  name: "ApFieldSecond",
10
13
  __name: "index",
11
14
  props: {
@@ -13,6 +16,7 @@ const M = { key: 0 }, H = /* @__PURE__ */ B({
13
16
  class: {},
14
17
  style: {},
15
18
  emptyText: { default: "--" },
19
+ customReadMode: {},
16
20
  size: {},
17
21
  bordered: { type: Boolean, default: !0 },
18
22
  placeholder: {},
@@ -54,35 +58,46 @@ const M = { key: 0 }, H = /* @__PURE__ */ B({
54
58
  onFocus: {}
55
59
  },
56
60
  emits: ["update:value"],
57
- setup(u, { expose: d, emit: s }) {
58
- const o = u, p = b(
61
+ setup(i, { expose: m, emit: f }) {
62
+ const o = i, { renderer: c } = E(
63
+ o,
64
+ l(() => s(Number(t.value)))
65
+ ), v = l(
59
66
  () => A(o, ["value", "onUpdate:value", "min", "placeholder", "mode"])
60
- ), i = s, t = x(), { value: a, updateValue: f } = F(
67
+ ), y = f, r = _(), { value: t, updateValue: h } = F(
61
68
  o,
62
- i
63
- ), c = S(), m = D("Second", o);
64
- function y() {
65
- t.value?.focus();
69
+ y
70
+ ), B = P(), b = D("Second", o);
71
+ function x() {
72
+ r.value?.focus();
66
73
  }
67
- function v() {
68
- t.value?.blur();
74
+ function S() {
75
+ r.value?.blur();
69
76
  }
70
- return d({ focus: y, blur: v }), (l, N) => l.mode === "read" ? (r(), _("span", M, k(e(E)(Number(e(a)))), 1)) : (r(), g(e(z), P({
77
+ return m({ focus: x, blur: S }), (a, L) => a.mode === "read" ? (d(), u(e(O), {
78
+ key: 0,
79
+ renderer: e(c)
80
+ }, {
81
+ default: p(() => [
82
+ k("span", null, C(e(s)(Number(e(t)))), 1)
83
+ ]),
84
+ _: 1
85
+ }, 8, ["renderer"])) : (d(), u(e(z), I({
71
86
  key: 1,
72
87
  min: 0,
73
88
  style: { width: "100%" },
74
- placeholder: e(m),
75
- value: e(a)
76
- }, p.value, { "onUpdate:value": e(f) }), C({ _: 2 }, [
77
- I(c, (O, n) => ({
89
+ placeholder: e(b),
90
+ value: e(t)
91
+ }, v.value, { "onUpdate:value": e(h) }), M({ _: 2 }, [
92
+ N(B, (T, n) => ({
78
93
  name: n,
79
- fn: U((h) => [
80
- w(l.$slots, n, R(V(h || {})))
94
+ fn: p((g) => [
95
+ U(a.$slots, n, V(w(g || {})))
81
96
  ])
82
97
  }))
83
98
  ]), 1040, ["placeholder", "value", "onUpdate:value"]));
84
99
  }
85
100
  });
86
101
  export {
87
- H as default
102
+ Y as default
88
103
  };
@@ -8,6 +8,7 @@ const m = /* @__PURE__ */ n({
8
8
  class: {},
9
9
  style: {},
10
10
  emptyText: { default: "--" },
11
+ customReadMode: {},
11
12
  size: {},
12
13
  bordered: { type: Boolean },
13
14
  placeholder: {},
@@ -1,8 +1,8 @@
1
- import { defineComponent as S, computed as f, ref as h, useSlots as U, onMounted as V, unref as o, createVNode as s, Fragment as a, createBlock as i, createElementBlock as _, openBlock as u, resolveDynamicComponent as N, mergeProps as P, withCtx as q, renderSlot as z, normalizeProps as F, guardReactiveProps as T } from "vue";
2
- import { Spin as O, Segmented as R } from "@aplus-frontend/antdv";
3
- import { omit as w, isFunction as c, isUndefined as A, isString as D, isNumber as E } from "lodash-unified";
1
+ import { defineComponent as S, computed as c, ref as h, useSlots as U, onMounted as V, unref as o, createVNode as s, Fragment as a, createBlock as i, createElementBlock as _, openBlock as u, resolveDynamicComponent as N, mergeProps as P, withCtx as q, renderSlot as z, normalizeProps as F, guardReactiveProps as R } from "vue";
2
+ import { Spin as T, Segmented as M } from "@aplus-frontend/antdv";
3
+ import { omit as O, isFunction as f, isUndefined as w, isString as A, isNumber as D } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
- import M from "../hooks/use-options.mjs";
5
+ import E from "../hooks/use-options.mjs";
6
6
  import { useControllableValue as $ } from "../../hooks/useControllableValue.mjs";
7
7
  const L = /* @__PURE__ */ S({
8
8
  name: "ApFieldSegmented",
@@ -16,6 +16,7 @@ const L = /* @__PURE__ */ S({
16
16
  emptyText: {
17
17
  default: "--"
18
18
  },
19
+ customReadMode: {},
19
20
  prefixCls: {},
20
21
  options: {},
21
22
  block: {
@@ -43,45 +44,45 @@ const L = /* @__PURE__ */ S({
43
44
  setup(v, {
44
45
  emit: y
45
46
  }) {
46
- const t = v, g = f(() => w(t, ["onUpdate:value", "value", "defaultValue", "options"])), {
47
+ const t = v, g = c(() => O(t, ["onUpdate:value", "value", "defaultValue", "options"])), {
47
48
  options: p,
48
49
  updateOptions: b
49
- } = M(t), k = y, {
50
+ } = E(t), k = y, {
50
51
  value: d,
51
52
  updateValue: x
52
53
  } = $(t, k), r = h(!1), B = U();
53
54
  V(() => {
54
- c(t.request) && (r.value = !0, t.request().then((e) => b(e)).finally(() => {
55
+ f(t.request) && (r.value = !0, t.request().then((e) => b(e)).finally(() => {
55
56
  r.value = !1;
56
57
  }));
57
58
  });
58
- const C = f(() => {
59
+ const C = c(() => {
59
60
  const e = o(d);
60
- if (A(e))
61
+ if (w(e))
61
62
  return s(a, null, [t.emptyText]);
62
63
  const l = o(p)?.find((m) => m === e || m?.value === e);
63
- if (D(l) || E(l))
64
+ if (A(l) || D(l))
64
65
  return s(a, null, [l]);
65
66
  const n = l?.label || B.label;
66
- return c(n) ? s(a, null, [n?.({
67
+ return f(n) ? s(a, null, [n?.({
67
68
  ...l
68
69
  })]) : s(a, null, [n || t.emptyText]);
69
70
  });
70
- return (e, l) => r.value ? (u(), i(o(O), {
71
+ return (e, l) => r.value ? (u(), i(o(T), {
71
72
  key: 0,
72
73
  size: "small"
73
74
  })) : (u(), _(a, {
74
75
  key: 1
75
76
  }, [e.mode === "read" ? (u(), i(N(C.value), {
76
77
  key: 0
77
- })) : (u(), i(o(R), P({
78
+ })) : (u(), i(o(M), P({
78
79
  key: 1
79
80
  }, g.value, {
80
81
  value: o(d),
81
82
  options: o(p),
82
83
  "onUpdate:value": o(x)
83
84
  }), {
84
- label: q((n) => [z(e.$slots, "label", F(T(n)))]),
85
+ label: q((n) => [z(e.$slots, "label", F(R(n)))]),
85
86
  _: 3
86
87
  }, 16, ["value", "options", "onUpdate:value"]))], 64));
87
88
  }
@@ -1,6 +1,6 @@
1
- import { defineComponent as fe, useSlots as me, ref as k, shallowRef as he, computed as s, onMounted as ve, watch as ye, unref as o, createVNode as m, createElementBlock as M, createBlock as C, openBlock as h, toDisplayString as N, mergeProps as ge, h as Ce, createSlots as be, withCtx as v, createElementVNode as x, normalizeClass as y, createCommentVNode as P, resolveDynamicComponent as L, withModifiers as we, renderList as Oe, renderSlot as Se, normalizeProps as Fe, guardReactiveProps as Be } from "vue";
1
+ import { defineComponent as fe, useSlots as me, ref as k, shallowRef as he, computed as s, onMounted as ve, watch as ye, unref as l, createVNode as m, createElementBlock as M, createBlock as C, openBlock as h, toDisplayString as N, mergeProps as ge, h as Ce, createSlots as be, withCtx as v, createElementVNode as x, normalizeClass as y, createCommentVNode as P, resolveDynamicComponent as L, withModifiers as we, renderList as Oe, renderSlot as Se, normalizeProps as Fe, guardReactiveProps as Be } from "vue";
2
2
  import { Select as ke, Flex as T, Checkbox as q, Spin as Ne } from "@aplus-frontend/antdv";
3
- import { debounce as xe, isFunction as z, isArray as Ve, isNil as Ae, omit as R, isNumber as Ie } from "lodash-unified";
3
+ import { debounce as xe, isFunction as R, isArray as Ve, isNil as Ae, omit as z, isNumber as Ie } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../utils/index.mjs";
6
6
  import { useDevWarning as _e } from "../../utils/warning.mjs";
@@ -14,7 +14,7 @@ import { useLocale as Le } from "../../config-provider/hooks/use-locale.mjs";
14
14
  import { useControllableValue as Te } from "../../hooks/useControllableValue.mjs";
15
15
  const qe = {
16
16
  key: 0
17
- }, ze = ["onClick"], et = /* @__PURE__ */ fe({
17
+ }, Re = ["onClick"], et = /* @__PURE__ */ fe({
18
18
  name: "ApFieldSelect",
19
19
  __name: "index",
20
20
  props: {
@@ -26,6 +26,7 @@ const qe = {
26
26
  emptyText: {
27
27
  default: "--"
28
28
  },
29
+ customReadMode: {},
29
30
  defaultValue: {},
30
31
  notFoundContent: {},
31
32
  suffixIcon: {},
@@ -196,16 +197,16 @@ const qe = {
196
197
  } = E("field-select-popup-option"), H = Me("field"), A = k(!1), I = k(!1), {
197
198
  t: _
198
199
  } = Le(), W = xe((t) => {
199
- if (!z(e.request))
200
+ if (!R(e.request))
200
201
  return;
201
202
  r += 1;
202
203
  const n = r;
203
- g([]), u.value = !0, e.request(t).then((l) => {
204
- r === n && (g(l), u.value = !1);
204
+ g([]), u.value = !0, e.request(t).then((o) => {
205
+ r === n && (g(o), u.value = !1);
205
206
  });
206
207
  }, e.searchDelay), G = (t, n) => {
207
- const l = e.fieldNames?.label || "label";
208
- return typeof n?.[l] == "string" && n[l].toLowerCase().indexOf(t.toLowerCase()) > -1;
208
+ const o = e.fieldNames?.label || "label";
209
+ return typeof n?.[o] == "string" && n[o].toLowerCase().indexOf(t.toLowerCase()) > -1;
209
210
  }, {
210
211
  options: p,
211
212
  updateOptions: g
@@ -214,16 +215,16 @@ const qe = {
214
215
  return e.tokenSeparators ? "tags" : "multiple";
215
216
  });
216
217
  async function i(t = !0) {
217
- if (!z(e.request))
218
+ if (!R(e.request))
218
219
  return;
219
220
  u.value = !0, r += 1;
220
221
  const n = r;
221
222
  try {
222
223
  t && g([]);
223
- const l = await e.request(void 0, e.params);
224
+ const o = await e.request(void 0, e.params);
224
225
  if (n !== r)
225
226
  return;
226
- g(l);
227
+ g(o);
227
228
  } finally {
228
229
  u.value = !1;
229
230
  }
@@ -252,15 +253,15 @@ const qe = {
252
253
  value: f,
253
254
  updateValue: S
254
255
  } = Te(e, J), ee = De("Select", e), te = s(() => {
255
- const t = o(f);
256
+ const t = l(f);
256
257
  if (!t)
257
258
  return e.emptyText;
258
- const n = e.fieldNames?.label || "label", l = e.fieldNames?.value || "value";
259
- return Ve(t) ? t.map((a) => o(p).find((pe) => pe[l] === a)?.[n]).filter(Boolean).join("、") || e.emptyText : o(p).find((a) => a[l] === t)?.[n] || e.emptyText;
259
+ const n = e.fieldNames?.label || "label", o = e.fieldNames?.value || "value";
260
+ return Ve(t) ? t.map((a) => l(p).find((pe) => pe[o] === a)?.[n]).filter(Boolean).join("、") || e.emptyText : l(p).find((a) => a[o] === t)?.[n] || e.emptyText;
260
261
  }), ne = s(() => {
261
262
  const t = !!e?.showSearch, n = e.searchMode;
262
- let l = {};
263
- return t && (l = n === "request" ? {
263
+ let o = {};
264
+ return t && (o = n === "request" ? {
264
265
  defaultActiveFirstOption: !1,
265
266
  onSearch: W,
266
267
  notFoundContent: u.value ? void 0 : null,
@@ -269,11 +270,11 @@ const qe = {
269
270
  } : {
270
271
  filterOption: Ae(e?.filterOption) ? G : e?.filterOption
271
272
  }), {
272
- ...R(e, ["mode", "value", "onUpdate:value", "onSearch", "request", "searchMode", "onFocus", "onBeforeSelect", "onDropdownVisibleChange"]),
273
- placeholder: o(ee),
274
- ...l
273
+ ...z(e, ["mode", "value", "onUpdate:value", "onSearch", "request", "searchMode", "onFocus", "onBeforeSelect", "onDropdownVisibleChange"]),
274
+ placeholder: l(ee),
275
+ ...o
275
276
  };
276
- }), le = s(() => p.value.map((t) => t[e.fieldNames?.value || "value"])), F = s(() => p.value.filter((t) => !t.disabled).map((t) => t[e.fieldNames?.value || "value"])), D = s(() => !e.multiple || V(e.maxCount) ? !1 : Ie(e.addAll) ? le.value.length >= e.addAll : !!e.addAll), oe = s(() => e.multiple && e.allowOnlySelect && (!V(e.maxCount) || e.maxCount >= 1));
277
+ }), oe = s(() => p.value.map((t) => t[e.fieldNames?.value || "value"])), F = s(() => p.value.filter((t) => !t.disabled).map((t) => t[e.fieldNames?.value || "value"])), D = s(() => !e.multiple || V(e.maxCount) ? !1 : Ie(e.addAll) ? oe.value.length >= e.addAll : !!e.addAll), le = s(() => e.multiple && e.allowOnlySelect && (!V(e.maxCount) || e.maxCount >= 1));
277
278
  function ae() {
278
279
  O.value?.focus();
279
280
  }
@@ -281,8 +282,8 @@ const qe = {
281
282
  O.value?.blur();
282
283
  }
283
284
  function B(t, n) {
284
- const l = e.fieldNames?.[n] ?? n;
285
- return l === "groupLabel" ? t[l] ?? t.label : t[l];
285
+ const o = e.fieldNames?.[n] ?? n;
286
+ return o === "groupLabel" ? t[o] ?? t.label : t[o];
286
287
  }
287
288
  function ue(t) {
288
289
  const n = B(t, "value");
@@ -296,14 +297,14 @@ const qe = {
296
297
  }, [B(t, t.options?.length ? "groupLabel" : "label")]);
297
298
  }
298
299
  const ie = s(() => {
299
- const t = o(f) || [], n = F.value;
300
- return n.length > 0 && n.every((l) => t.includes(l));
300
+ const t = l(f) || [], n = F.value;
301
+ return n.length > 0 && n.every((o) => t.includes(o));
301
302
  }), ce = s(() => {
302
- const t = o(f) || [], n = F.value, l = n.filter((c) => t.includes(c)).length;
303
- return l > 0 && l < n.length;
303
+ const t = l(f) || [], n = F.value, o = n.filter((c) => t.includes(c)).length;
304
+ return o > 0 && o < n.length;
304
305
  });
305
306
  function de() {
306
- const t = new Set(o(f) || []), n = F.value;
307
+ const t = new Set(l(f) || []), n = F.value;
307
308
  n.length > 0 && n.every((a) => t.has(a)) ? n.forEach((a) => t.delete(a)) : n.forEach((a) => t.add(a));
308
309
  const c = p.value.filter((a) => t.has(a[e.fieldNames?.value || "value"]));
309
310
  S([...t]), e.onChange?.([...t], c);
@@ -312,71 +313,71 @@ const qe = {
312
313
  focus: ae,
313
314
  blur: se,
314
315
  request: i
315
- }), (t, n) => t.mode === "read" ? (h(), M("span", qe, N(te.value), 1)) : (h(), C(o(ke), ge({
316
+ }), (t, n) => t.mode === "read" ? (h(), M("span", qe, N(te.value), 1)) : (h(), C(l(ke), ge({
316
317
  key: 1,
317
318
  ref_key: "selectRef",
318
319
  ref: O,
319
320
  "allow-clear": ""
320
321
  }, ne.value, {
321
322
  mode: X.value,
322
- value: o(f),
323
- options: o(p),
323
+ value: l(f),
324
+ options: l(p),
324
325
  loading: u.value,
325
326
  "menu-item-selected-icon": Ce("span"),
326
- "popup-class-name": `${o(w)("popup")} ${o(H)}`,
327
- "onUpdate:value": o(S),
327
+ "popup-class-name": `${l(w)("popup")} ${l(H)}`,
328
+ "onUpdate:value": l(S),
328
329
  onFocus: Y,
329
330
  onDropdownVisibleChange: Z
330
331
  }), be({
331
- option: v((l) => [x("div", {
332
- class: y(o(d)("outter"))
333
- }, [m(o(T), {
332
+ option: v((o) => [x("div", {
333
+ class: y(l(d)("outter"))
334
+ }, [m(l(T), {
334
335
  justify: "space-between",
335
336
  align: "center",
336
- class: y(o(d)("wrapper")),
337
+ class: y(l(d)("wrapper")),
337
338
  gap: 8
338
339
  }, {
339
- default: v(() => [m(o(T), {
340
+ default: v(() => [m(l(T), {
340
341
  gap: 8,
341
342
  align: "center",
342
- class: y(o(d)("content-wrapper"))
343
+ class: y(l(d)("content-wrapper"))
343
344
  }, {
344
- default: v(() => [D.value ? (h(), C(o(q), {
345
+ default: v(() => [D.value ? (h(), C(l(q), {
345
346
  key: 0,
346
- checked: o(f)?.includes(B(l, "value"))
347
- }, null, 8, ["checked"])) : P("", !0), (h(), C(L(re(l))))]),
347
+ checked: l(f)?.includes(B(o, "value"))
348
+ }, null, 8, ["checked"])) : P("", !0), (h(), C(L(re(o))))]),
348
349
  _: 2
349
- }, 1032, ["class"]), oe.value && !l?.disabled ? (h(), M("span", {
350
+ }, 1032, ["class"]), le.value && !o?.disabled ? (h(), M("span", {
350
351
  key: 0,
351
- class: y(o(d)("action")),
352
- onClick: we(() => ue(l), ["stop"])
353
- }, N(o(_)("ap.field.chooseOnly")), 11, ze)) : P("", !0)]),
352
+ class: y(l(d)("action")),
353
+ onClick: we(() => ue(o), ["stop"])
354
+ }, N(l(_)("ap.field.chooseOnly")), 11, Re)) : P("", !0)]),
354
355
  _: 2
355
356
  }, 1032, ["class"])], 2)]),
356
357
  _: 2
357
- }, [Oe(o(R)(b, ["option"]), (l, c) => ({
358
+ }, [Oe(l(z)(b, ["option"]), (o, c) => ({
358
359
  name: c,
359
360
  fn: v((a) => [Se(t.$slots, c, Fe(Be(a || {})))])
360
361
  })), u.value ? {
361
362
  name: "notFoundContent",
362
- fn: v(() => [m(o(Ne), {
363
+ fn: v(() => [m(l(Ne), {
363
364
  size: "small"
364
365
  })]),
365
366
  key: "0"
366
367
  } : void 0, D.value ? {
367
368
  name: "dropdownRender",
368
369
  fn: v(({
369
- menuNode: l
370
+ menuNode: o
370
371
  }) => [x("div", {
371
372
  tabindex: -1,
372
- class: y(o(w)("popup-all-option")),
373
+ class: y(l(w)("popup-all-option")),
373
374
  onClick: de
374
- }, [m(o(q), {
375
+ }, [m(l(q), {
375
376
  checked: ie.value,
376
377
  indeterminate: ce.value
377
378
  }, null, 8, ["checked", "indeterminate"]), x("span", {
378
- class: y(o(w)("popup-all-option-label"))
379
- }, N(o(_)("ap.field.selectAll")), 3)], 2), (h(), C(L(l)))]),
379
+ class: y(l(w)("popup-all-option-label"))
380
+ }, N(l(_)("ap.field.selectAll")), 3)], 2), (h(), C(L(o)))]),
380
381
  key: "1"
381
382
  } : void 0]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "onUpdate:value"]));
382
383
  }
@@ -8,6 +8,7 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
8
8
  class: {},
9
9
  style: {},
10
10
  emptyText: { default: "--" },
11
+ customReadMode: {},
11
12
  defaultValue: {},
12
13
  notFoundContent: {},
13
14
  suffixIcon: {},
@@ -1,9 +1,9 @@
1
- import { defineComponent as C, useSlots as b, shallowRef as g, computed as n, unref as t, createElementBlock as k, createBlock as F, openBlock as s, Fragment as S, createTextVNode as h, toDisplayString as P, mergeProps as T, createSlots as V, renderList as _, withCtx as R, renderSlot as N, normalizeProps as U, guardReactiveProps as A } from "vue";
1
+ import { defineComponent as C, useSlots as b, shallowRef as g, computed as n, unref as t, createElementBlock as k, createBlock as F, openBlock as s, Fragment as S, createTextVNode as h, toDisplayString as P, mergeProps as R, createSlots as T, renderList as V, withCtx as _, renderSlot as N, normalizeProps as U, guardReactiveProps as A } from "vue";
2
2
  import { Slider as H } from "@aplus-frontend/antdv";
3
3
  import { omit as L, isNil as $, isArray as w } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
5
  import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
6
- const J = /* @__PURE__ */ C({
6
+ const G = /* @__PURE__ */ C({
7
7
  name: "ApFieldSlider",
8
8
  __name: "index",
9
9
  props: {
@@ -11,6 +11,7 @@ const J = /* @__PURE__ */ C({
11
11
  class: {},
12
12
  style: {},
13
13
  emptyText: { default: "--" },
14
+ customReadMode: {},
14
15
  range: { type: [Boolean, Object] },
15
16
  value: {},
16
17
  defaultValue: {},
@@ -52,8 +53,8 @@ const J = /* @__PURE__ */ C({
52
53
  ariaValueTextFormatterForHandle: {}
53
54
  },
54
55
  emits: ["update:value"],
55
- setup(u, { expose: i, emit: p }) {
56
- const d = b(), o = g(), a = u, m = n(
56
+ setup(u, { expose: i, emit: d }) {
57
+ const p = b(), o = g(), a = u, m = n(
57
58
  () => L(a, [
58
59
  "value",
59
60
  "onUpdate:value",
@@ -61,7 +62,7 @@ const J = /* @__PURE__ */ C({
61
62
  "emptyText",
62
63
  "defaultValue"
63
64
  ])
64
- ), c = p, { value: l, updateValue: f } = j(a, c), y = n(() => {
65
+ ), c = d, { value: l, updateValue: f } = j(a, c), y = n(() => {
65
66
  const e = t(l);
66
67
  return $(e) ? a.emptyText : w(e) ? `${e[0]}-${e[1]}` : e;
67
68
  });
@@ -76,15 +77,15 @@ const J = /* @__PURE__ */ C({
76
77
  blur: B
77
78
  }), (e, q) => e.mode === "read" ? (s(), k(S, { key: 0 }, [
78
79
  h(P(y.value), 1)
79
- ], 64)) : (s(), F(t(H), T({ key: 1 }, m.value, {
80
+ ], 64)) : (s(), F(t(H), R({ key: 1 }, m.value, {
80
81
  ref_key: "sliderRef",
81
82
  ref: o,
82
83
  value: t(l),
83
84
  "onUpdate:value": t(f)
84
- }), V({ _: 2 }, [
85
- _(d, (z, r) => ({
85
+ }), T({ _: 2 }, [
86
+ V(p, (z, r) => ({
86
87
  name: r,
87
- fn: R((x) => [
88
+ fn: _((x) => [
88
89
  N(e.$slots, r, U(A(x || {})))
89
90
  ])
90
91
  }))
@@ -92,5 +93,5 @@ const J = /* @__PURE__ */ C({
92
93
  }
93
94
  });
94
95
  export {
95
- J as default
96
+ G as default
96
97
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as D, useSlots as U, computed as p, ref as b, unref as o, createVNode as d, Fragment as s, createBlock as k, createElementBlock as E, openBlock as f, resolveDynamicComponent as K, mergeProps as C, createSlots as w, renderList as B, withCtx as y, renderSlot as P, normalizeProps as A, guardReactiveProps as _ } from "vue";
2
- import { Switch as S, Popconfirm as L } from "@aplus-frontend/antdv";
3
- import { omit as M, isNil as j, isFunction as q } from "lodash-unified";
1
+ import { defineComponent as D, useSlots as M, computed as p, ref as b, unref as o, createVNode as a, Fragment as s, createBlock as k, createElementBlock as U, openBlock as f, resolveDynamicComponent as E, mergeProps as C, createSlots as w, renderList as B, withCtx as y, renderSlot as P, normalizeProps as A, guardReactiveProps as _ } from "vue";
2
+ import { Switch as S, Popconfirm as K } from "@aplus-frontend/antdv";
3
+ import { omit as L, isNil as j, isFunction as q } from "lodash-unified";
4
4
  import "../../utils/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
6
  import { useControllableValue as G } from "../../hooks/useControllableValue.mjs";
@@ -15,6 +15,7 @@ const Y = /* @__PURE__ */ D({
15
15
  emptyText: {
16
16
  default: "--"
17
17
  },
18
+ customReadMode: {},
18
19
  id: {},
19
20
  prefixCls: {},
20
21
  size: {
@@ -53,23 +54,23 @@ const Y = /* @__PURE__ */ D({
53
54
  emits: ["update:checked"],
54
55
  setup(F, {
55
56
  expose: N,
56
- emit: $
57
+ emit: R
57
58
  }) {
58
- const i = U(), e = F, v = p(() => M(e, ["onUpdate:checked", "emptyText"])), R = $, h = b(), {
59
+ const u = M(), e = F, v = p(() => L(e, ["onUpdate:checked", "emptyText"])), $ = R, h = b(), {
59
60
  value: t,
60
- updateValue: u
61
- } = G(e, R, {
61
+ updateValue: d
62
+ } = G(e, $, {
62
63
  valuePropName: "checked"
63
64
  }), c = b(!1);
64
- async function g(n, a) {
65
+ async function g(n, i) {
65
66
  if (!r(e.confirm)) {
66
67
  if (!r(e.onAction)) {
67
- u(n);
68
+ d(n);
68
69
  return;
69
70
  }
70
71
  c.value = !0;
71
72
  try {
72
- await e.onAction(n, a) && u(n);
73
+ await e.onAction(n, i) && d(n);
73
74
  } finally {
74
75
  c.value = !1;
75
76
  }
@@ -78,21 +79,21 @@ const Y = /* @__PURE__ */ D({
78
79
  async function T() {
79
80
  const n = o(t) === e.checkedValue ? e.unCheckedValue : e.checkedValue;
80
81
  if (!r(e.onAction)) {
81
- u(n);
82
+ d(n);
82
83
  return;
83
84
  }
84
- await e.onAction(n) && u(n);
85
+ await e.onAction(n) && d(n);
85
86
  }
86
87
  const x = p(() => {
87
88
  const n = o(t);
88
- return j(n) ? d(s, null, [e.emptyText]) : n === e.checkedValue ? d(s, null, [e.checkedChildren || i.checkedChildren?.() || `${e.checkedValue}`]) : d(s, null, [e.unCheckedChildren || i.unCheckedChildren?.() || `${e.unCheckedValue}`]);
89
+ return j(n) ? a(s, null, [e.emptyText]) : n === e.checkedValue ? a(s, null, [e.checkedChildren || u.checkedChildren?.() || `${e.checkedValue}`]) : a(s, null, [e.unCheckedChildren || u.unCheckedChildren?.() || `${e.unCheckedValue}`]);
89
90
  }), z = p(() => r(e.confirm) ? q(e.confirm) ? e.confirm(o(t)) : e.confirm : {});
90
91
  return N({
91
92
  focus: () => h.value?.focus(),
92
93
  blur: () => h.value?.blur()
93
- }), (n, a) => n.mode === "read" ? (f(), k(K(x.value), {
94
+ }), (n, i) => n.mode === "read" ? (f(), k(E(x.value), {
94
95
  key: 0
95
- })) : (f(), E(s, {
96
+ })) : (f(), U(s, {
96
97
  key: 1
97
98
  }, [!o(r)(n.confirm) || n.disabled ? (f(), k(o(S), C({
98
99
  key: 0,
@@ -104,22 +105,22 @@ const Y = /* @__PURE__ */ D({
104
105
  onClick: g
105
106
  }), w({
106
107
  _: 2
107
- }, [B(i, (V, l) => ({
108
+ }, [B(u, (V, l) => ({
108
109
  name: l,
109
110
  fn: y((m) => [P(n.$slots, l, A(_(m || {})))])
110
- }))]), 1040, ["checked", "loading"])) : (f(), k(o(L), C({
111
+ }))]), 1040, ["checked", "loading"])) : (f(), k(o(K), C({
111
112
  key: 1,
112
113
  disabled: c.value
113
114
  }, z.value, {
114
115
  onConfirm: T
115
116
  }), {
116
- default: y(() => [d(o(S), C(v.value, {
117
+ default: y(() => [a(o(S), C(v.value, {
117
118
  checked: o(t),
118
119
  loading: n.loading ?? c.value,
119
120
  onClick: g
120
121
  }), w({
121
122
  _: 2
122
- }, [B(i, (V, l) => ({
123
+ }, [B(u, (V, l) => ({
123
124
  name: l,
124
125
  fn: y((m) => [P(n.$slots, l, A(_(m || {})))])
125
126
  }))]), 1040, ["checked", "loading"])]),
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, computed as a, createVNode as d, Fragment as c, createBlock as r, openBlock as i, resolveDynamicComponent as s } from "vue";
1
+ import { defineComponent as u, computed as a, createVNode as d, Fragment as o, createBlock as r, openBlock as i, resolveDynamicComponent as s } from "vue";
2
2
  import { isNil as h } from "lodash-unified";
3
3
  const k = /* @__PURE__ */ u({
4
4
  name: "ApFieldSwitchRead",
@@ -10,6 +10,7 @@ const k = /* @__PURE__ */ u({
10
10
  emptyText: {
11
11
  default: "--"
12
12
  },
13
+ customReadMode: {},
13
14
  id: {},
14
15
  prefixCls: {},
15
16
  size: {
@@ -45,10 +46,10 @@ const k = /* @__PURE__ */ u({
45
46
  onAction: {},
46
47
  confirm: {}
47
48
  },
48
- setup(o) {
49
- const e = o, t = a(() => {
49
+ setup(c) {
50
+ const e = c, t = a(() => {
50
51
  const n = e.checked;
51
- return h(n) ? d(c, null, [e.emptyText]) : n === e.checkedValue ? d(c, null, [e.checkedChildren || `${e.checkedValue}`]) : d(c, null, [e.unCheckedChildren || `${e.unCheckedValue}`]);
52
+ return h(n) ? d(o, null, [e.emptyText]) : n === e.checkedValue ? d(o, null, [e.checkedChildren || `${e.checkedValue}`]) : d(o, null, [e.unCheckedChildren || `${e.unCheckedValue}`]);
52
53
  });
53
54
  return (n, l) => (i(), r(s(t.value)));
54
55
  }