@aplus-frontend/ui 7.17.0 → 7.17.1

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