@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,21 @@
1
- import { defineComponent as h, ref as q, onMounted as V, computed as C, unref as e, createElementBlock as p, openBlock as a, Fragment as u, createTextVNode as O, toDisplayString as S, createBlock as m, mergeProps as U } from "vue";
2
- import { Spin as _, RadioGroup as N } from "@aplus-frontend/antdv";
3
- import { isNil as R, omit as z } from "lodash-unified";
1
+ import { defineComponent as V, computed as p, ref as C, onMounted as O, unref as e, createElementBlock as u, openBlock as a, Fragment as m, createTextVNode as S, toDisplayString as U, createBlock as d, mergeProps as _ } from "vue";
2
+ import { Spin as N, RadioGroup as R } from "@aplus-frontend/antdv";
3
+ import { omit as z, isNil as F } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import F from "../hooks/use-options.mjs";
7
- import G from "../style/index.mjs";
6
+ import G from "../hooks/use-options.mjs";
7
+ import P from "../style/index.mjs";
8
8
  import { getOptionValue as A, getOptionLabel as D } from "./helper.mjs";
9
9
  import { useControllableValue as E } from "../../hooks/useControllableValue.mjs";
10
10
  import { useNamespace as I } from "../../config-provider/hooks/use-namespace.mjs";
11
- const X = /* @__PURE__ */ h({
11
+ const Y = /* @__PURE__ */ V({
12
12
  name: "ApFieldRadio",
13
13
  __name: "index",
14
14
  props: {
15
15
  mode: { default: "edit" },
16
16
  class: {},
17
17
  style: {},
18
+ emptyText: { default: "--" },
18
19
  prefixCls: {},
19
20
  value: {},
20
21
  size: {},
@@ -28,57 +29,48 @@ const X = /* @__PURE__ */ h({
28
29
  onChange: {},
29
30
  "onUpdate:value": {},
30
31
  vertical: { type: Boolean, default: !1 },
31
- emptyText: { default: "--" },
32
32
  request: {}
33
33
  },
34
34
  emits: ["update:value"],
35
- setup(d, { expose: c, emit: f }) {
36
- const t = d, v = f, { options: n, updateOptions: y } = F(t), { value: r, updateValue: g } = E(t, v), { b: k, m: x } = I("field-radio"), b = G("field"), l = q(!1);
37
- async function i() {
38
- t.request && (l.value = !0, t.request?.().then((o) => y(o)).finally(() => {
35
+ setup(c, { expose: f, emit: v }) {
36
+ const t = c, y = p(
37
+ () => z(t, ["value", "onUpdate:value", "options", "request", "vertical"])
38
+ ), g = v, { options: n, updateOptions: k } = G(t), { value: r, updateValue: x } = E(t, g), { b, m: B } = I("field-radio"), T = P("field"), l = C(!1);
39
+ async function s() {
40
+ t.request && (l.value = !0, t.request?.().then((o) => k(o)).finally(() => {
39
41
  l.value = !1;
40
42
  }));
41
43
  }
42
- V(() => {
43
- i();
44
+ O(() => {
45
+ s();
44
46
  });
45
- const B = C(() => {
47
+ const h = p(() => {
46
48
  const o = e(r);
47
- if (R(o))
49
+ if (F(o))
48
50
  return t.emptyText;
49
- const s = n.value?.find(
50
- (T) => o === A(T)
51
+ const i = n.value?.find(
52
+ (q) => o === A(q)
51
53
  );
52
- return D(s) || t.emptyText;
54
+ return D(i) || t.emptyText;
53
55
  });
54
- return c({
55
- request: i
56
- }), (o, s) => o.mode === "read" ? (a(), p(u, { key: 0 }, [
57
- O(S(B.value), 1)
58
- ], 64)) : (a(), p(u, { key: 1 }, [
59
- l.value ? (a(), m(e(_), {
56
+ return f({
57
+ request: s
58
+ }), (o, i) => o.mode === "read" ? (a(), u(m, { key: 0 }, [
59
+ S(U(h.value), 1)
60
+ ], 64)) : (a(), u(m, { key: 1 }, [
61
+ l.value ? (a(), d(e(N), {
60
62
  key: 0,
61
63
  size: "small"
62
- })) : (a(), m(e(N), U(
63
- { key: 1 },
64
- e(z)(t, [
65
- "value",
66
- "onUpdate:value",
67
- "options",
68
- "request",
69
- "vertical"
70
- ]),
71
- {
72
- ref: "radioGroupRef",
73
- value: e(r),
74
- options: e(n),
75
- class: [e(k)(), o.vertical ? e(x)("vertical") : null, e(b)],
76
- "onUpdate:value": e(g)
77
- }
78
- ), null, 16, ["value", "options", "class", "onUpdate:value"]))
64
+ })) : (a(), d(e(R), _({ key: 1 }, y.value, {
65
+ ref: "radioGroupRef",
66
+ value: e(r),
67
+ options: e(n),
68
+ class: [e(b)(), o.vertical ? e(B)("vertical") : null, e(T)],
69
+ "onUpdate:value": e(x)
70
+ }), null, 16, ["value", "options", "class", "onUpdate:value"]))
79
71
  ], 64));
80
72
  }
81
73
  });
82
74
  export {
83
- X as default
75
+ Y as default
84
76
  };
@@ -8,6 +8,7 @@ const y = /* @__PURE__ */ p({
8
8
  mode: { default: "edit" },
9
9
  class: {},
10
10
  style: {},
11
+ emptyText: { default: "--" },
11
12
  prefixCls: {},
12
13
  value: {},
13
14
  size: {},
@@ -21,7 +22,6 @@ const y = /* @__PURE__ */ p({
21
22
  onChange: {},
22
23
  "onUpdate:value": {},
23
24
  vertical: { type: Boolean, default: !1 },
24
- emptyText: { default: "--" },
25
25
  request: {}
26
26
  },
27
27
  setup(a) {
@@ -1,9 +1,9 @@
1
- import { defineComponent as m, shallowRef as v, useSlots as b, computed as y, createBlock as h, openBlock as B, unref as o, mergeProps as C, createSlots as _, withCtx as x, renderSlot as k } from "vue";
2
- import { Rate as w } from "@aplus-frontend/antdv";
3
- import { omit as R } from "lodash-unified";
1
+ import { defineComponent as b, computed as a, shallowRef as y, useSlots as h, createBlock as B, openBlock as C, unref as t, mergeProps as _, createSlots as x, withCtx as k, renderSlot as w } from "vue";
2
+ import { Rate as R } from "@aplus-frontend/antdv";
3
+ import { omit as g } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
- import { useControllableValue as g } from "../../hooks/useControllableValue.mjs";
6
- const A = /* @__PURE__ */ m({
5
+ import { useControllableValue as V } from "../../hooks/useControllableValue.mjs";
6
+ const A = /* @__PURE__ */ b({
7
7
  name: "ApFieldRate",
8
8
  __name: "index",
9
9
  props: {
@@ -33,28 +33,28 @@ const A = /* @__PURE__ */ m({
33
33
  defaultValue: {}
34
34
  },
35
35
  emits: ["update:value"],
36
- setup(t, { expose: l, emit: r }) {
37
- const e = t, a = v(), u = r, n = b(), { value: d, updateValue: s } = g(e, u), f = y(() => e.mode === "read" ? !0 : e.disabled);
38
- function i() {
39
- a.value?.focus?.();
36
+ setup(l, { expose: r, emit: u }) {
37
+ const e = l, n = a(() => g(e, ["mode", "defaultValue"])), o = y(), s = u, d = h(), { value: c, updateValue: f } = V(e, s), i = a(() => e.mode === "read" ? !0 : e.disabled);
38
+ function p() {
39
+ o.value?.focus?.();
40
40
  }
41
- function c() {
42
- a.value?.blur?.();
41
+ function m() {
42
+ o.value?.blur?.();
43
43
  }
44
- return l({
45
- focus: i,
46
- blur: c
47
- }), (p, V) => (B(), h(o(w), C(o(R)(e, ["mode", "defaultValue"]), {
44
+ return r({
45
+ focus: p,
46
+ blur: m
47
+ }), (v, S) => (C(), B(t(R), _(n.value, {
48
48
  ref_key: "rateRef",
49
- ref: a,
50
- value: o(d),
51
- disabled: f.value,
52
- "onUpdate:value": o(s)
53
- }), _({ _: 2 }, [
54
- n.character ? {
49
+ ref: o,
50
+ value: t(c),
51
+ disabled: i.value,
52
+ "onUpdate:value": t(f)
53
+ }), x({ _: 2 }, [
54
+ d.character ? {
55
55
  name: "character",
56
- fn: x(() => [
57
- k(p.$slots, "character")
56
+ fn: k(() => [
57
+ w(v.$slots, "character")
58
58
  ]),
59
59
  key: "0"
60
60
  } : void 0
@@ -1,17 +1,18 @@
1
- import { defineComponent as h, shallowRef as B, useSlots as b, createElementBlock as x, createBlock as S, openBlock as r, toDisplayString as _, unref as e, mergeProps as g, createSlots as k, renderList as C, withCtx as P, renderSlot as I, normalizeProps as U, guardReactiveProps as w } from "vue";
2
- import { InputNumber as R } from "@aplus-frontend/antdv";
3
- import { omit as V } from "lodash-unified";
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";
2
+ import { InputNumber as z } from "@aplus-frontend/antdv";
3
+ import { omit as A } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
- import { useDefaultPlaceholder as z } from "../hooks/use-default-placeholder.mjs";
6
- import { formatSecond as A } from "./helper.mjs";
7
- import { useControllableValue as D } from "../../hooks/useControllableValue.mjs";
8
- const E = { key: 0 }, q = /* @__PURE__ */ h({
5
+ import { useDefaultPlaceholder as D } from "../hooks/use-default-placeholder.mjs";
6
+ import { formatSecond as E } from "./helper.mjs";
7
+ import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
8
+ const M = { key: 0 }, H = /* @__PURE__ */ B({
9
9
  name: "ApFieldSecond",
10
10
  __name: "index",
11
11
  props: {
12
12
  mode: {},
13
13
  class: {},
14
14
  style: {},
15
+ emptyText: { default: "--" },
15
16
  size: {},
16
17
  bordered: { type: Boolean, default: !0 },
17
18
  placeholder: {},
@@ -50,41 +51,38 @@ const E = { key: 0 }, q = /* @__PURE__ */ h({
50
51
  onPressEnter: {},
51
52
  onStep: {},
52
53
  onBlur: {},
53
- onFocus: {},
54
- emptyText: { default: "--" }
54
+ onFocus: {}
55
55
  },
56
56
  emits: ["update:value"],
57
57
  setup(u, { expose: d, emit: s }) {
58
- const o = u, p = s, t = B(), { value: a, updateValue: i } = D(
58
+ const o = u, p = b(
59
+ () => A(o, ["value", "onUpdate:value", "min", "placeholder", "mode"])
60
+ ), i = s, t = x(), { value: a, updateValue: f } = F(
59
61
  o,
60
- p
61
- ), f = b(), c = z("Second", o);
62
- function m() {
62
+ i
63
+ ), c = S(), m = D("Second", o);
64
+ function y() {
63
65
  t.value?.focus();
64
66
  }
65
- function y() {
67
+ function v() {
66
68
  t.value?.blur();
67
69
  }
68
- return d({ focus: m, blur: y }), (l, F) => l.mode === "read" ? (r(), x("span", E, _(e(A)(Number(e(a)))), 1)) : (r(), S(e(R), g(
69
- {
70
- key: 1,
71
- min: 0,
72
- style: { width: "100%" },
73
- placeholder: e(c),
74
- value: e(a)
75
- },
76
- e(V)(o, ["value", "onUpdate:value", "min", "placeholder", "mode"]),
77
- { "onUpdate:value": e(i) }
78
- ), k({ _: 2 }, [
79
- C(f, (M, n) => ({
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({
71
+ key: 1,
72
+ min: 0,
73
+ 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) => ({
80
78
  name: n,
81
- fn: P((v) => [
82
- I(l.$slots, n, U(w(v || {})))
79
+ fn: U((h) => [
80
+ w(l.$slots, n, R(V(h || {})))
83
81
  ])
84
82
  }))
85
83
  ]), 1040, ["placeholder", "value", "onUpdate:value"]));
86
84
  }
87
85
  });
88
86
  export {
89
- q as default
87
+ H as default
90
88
  };
@@ -7,6 +7,7 @@ const m = /* @__PURE__ */ n({
7
7
  mode: {},
8
8
  class: {},
9
9
  style: {},
10
+ emptyText: { default: "--" },
10
11
  size: {},
11
12
  bordered: { type: Boolean },
12
13
  placeholder: {},
@@ -45,8 +46,7 @@ const m = /* @__PURE__ */ n({
45
46
  onPressEnter: {},
46
47
  onStep: {},
47
48
  onBlur: {},
48
- onFocus: {},
49
- emptyText: { default: "--" }
49
+ onFocus: {}
50
50
  },
51
51
  setup(o) {
52
52
  const a = o;
@@ -1,10 +1,10 @@
1
- import { defineComponent as B, ref as C, useSlots as S, onMounted as h, computed as U, unref as t, createVNode as s, Fragment as a, createBlock as i, createElementBlock as V, openBlock as u, resolveDynamicComponent as _, mergeProps as N, withCtx as q, renderSlot as z, normalizeProps as F, guardReactiveProps as P } from "vue";
2
- import { Spin as T, Segmented as O } from "@aplus-frontend/antdv";
3
- import { isFunction as f, isUndefined as R, isString as w, isNumber as A, omit as D } from "lodash-unified";
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";
4
4
  import "../../hooks/index.mjs";
5
- import E from "../hooks/use-options.mjs";
6
- import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
7
- const K = /* @__PURE__ */ B({
5
+ import M from "../hooks/use-options.mjs";
6
+ import { useControllableValue as $ } from "../../hooks/useControllableValue.mjs";
7
+ const L = /* @__PURE__ */ S({
8
8
  name: "ApFieldSegmented",
9
9
  __name: "index",
10
10
  props: {
@@ -13,6 +13,9 @@ const K = /* @__PURE__ */ B({
13
13
  },
14
14
  class: {},
15
15
  style: {},
16
+ emptyText: {
17
+ default: "--"
18
+ },
16
19
  prefixCls: {},
17
20
  options: {},
18
21
  block: {
@@ -33,59 +36,56 @@ const K = /* @__PURE__ */ B({
33
36
  },
34
37
  shape: {},
35
38
  name: {},
36
- emptyText: {
37
- default: "--"
38
- },
39
39
  defaultValue: {},
40
40
  request: {}
41
41
  },
42
42
  emits: ["update:value"],
43
- setup(c, {
44
- emit: v
43
+ setup(v, {
44
+ emit: y
45
45
  }) {
46
- const o = c, {
46
+ const t = v, g = f(() => w(t, ["onUpdate:value", "value", "defaultValue", "options"])), {
47
47
  options: p,
48
- updateOptions: y
49
- } = E(o), g = v, {
48
+ updateOptions: b
49
+ } = M(t), k = y, {
50
50
  value: d,
51
- updateValue: b
52
- } = M(o, g), r = C(!1), k = S();
53
- h(() => {
54
- f(o.request) && (r.value = !0, o.request().then((e) => y(e)).finally(() => {
51
+ updateValue: x
52
+ } = $(t, k), r = h(!1), B = U();
53
+ V(() => {
54
+ c(t.request) && (r.value = !0, t.request().then((e) => b(e)).finally(() => {
55
55
  r.value = !1;
56
56
  }));
57
57
  });
58
- const x = U(() => {
59
- const e = t(d);
60
- if (R(e))
61
- return s(a, null, [o.emptyText]);
62
- const l = t(p)?.find((m) => m === e || m?.value === e);
63
- if (w(l) || A(l))
58
+ const C = f(() => {
59
+ const e = o(d);
60
+ if (A(e))
61
+ return s(a, null, [t.emptyText]);
62
+ const l = o(p)?.find((m) => m === e || m?.value === e);
63
+ if (D(l) || E(l))
64
64
  return s(a, null, [l]);
65
- const n = l?.label || k.label;
66
- return f(n) ? s(a, null, [n?.({
65
+ const n = l?.label || B.label;
66
+ return c(n) ? s(a, null, [n?.({
67
67
  ...l
68
- })]) : s(a, null, [n || o.emptyText]);
68
+ })]) : s(a, null, [n || t.emptyText]);
69
69
  });
70
- return (e, l) => r.value ? (u(), i(t(T), {
70
+ return (e, l) => r.value ? (u(), i(o(O), {
71
71
  key: 0,
72
72
  size: "small"
73
- })) : (u(), V(a, {
73
+ })) : (u(), _(a, {
74
74
  key: 1
75
- }, [e.mode === "read" ? (u(), i(_(x.value), {
75
+ }, [e.mode === "read" ? (u(), i(N(C.value), {
76
76
  key: 0
77
- })) : (u(), i(t(O), N({
77
+ })) : (u(), i(o(R), P({
78
78
  key: 1
79
- }, t(D)(o, ["onUpdate:value", "value", "defaultValue", "options"]), {
80
- value: t(d),
81
- options: t(p),
82
- "onUpdate:value": t(b)
79
+ }, g.value, {
80
+ value: o(d),
81
+ options: o(p),
82
+ "onUpdate:value": o(x)
83
83
  }), {
84
- label: q((n) => [z(e.$slots, "label", F(P(n)))]),
84
+ label: q((n) => [z(e.$slots, "label", F(T(n)))]),
85
85
  _: 3
86
86
  }, 16, ["value", "options", "onUpdate:value"]))], 64));
87
87
  }
88
88
  });
89
89
  export {
90
- K as default
90
+ L as default
91
91
  };