@aplus-frontend/ui 7.7.2 → 7.7.4

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 (91) hide show
  1. package/es/index.mjs +62 -60
  2. package/es/src/ap-field/checkbox/index.vue.mjs +18 -8
  3. package/es/src/ap-field/number/index.vue.mjs +19 -19
  4. package/es/src/ap-field/radio/index.vue.mjs +24 -24
  5. package/es/src/ap-field/rate/index.vue.mjs +10 -10
  6. package/es/src/ap-field/select/index.vue.mjs +74 -71
  7. package/es/src/ap-field/slider/index.vue.d.ts +4 -2
  8. package/es/src/ap-field/slider/index.vue.mjs +12 -12
  9. package/es/src/ap-field/switch/index.vue.mjs +20 -20
  10. package/es/src/ap-field/text/index.vue2.mjs +23 -23
  11. package/es/src/ap-field/text/password.vue.mjs +9 -9
  12. package/es/src/ap-field/text-area/index.vue.mjs +24 -20
  13. package/es/src/ap-field/tree-select/index.vue.mjs +17 -17
  14. package/es/src/ap-form/ap-form.vue2.mjs +64 -64
  15. package/es/src/ap-form/drawer-form/index.vue.mjs +41 -41
  16. package/es/src/ap-form/item/index.vue.mjs +64 -64
  17. package/es/src/ap-form/items/number/index.vue.mjs +10 -10
  18. package/es/src/ap-form/items/radio/index.vue.mjs +3 -3
  19. package/es/src/ap-form/items/select/index.vue.mjs +5 -5
  20. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  21. package/es/src/ap-form/items/text/index.vue2.mjs +6 -6
  22. package/es/src/ap-form/items/text/password.vue.mjs +7 -7
  23. package/es/src/ap-form/items/text-area/index.vue.mjs +5 -5
  24. package/es/src/ap-form/items/tree-select/index.vue.mjs +7 -7
  25. package/es/src/ap-form/search-form/index.vue.mjs +63 -63
  26. package/es/src/ap-form/style/item.mjs +17 -10
  27. package/es/src/ap-list/index.vue.mjs +6 -6
  28. package/es/src/ap-table/constants.d.ts +1 -1
  29. package/es/src/business/ap-descriptions/index.d.ts +1 -0
  30. package/es/src/business/ap-descriptions/index.mjs +4 -0
  31. package/es/src/business/ap-value-select-card/style/index.mjs +1 -1
  32. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  33. package/es/src/editable-table/form-item.vue.mjs +64 -64
  34. package/es/src/editable-table/index.vue.mjs +66 -66
  35. package/es/src/editable-table/style/index.mjs +5 -5
  36. package/es/src/index.mjs +46 -44
  37. package/es/src/scroll-bar/index.vue.d.ts +7 -7
  38. package/es/src/scroll-bar/index.vue.mjs +21 -21
  39. package/es/src/scroll-bar/internal.vue.d.ts +4 -4
  40. package/es/src/scroll-bar/internal.vue.mjs +20 -20
  41. package/es/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  42. package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +13 -13
  43. package/es/src/scroll-view/index.vue.d.ts +25 -25
  44. package/es/src/version.d.ts +1 -1
  45. package/es/src/version.mjs +1 -1
  46. package/lib/index.js +1 -1
  47. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  48. package/lib/src/ap-field/number/index.vue.js +1 -1
  49. package/lib/src/ap-field/radio/index.vue.js +1 -1
  50. package/lib/src/ap-field/rate/index.vue.js +1 -1
  51. package/lib/src/ap-field/select/index.vue.js +1 -1
  52. package/lib/src/ap-field/slider/index.vue.d.ts +4 -2
  53. package/lib/src/ap-field/slider/index.vue.js +1 -1
  54. package/lib/src/ap-field/switch/index.vue.js +1 -1
  55. package/lib/src/ap-field/text/index.vue2.js +1 -1
  56. package/lib/src/ap-field/text/password.vue.js +1 -1
  57. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  58. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  59. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  60. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  61. package/lib/src/ap-form/item/index.vue.js +1 -1
  62. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  63. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  64. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  65. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  66. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  67. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  68. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  69. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  70. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  71. package/lib/src/ap-form/style/item.js +1 -1
  72. package/lib/src/ap-list/index.vue.js +1 -1
  73. package/lib/src/ap-table/constants.d.ts +1 -1
  74. package/lib/src/business/ap-descriptions/index.d.ts +1 -0
  75. package/lib/src/business/ap-descriptions/index.js +1 -1
  76. package/lib/src/business/ap-value-select-card/style/index.js +1 -1
  77. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  78. package/lib/src/editable-table/form-item.vue.js +1 -1
  79. package/lib/src/editable-table/index.vue.js +1 -1
  80. package/lib/src/editable-table/style/index.js +1 -1
  81. package/lib/src/index.js +1 -1
  82. package/lib/src/scroll-bar/index.vue.d.ts +7 -7
  83. package/lib/src/scroll-bar/index.vue.js +1 -1
  84. package/lib/src/scroll-bar/internal.vue.d.ts +4 -4
  85. package/lib/src/scroll-bar/internal.vue.js +1 -1
  86. package/lib/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  87. package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
  88. package/lib/src/scroll-view/index.vue.d.ts +25 -25
  89. package/lib/src/version.d.ts +1 -1
  90. package/lib/src/version.js +1 -1
  91. package/package.json +3 -3
@@ -1,11 +1,11 @@
1
- import { defineComponent as M, ref as g, onMounted as D, watch as R, computed as p, unref as a, createElementBlock as z, createBlock as E, openBlock as S, toDisplayString as U, mergeProps as K, createSlots as H, renderList as $, withCtx as B, renderSlot as j, normalizeProps as W, guardReactiveProps as Y, createVNode as G } from "vue";
2
- import { debounce as J, isFunction as C, isArray as Q, isNil as X, omit as Z } from "lodash-unified";
3
- import { Select as ee, Spin as te } from "@aplus-frontend/antdv";
1
+ import { defineComponent as q, ref as D, shallowRef as R, computed as s, onMounted as z, watch as E, unref as a, createElementBlock as U, createBlock as K, openBlock as g, toDisplayString as H, mergeProps as $, createSlots as j, renderList as W, withCtx as S, renderSlot as Y, normalizeProps as G, guardReactiveProps as J, createVNode as Q } from "vue";
2
+ import { debounce as X, isFunction as B, isArray as Z, isNil as ee, omit as te } from "lodash-unified";
3
+ import { Select as oe, Spin as le } from "@aplus-frontend/antdv";
4
4
  import "../../hooks/index.mjs";
5
- import { useDefaultPlaceholder as oe } from "../hooks/use-default-placeholder.mjs";
6
- import { useSelectOptions as le, SELECT_ALL_VALUE_KEY as f } from "./use-select-options.mjs";
7
- import { useControllableValue as ae } from "../../hooks/useControllableValue.mjs";
8
- const ne = { key: 0 }, fe = /* @__PURE__ */ M({
5
+ import { useDefaultPlaceholder as ae } from "../hooks/use-default-placeholder.mjs";
6
+ import { useSelectOptions as ne, SELECT_ALL_VALUE_KEY as f } from "./use-select-options.mjs";
7
+ import { useControllableValue as re } from "../../hooks/useControllableValue.mjs";
8
+ const ue = { key: 0 }, ve = /* @__PURE__ */ q({
9
9
  name: "ApFieldSelect",
10
10
  __name: "index",
11
11
  props: {
@@ -100,72 +100,75 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
100
100
  searchDelay: { default: 300 }
101
101
  },
102
102
  emits: ["update:value"],
103
- setup(w, { expose: F, emit: b }) {
103
+ setup(C, { expose: w, emit: F }) {
104
104
  let r = 0;
105
- const t = w, N = J((e) => {
106
- if (!C(t.request))
105
+ const e = C, b = X((t) => {
106
+ if (!B(e.request))
107
107
  return;
108
108
  r += 1;
109
109
  const l = r;
110
- s([]), n.value = !0, t.request(e).then((o) => {
111
- r === l && (s(o), n.value = !1);
110
+ d([]), n.value = !0, e.request(t).then((o) => {
111
+ r === l && (d(o), n.value = !1);
112
112
  });
113
- }, t.searchDelay), O = (e, l) => {
114
- const o = t.fieldNames?.label || "label";
115
- return typeof l?.[o] == "string" && l[o].toLowerCase().indexOf(e.toLowerCase()) > -1;
116
- }, { options: u, updateOptions: s } = le(t), m = g(), n = g(t?.loading || !1), x = b;
117
- async function d(e = !0) {
118
- if (!C(t.request))
113
+ }, e.searchDelay), x = (t, l) => {
114
+ const o = e.fieldNames?.label || "label";
115
+ return typeof l?.[o] == "string" && l[o].toLowerCase().indexOf(t.toLowerCase()) > -1;
116
+ }, { options: u, updateOptions: d } = ne(e), m = R(), n = D(e?.loading || !1), N = F, O = s(() => {
117
+ if (e.multiple)
118
+ return e.tokenSeparators ? "tags" : "multiple";
119
+ });
120
+ async function c(t = !0) {
121
+ if (!B(e.request))
119
122
  return;
120
123
  n.value = !0, r += 1;
121
124
  const l = r;
122
125
  try {
123
- e && s([]);
124
- const o = await t.request(void 0, t.params);
126
+ t && d([]);
127
+ const o = await e.request(void 0, e.params);
125
128
  if (l !== r)
126
129
  return;
127
- s(o);
130
+ d(o);
128
131
  } finally {
129
132
  n.value = !1;
130
133
  }
131
134
  }
132
- function I(e) {
133
- t.onFocus?.(e), t.refetchOnFocus && r > 0 && !n.value && d(!0);
135
+ function I(t) {
136
+ e.onFocus?.(t), e.refetchOnFocus && r > 0 && !n.value && c(!0);
134
137
  }
135
- D(() => {
136
- t.lazy || d();
137
- }), R(
138
- () => t.params,
138
+ z(() => {
139
+ e.lazy || c();
140
+ }), E(
141
+ () => e.params,
139
142
  () => {
140
- d();
143
+ c();
141
144
  },
142
145
  {
143
146
  deep: !0
144
147
  }
145
148
  );
146
- const { value: c, updateValue: v } = ae(t, x), V = oe("Select", t), A = p(() => {
147
- const e = a(c);
148
- if (!e)
149
- return t.emptyText;
150
- const l = t.fieldNames?.label || "label", o = t.fieldNames?.value || "value";
151
- return Q(e) ? e.map(
152
- (i) => a(u).find((q) => q[o] === i)?.[l]
153
- ).filter(Boolean).join("、") || t.emptyText : a(u).find(
154
- (i) => i[o] === e
155
- )?.[l] || t.emptyText;
156
- }), _ = p(() => {
157
- const e = !!t?.showSearch, l = t.searchMode;
149
+ const { value: p, updateValue: v } = re(e, N), V = ae("Select", e), _ = s(() => {
150
+ const t = a(p);
151
+ if (!t)
152
+ return e.emptyText;
153
+ const l = e.fieldNames?.label || "label", o = e.fieldNames?.value || "value";
154
+ return Z(t) ? t.map(
155
+ (i) => a(u).find((T) => T[o] === i)?.[l]
156
+ ).filter(Boolean).join("、") || e.emptyText : a(u).find(
157
+ (i) => i[o] === t
158
+ )?.[l] || e.emptyText;
159
+ }), A = s(() => {
160
+ const t = !!e?.showSearch, l = e.searchMode;
158
161
  let o = {};
159
- return e && (o = l === "request" ? {
162
+ return t && (o = l === "request" ? {
160
163
  defaultActiveFirstOption: !1,
161
- onSearch: N,
164
+ onSearch: b,
162
165
  notFoundContent: n.value ? void 0 : null,
163
166
  filterOption: !1,
164
167
  suffixIcon: null
165
168
  } : {
166
- filterOption: X(t?.filterOption) ? O : t?.filterOption
169
+ filterOption: ee(e?.filterOption) ? x : e?.filterOption
167
170
  }), {
168
- ...Z(t, [
171
+ ...te(e, [
169
172
  "mode",
170
173
  "value",
171
174
  "onUpdate:value",
@@ -178,56 +181,56 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
178
181
  placeholder: a(V),
179
182
  ...o
180
183
  };
181
- }), y = p(
182
- () => u.value.map((e) => e[t.fieldNames?.value || "value"]).filter((e) => e !== f)
183
- ), P = p(() => {
184
- if (!t.multiple || !t.addAll)
185
- return a(c);
184
+ }), y = s(
185
+ () => u.value.map((t) => t[e.fieldNames?.value || "value"]).filter((t) => t !== f)
186
+ ), k = s(() => {
187
+ if (!e.multiple || !e.addAll)
188
+ return a(p);
186
189
  if (u.value.some(
187
- (e) => e[t.fieldNames?.value || "value"] === f
190
+ (t) => t[e.fieldNames?.value || "value"] === f
188
191
  )) {
189
- const e = a(y), l = a(c) || [];
190
- if (e.length && e.every((o) => l?.includes(o)))
192
+ const t = a(y), l = a(p) || [];
193
+ if (t.length && t.every((o) => l?.includes(o)))
191
194
  return [f];
192
195
  }
193
- return a(c);
196
+ return a(p);
194
197
  });
195
- function k(e) {
196
- return t.multiple && e.includes(f) ? v(a(y)) : v(e);
198
+ function P(t) {
199
+ return e.multiple && t.includes(f) ? v(a(y)) : v(t);
197
200
  }
198
201
  function L() {
199
202
  m.value?.focus();
200
203
  }
201
- function T() {
204
+ function M() {
202
205
  m.value?.blur();
203
206
  }
204
- return F({
207
+ return w({
205
208
  focus: L,
206
- blur: T,
207
- request: d
208
- }), (e, l) => e.mode === "read" ? (S(), z("span", ne, U(A.value), 1)) : (S(), E(a(ee), K({
209
+ blur: M,
210
+ request: c
211
+ }), (t, l) => t.mode === "read" ? (g(), U("span", ue, H(_.value), 1)) : (g(), K(a(oe), $({
209
212
  key: 1,
210
213
  ref_key: "selectRef",
211
214
  ref: m,
212
215
  "allow-clear": ""
213
- }, _.value, {
214
- mode: e.multiple ? "multiple" : void 0,
215
- value: P.value,
216
+ }, A.value, {
217
+ mode: O.value,
218
+ value: k.value,
216
219
  options: a(u),
217
220
  loading: n.value,
218
- "onUpdate:value": k,
221
+ "onUpdate:value": P,
219
222
  onFocus: I
220
- }), H({ _: 2 }, [
221
- $(e.$slots, (o, h) => ({
223
+ }), j({ _: 2 }, [
224
+ W(t.$slots, (o, h) => ({
222
225
  name: h,
223
- fn: B((i) => [
224
- j(e.$slots, h, W(Y(i || {})))
226
+ fn: S((i) => [
227
+ Y(t.$slots, h, G(J(i || {})))
225
228
  ])
226
229
  })),
227
230
  n.value ? {
228
231
  name: "notFoundContent",
229
- fn: B(() => [
230
- G(a(te), { size: "small" })
232
+ fn: S(() => [
233
+ Q(a(le), { size: "small" })
231
234
  ]),
232
235
  key: "0"
233
236
  } : void 0
@@ -235,5 +238,5 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
235
238
  }
236
239
  });
237
240
  export {
238
- fe as default
241
+ ve as default
239
242
  };
@@ -63,7 +63,8 @@ declare function __VLS_template(): {
63
63
  };
64
64
  tipFormatter: {
65
65
  type: PropType<(value?: number) => any>;
66
- default: (value?: number) => any;
66
+ default: (value
67
+ /** @type { typeof __VLS_ctx.sliderRef } */ ? /** @type { typeof __VLS_ctx.sliderRef } */: number) => any;
67
68
  };
68
69
  tooltipOpen: {
69
70
  type: BooleanConstructor;
@@ -339,7 +340,8 @@ declare const __VLS_component: DefineComponent<ApFieldSliderProps, {
339
340
  };
340
341
  tipFormatter: {
341
342
  type: PropType<(value?: number) => any>;
342
- default: (value?: number) => any;
343
+ default: (value
344
+ /** @type { typeof __VLS_ctx.sliderRef } */ ? /** @type { typeof __VLS_ctx.sliderRef } */: number) => any;
343
345
  };
344
346
  tooltipOpen: {
345
347
  type: BooleanConstructor;
@@ -1,7 +1,7 @@
1
- import { defineComponent as B, useSlots as x, ref as g, computed as k, unref as t, createElementBlock as C, createBlock as S, openBlock as n, Fragment as _, createTextVNode as P, toDisplayString as T, mergeProps as V, createSlots as b, renderList as h, withCtx as F, renderSlot as R, normalizeProps as U, guardReactiveProps as A } from "vue";
1
+ import { defineComponent as B, useSlots as x, shallowRef as g, computed as k, unref as t, createElementBlock as C, createBlock as S, openBlock as n, Fragment as _, createTextVNode as h, toDisplayString as P, mergeProps as T, createSlots as V, renderList as b, withCtx as R, renderSlot as F, normalizeProps as U, guardReactiveProps as A } from "vue";
2
2
  import { Slider as $ } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
- import { isNil as N, isArray as w, omit as z } from "lodash-unified";
4
+ import { isNil as w, isArray as N, omit as z } from "lodash-unified";
5
5
  import { useControllableValue as D } from "../../hooks/useControllableValue.mjs";
6
6
  const I = /* @__PURE__ */ B({
7
7
  name: "ApFieldSlider",
@@ -41,10 +41,10 @@ const I = /* @__PURE__ */ B({
41
41
  emptyText: { default: "--" }
42
42
  },
43
43
  emits: ["update:value"],
44
- setup(u, { expose: i, emit: p }) {
45
- const s = x(), o = g(), l = u, d = p, { value: a, updateValue: f } = D(l, d), m = k(() => {
44
+ setup(u, { expose: s, emit: i }) {
45
+ const p = x(), o = g(), l = u, d = i, { value: a, updateValue: f } = D(l, d), m = k(() => {
46
46
  const e = t(a);
47
- return N(e) ? l.emptyText : w(e) ? `${e[0]}-${e[1]}` : e;
47
+ return w(e) ? l.emptyText : N(e) ? `${e[0]}-${e[1]}` : e;
48
48
  });
49
49
  function c() {
50
50
  o.value?.focus?.();
@@ -52,12 +52,12 @@ const I = /* @__PURE__ */ B({
52
52
  function v() {
53
53
  o.value?.blur?.();
54
54
  }
55
- return i({
55
+ return s({
56
56
  focus: c,
57
57
  blur: v
58
58
  }), (e, E) => e.mode === "read" ? (n(), C(_, { key: 0 }, [
59
- P(T(m.value), 1)
60
- ], 64)) : (n(), S(t($), V(
59
+ h(P(m.value), 1)
60
+ ], 64)) : (n(), S(t($), T(
61
61
  { key: 1 },
62
62
  t(z)(l, [
63
63
  "value",
@@ -72,11 +72,11 @@ const I = /* @__PURE__ */ B({
72
72
  value: t(a),
73
73
  "onUpdate:value": t(f)
74
74
  }
75
- ), b({ _: 2 }, [
76
- h(s, (L, r) => ({
75
+ ), V({ _: 2 }, [
76
+ b(p, (L, r) => ({
77
77
  name: r,
78
- fn: F((y) => [
79
- R(e.$slots, r, U(A(y || {})))
78
+ fn: R((y) => [
79
+ F(e.$slots, r, U(A(y || {})))
80
80
  ])
81
81
  }))
82
82
  ]), 1040, ["value", "onUpdate:value"]));
@@ -1,11 +1,11 @@
1
- import { defineComponent as z, useSlots as D, ref as T, unref as o, computed as g, createVNode as u, Fragment as s, createBlock as m, createElementBlock as E, openBlock as f, resolveDynamicComponent as K, mergeProps as k, createSlots as v, renderList as V, withCtx as p, renderSlot as B, normalizeProps as b, guardReactiveProps as w } from "vue";
2
- import { Switch as A, Popconfirm as L } from "@aplus-frontend/antdv";
1
+ import { defineComponent as U, useSlots as x, ref as z, unref as o, computed as g, createVNode as u, Fragment as s, createBlock as h, createElementBlock as D, openBlock as f, resolveDynamicComponent as E, mergeProps as p, createSlots as v, renderList as V, withCtx as k, renderSlot as B, normalizeProps as b, guardReactiveProps as w } from "vue";
2
+ import { Switch as A, Popconfirm as K } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
- import { isNil as M, isFunction as R, omit as P } from "lodash-unified";
4
+ import { isNil as L, isFunction as M, omit as P } from "lodash-unified";
5
5
  import "../../utils/index.mjs";
6
- import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
6
+ import { useControllableValue as R } from "../../hooks/useControllableValue.mjs";
7
7
  import { isDef as d } from "../../utils/is.mjs";
8
- const Q = /* @__PURE__ */ z({
8
+ const Q = /* @__PURE__ */ U({
9
9
  name: "ApFieldSwitch",
10
10
  __name: "index",
11
11
  props: {
@@ -54,12 +54,12 @@ const Q = /* @__PURE__ */ z({
54
54
  setup(S, {
55
55
  emit: _
56
56
  }) {
57
- const i = D(), e = S, F = _, {
57
+ const i = x(), e = S, F = _, {
58
58
  value: t,
59
59
  updateValue: r
60
- } = j(e, F, {
60
+ } = R(e, F, {
61
61
  valuePropName: "checked"
62
- }), c = T(!1);
62
+ }), c = z(!1);
63
63
  async function C(n, a) {
64
64
  if (!d(e.confirm)) {
65
65
  if (!d(e.onAction)) {
@@ -82,17 +82,17 @@ const Q = /* @__PURE__ */ z({
82
82
  }
83
83
  await e.onAction(n) && r(n);
84
84
  }
85
- const $ = g(() => {
85
+ const T = g(() => {
86
86
  const n = o(t);
87
- return M(n) ? u(s, null, [e.emptyText]) : n === e.checkedValue ? u(s, null, [e.checkedChildren || i.checkedChildren?.() || `${e.checkedValue}`]) : u(s, null, [e.unCheckedChildren || i.unCheckedChildren?.() || `${e.unCheckedValue}`]);
88
- }), U = g(() => d(e.confirm) ? R(e.confirm) ? e.confirm(o(t)) : e.confirm : {});
89
- return (n, a) => n.mode === "read" ? (f(), m(K($.value), {
87
+ return L(n) ? u(s, null, [e.emptyText]) : n === e.checkedValue ? u(s, null, [e.checkedChildren || i.checkedChildren?.() || `${e.checkedValue}`]) : u(s, null, [e.unCheckedChildren || i.unCheckedChildren?.() || `${e.unCheckedValue}`]);
88
+ }), $ = g(() => d(e.confirm) ? M(e.confirm) ? e.confirm(o(t)) : e.confirm : {});
89
+ return (n, a) => n.mode === "read" ? (f(), h(E(T.value), {
90
90
  key: 0
91
- })) : (f(), E(s, {
91
+ })) : (f(), D(s, {
92
92
  key: 1
93
- }, [!o(d)(n.confirm) || n.disabled ? (f(), m(o(A), k({
93
+ }, [!o(d)(n.confirm) || n.disabled ? (f(), h(o(A), p({
94
94
  key: 0
95
- }, o(P)(e, "onUpdate:checked"), {
95
+ }, o(P)(e, ["onUpdate:checked", "emptyText"]), {
96
96
  checked: o(t),
97
97
  loading: n.loading ?? c.value,
98
98
  onClick: C
@@ -100,14 +100,14 @@ const Q = /* @__PURE__ */ z({
100
100
  _: 2
101
101
  }, [V(i, (y, l) => ({
102
102
  name: l,
103
- fn: p((h) => [B(n.$slots, l, b(w(h || {})))])
104
- }))]), 1040, ["checked", "loading"])) : (f(), m(o(L), k({
103
+ fn: k((m) => [B(n.$slots, l, b(w(m || {})))])
104
+ }))]), 1040, ["checked", "loading"])) : (f(), h(o(K), p({
105
105
  key: 1,
106
106
  disabled: c.value
107
- }, U.value, {
107
+ }, $.value, {
108
108
  onConfirm: N
109
109
  }), {
110
- default: p(() => [u(o(A), k(o(P)(e, "onUpdate:checked"), {
110
+ default: k(() => [u(o(A), p(o(P)(e, ["onUpdate:checked", "emptyText"]), {
111
111
  checked: o(t),
112
112
  loading: n.loading ?? c.value,
113
113
  onClick: C
@@ -115,7 +115,7 @@ const Q = /* @__PURE__ */ z({
115
115
  _: 2
116
116
  }, [V(i, (y, l) => ({
117
117
  name: l,
118
- fn: p((h) => [B(n.$slots, l, b(w(h || {})))])
118
+ fn: k((m) => [B(n.$slots, l, b(w(m || {})))])
119
119
  }))]), 1040, ["checked", "loading"])]),
120
120
  _: 3
121
121
  }, 16, ["disabled"]))], 64));
@@ -1,4 +1,4 @@
1
- import { isVNode as g, defineComponent as C, ref as S, useSlots as _, createVNode as i, mergeProps as R, unref as r, computed as V, createBlock as w, openBlock as T } from "vue";
1
+ import { isVNode as g, defineComponent as C, useSlots as R, shallowRef as S, createVNode as i, mergeProps as _, unref as r, computed as w, createBlock as V, openBlock as T } from "vue";
2
2
  import { Input as j } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { omit as U } from "lodash-unified";
@@ -99,39 +99,39 @@ const $ = /* @__PURE__ */ C({
99
99
  expose: d,
100
100
  emit: f
101
101
  }) {
102
- const t = S(), u = _(), c = (o) => {
102
+ const l = R(), e = n, c = f, {
103
+ value: p,
104
+ updateValue: m
105
+ } = F(e, c), y = z("Text", e), t = S(), x = (o) => {
103
106
  t.value?.focus(o);
104
- }, m = () => {
107
+ }, v = () => {
105
108
  t.value?.blur();
106
- }, y = (o, l, a) => {
107
- t.value?.setSelectionRange(o, l, a);
108
- }, x = () => {
109
+ }, B = (o, u, a) => {
110
+ t.value?.setSelectionRange(o, u, a);
111
+ }, b = () => {
109
112
  t.value?.select();
110
- }, v = f, e = n, {
111
- value: p,
112
- updateValue: B
113
- } = F(e, v), b = z("Text", e);
113
+ };
114
114
  function h(o) {
115
- const l = o.target.value || "", a = e.beforeInput ? e.beforeInput?.(l) : l, s = t.value?.$el?.querySelector("input");
116
- s && (s.value = a), B(a);
115
+ const u = o.target.value || "", a = e.beforeInput ? e.beforeInput?.(u) : u, s = t.value?.$el?.querySelector("input");
116
+ s && (s.value = a), m(a);
117
117
  }
118
118
  function I() {
119
- return e.mode === "edit" ? i(j, R(U(e, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
120
- placeholder: r(b),
119
+ return e.mode === "edit" ? i(j, _(U(e, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
120
+ placeholder: r(y),
121
121
  value: r(p),
122
122
  onInput: h,
123
123
  ref: t
124
- }), N(u) ? u : {
125
- default: () => [u]
126
- }) : i("span", null, [e.prefix || u?.prefix?.(), r(p) || e.emptyText, e.suffix || u?.suffix?.()]);
124
+ }), N(l) ? l : {
125
+ default: () => [l]
126
+ }) : i("span", null, [e.prefix || l?.prefix?.(), r(p) || e.emptyText, e.suffix || l?.suffix?.()]);
127
127
  }
128
128
  return d({
129
- focus: c,
130
- blur: m,
131
- setSelectionRange: y,
132
- select: x,
133
- input: V(() => t.value?.input)
134
- }), (o, l) => (T(), w(r(M), {
129
+ focus: x,
130
+ blur: v,
131
+ setSelectionRange: B,
132
+ select: b,
133
+ input: w(() => t.value?.input)
134
+ }), (o, u) => (T(), V(r(M), {
135
135
  renderer: I
136
136
  }));
137
137
  }
@@ -1,13 +1,13 @@
1
- import { isVNode as x, defineComponent as h, useSlots as g, ref as C, unref as a, createVNode as e, mergeProps as w, Fragment as P, createBlock as U, openBlock as V } from "vue";
1
+ import { isVNode as x, defineComponent as h, useSlots as g, shallowRef as w, unref as a, createVNode as e, mergeProps as C, Fragment as P, createBlock as U, openBlock as V } from "vue";
2
2
  import { Input as _, Space as S } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { omit as T } from "lodash-unified";
5
5
  import { EyeOutlined as I, EyeInvisibleOutlined as O } from "@ant-design/icons-vue";
6
- import { useDefaultPlaceholder as j } from "../hooks/use-default-placeholder.mjs";
6
+ import { useDefaultPlaceholder as R } from "../hooks/use-default-placeholder.mjs";
7
7
  import "../../render/index.mjs";
8
8
  import { useControllableValue as p } from "../../hooks/useControllableValue.mjs";
9
- import k from "../../render/render.mjs";
10
- function E(t) {
9
+ import j from "../../render/render.mjs";
10
+ function k(t) {
11
11
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
12
12
  }
13
13
  const J = /* @__PURE__ */ h({
@@ -112,10 +112,10 @@ const J = /* @__PURE__ */ h({
112
112
  expose: c,
113
113
  emit: f
114
114
  }) {
115
- const r = f, o = t, u = g(), i = C(), {
115
+ const r = f, o = t, u = g(), i = w(), {
116
116
  value: m,
117
117
  updateValue: v
118
- } = p(o, r), y = j("TextPassword", o), {
118
+ } = p(o, r), y = R("TextPassword", o), {
119
119
  value: b,
120
120
  updateValue: s
121
121
  } = p(o, r, {
@@ -124,14 +124,14 @@ const J = /* @__PURE__ */ h({
124
124
  function B() {
125
125
  const n = a(m), l = a(b);
126
126
  if (o.mode === "edit")
127
- return e(_.Password, w(T(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
127
+ return e(_.Password, C(T(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
128
128
  placeholder: a(y),
129
129
  value: n,
130
130
  "onUpdate:value": v,
131
131
  visible: l,
132
132
  "onUpdate:visible": s,
133
133
  ref: i
134
- }), E(u) ? u : {
134
+ }), k(u) ? u : {
135
135
  default: () => [u]
136
136
  });
137
137
  let d = e(P, null, [o.emptyText]);
@@ -151,7 +151,7 @@ const J = /* @__PURE__ */ h({
151
151
  blur: () => {
152
152
  i.value?.blur();
153
153
  }
154
- }), (n, l) => (V(), U(a(k), {
154
+ }), (n, l) => (V(), U(a(j), {
155
155
  renderer: B
156
156
  }));
157
157
  }
@@ -1,8 +1,8 @@
1
- import { defineComponent as h, ref as B, computed as b, createElementBlock as I, createBlock as A, openBlock as p, normalizeClass as C, unref as e, toDisplayString as g, mergeProps as z } from "vue";
2
- import { isNil as T, omit as k } from "lodash-unified";
1
+ import { defineComponent as h, shallowRef as B, computed as b, createElementBlock as I, createBlock as A, openBlock as p, normalizeClass as C, unref as e, toDisplayString as g, mergeProps as z } from "vue";
2
+ import { isNil as T, omit as w } from "lodash-unified";
3
3
  import "../../hooks/index.mjs";
4
4
  import "../../config-provider/index.mjs";
5
- import { Input as w } from "@aplus-frontend/antdv";
5
+ import { Input as k } from "@aplus-frontend/antdv";
6
6
  import { useDefaultPlaceholder as R } from "../hooks/use-default-placeholder.mjs";
7
7
  import S from "../style/index.mjs";
8
8
  import { useControllableValue as _ } from "../../hooks/useControllableValue.mjs";
@@ -63,29 +63,33 @@ const O = /* @__PURE__ */ h({
63
63
  },
64
64
  emits: ["update:value"],
65
65
  setup(s, { expose: i, emit: d }) {
66
- const t = B(), a = s, c = d, { value: l, updateValue: f } = _(a, c), { b: m } = U("field-text-area"), y = S("field"), v = R("TextArea", a);
67
- function x(o) {
68
- const n = o.target.value || "", r = a.beforeInput ? a.beforeInput?.(n) : n, u = t.value?.$el?.querySelector("textarea");
69
- u && (u.value = r), f(r);
66
+ const o = B(), a = s, m = d, { value: l, updateValue: c } = _(a, m), { b: f } = U("field-text-area"), y = S("field"), x = R("TextArea", a);
67
+ function v(t) {
68
+ const n = t.target.value || "", r = a.beforeInput ? a.beforeInput?.(n) : n, u = o.value?.$el?.querySelector("textarea");
69
+ u && (u.value = r), c(r);
70
70
  }
71
71
  return i({
72
- focus: (o) => {
73
- t.value?.focus(o);
72
+ focus: (t) => {
73
+ o.value?.focus(t);
74
74
  },
75
75
  blur: () => {
76
- t.value?.blur();
76
+ o.value?.blur();
77
77
  },
78
- resizableTextArea: b(() => t.value?.resizableTextArea)
79
- }), (o, n) => o.mode === "read" ? (p(), I("span", {
78
+ resizableTextArea: b(() => o.value?.resizableTextArea)
79
+ }), (t, n) => t.mode === "read" ? (p(), I("span", {
80
80
  key: 0,
81
- class: C([e(m)(), e(y)])
82
- }, g(e(T)(e(l)) || e(l) === "" ? o.emptyText : e(l)), 3)) : (p(), A(e(w).TextArea, z({ key: 1 }, e(k)(a, ["onUpdate:value", "value", "beforeInput"]), {
83
- ref_key: "textAreaRef",
84
- ref: t,
85
- placeholder: e(v),
86
- value: e(l),
87
- onInput: x
88
- }), null, 16, ["placeholder", "value"]));
81
+ class: C([e(f)(), e(y)])
82
+ }, g(e(T)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3)) : (p(), A(e(k).TextArea, z(
83
+ { key: 1 },
84
+ e(w)(a, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
85
+ {
86
+ ref_key: "textAreaRef",
87
+ ref: o,
88
+ placeholder: e(x),
89
+ value: e(l),
90
+ onInput: v
91
+ }
92
+ ), null, 16, ["placeholder", "value"]));
89
93
  }
90
94
  });
91
95
  export {