@aplus-frontend/ui 7.7.3 → 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 (79) hide show
  1. package/es/src/ap-field/checkbox/index.vue.mjs +18 -8
  2. package/es/src/ap-field/number/index.vue.mjs +19 -19
  3. package/es/src/ap-field/radio/index.vue.mjs +24 -24
  4. package/es/src/ap-field/rate/index.vue.mjs +10 -10
  5. package/es/src/ap-field/select/index.vue.mjs +74 -71
  6. package/es/src/ap-field/slider/index.vue.d.ts +4 -2
  7. package/es/src/ap-field/slider/index.vue.mjs +12 -12
  8. package/es/src/ap-field/switch/index.vue.mjs +20 -20
  9. package/es/src/ap-field/text/index.vue2.mjs +23 -23
  10. package/es/src/ap-field/text/password.vue.mjs +9 -9
  11. package/es/src/ap-field/text-area/index.vue.mjs +24 -20
  12. package/es/src/ap-field/tree-select/index.vue.mjs +17 -17
  13. package/es/src/ap-form/ap-form.vue2.mjs +64 -64
  14. package/es/src/ap-form/drawer-form/index.vue.mjs +41 -41
  15. package/es/src/ap-form/item/index.vue.mjs +64 -64
  16. package/es/src/ap-form/items/number/index.vue.mjs +10 -10
  17. package/es/src/ap-form/items/radio/index.vue.mjs +3 -3
  18. package/es/src/ap-form/items/select/index.vue.mjs +5 -5
  19. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  20. package/es/src/ap-form/items/text/index.vue2.mjs +6 -6
  21. package/es/src/ap-form/items/text/password.vue.mjs +7 -7
  22. package/es/src/ap-form/items/text-area/index.vue.mjs +5 -5
  23. package/es/src/ap-form/items/tree-select/index.vue.mjs +7 -7
  24. package/es/src/ap-form/search-form/index.vue.mjs +63 -63
  25. package/es/src/ap-form/style/item.mjs +8 -7
  26. package/es/src/ap-list/index.vue.mjs +6 -6
  27. package/es/src/ap-table/constants.d.ts +1 -1
  28. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  29. package/es/src/editable-table/form-item.vue.mjs +64 -64
  30. package/es/src/editable-table/index.vue.mjs +66 -66
  31. package/es/src/scroll-bar/index.vue.d.ts +7 -7
  32. package/es/src/scroll-bar/index.vue.mjs +21 -21
  33. package/es/src/scroll-bar/internal.vue.d.ts +4 -4
  34. package/es/src/scroll-bar/internal.vue.mjs +20 -20
  35. package/es/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  36. package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +13 -13
  37. package/es/src/scroll-view/index.vue.d.ts +25 -25
  38. package/es/src/version.d.ts +1 -1
  39. package/es/src/version.mjs +1 -1
  40. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  41. package/lib/src/ap-field/number/index.vue.js +1 -1
  42. package/lib/src/ap-field/radio/index.vue.js +1 -1
  43. package/lib/src/ap-field/rate/index.vue.js +1 -1
  44. package/lib/src/ap-field/select/index.vue.js +1 -1
  45. package/lib/src/ap-field/slider/index.vue.d.ts +4 -2
  46. package/lib/src/ap-field/slider/index.vue.js +1 -1
  47. package/lib/src/ap-field/switch/index.vue.js +1 -1
  48. package/lib/src/ap-field/text/index.vue2.js +1 -1
  49. package/lib/src/ap-field/text/password.vue.js +1 -1
  50. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  51. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  52. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  53. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  54. package/lib/src/ap-form/item/index.vue.js +1 -1
  55. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  56. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  57. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  58. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  59. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  60. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  61. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  62. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  63. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  64. package/lib/src/ap-form/style/item.js +1 -1
  65. package/lib/src/ap-list/index.vue.js +1 -1
  66. package/lib/src/ap-table/constants.d.ts +1 -1
  67. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  68. package/lib/src/editable-table/form-item.vue.js +1 -1
  69. package/lib/src/editable-table/index.vue.js +1 -1
  70. package/lib/src/scroll-bar/index.vue.d.ts +7 -7
  71. package/lib/src/scroll-bar/index.vue.js +1 -1
  72. package/lib/src/scroll-bar/internal.vue.d.ts +4 -4
  73. package/lib/src/scroll-bar/internal.vue.js +1 -1
  74. package/lib/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  75. package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
  76. package/lib/src/scroll-view/index.vue.d.ts +25 -25
  77. package/lib/src/version.d.ts +1 -1
  78. package/lib/src/version.js +1 -1
  79. package/package.json +1 -1
@@ -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 {
@@ -1,13 +1,13 @@
1
- import { isVNode as F, defineComponent as L, useSlots as R, ref as _, computed as E, unref as e, createVNode as r, Fragment as g, createBlock as v, openBlock as S, resolveDynamicComponent as K, mergeProps as U, createSlots as z, renderList as M, withCtx as B, renderSlot as j, normalizeProps as q, guardReactiveProps as O } from "vue";
1
+ import { isVNode as A, defineComponent as F, useSlots as L, shallowRef as _, computed as E, unref as e, createVNode as d, Fragment as g, createBlock as v, openBlock as S, resolveDynamicComponent as K, mergeProps as U, createSlots as z, renderList as M, withCtx as B, renderSlot as j, normalizeProps as q, guardReactiveProps as O } from "vue";
2
2
  import { Space as $, Tag as H, TreeSelect as W, Spin as G } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { isArray as J, omit as Q } from "lodash-unified";
5
5
  import { useRequest as X } from "./use-request.mjs";
6
6
  import { useControllableValue as Y } from "../../hooks/useControllableValue.mjs";
7
- function x(d) {
8
- return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !F(d);
7
+ function w(r) {
8
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !A(r);
9
9
  }
10
- const re = /* @__PURE__ */ L({
10
+ const de = /* @__PURE__ */ F({
11
11
  name: "ApFieldTreeSelect",
12
12
  __name: "index",
13
13
  props: {
@@ -172,11 +172,11 @@ const re = /* @__PURE__ */ L({
172
172
  }
173
173
  },
174
174
  emits: ["update:value"],
175
- setup(d, {
176
- expose: C,
177
- emit: w
175
+ setup(r, {
176
+ expose: x,
177
+ emit: C
178
178
  }) {
179
- const o = d, N = R(), T = w, p = _(), {
179
+ const o = r, N = L(), T = C, p = _(), {
180
180
  value: f,
181
181
  updateValue: b
182
182
  } = Y(o, T), {
@@ -187,25 +187,25 @@ const re = /* @__PURE__ */ L({
187
187
  let t;
188
188
  const u = e(f), i = J(u) ? u : [u].filter(Boolean);
189
189
  if (!i.length)
190
- return r(g, null, [o.emptyText]);
190
+ return d(g, null, [o.emptyText]);
191
191
  const n = [], s = o.fieldNames?.label || "label", P = o.fieldNames?.value || "value";
192
192
  function h(a) {
193
193
  for (const l of a) {
194
- if (i.find((A) => A === l[P]) && n.push(l[s]), n.length === i.length)
194
+ if (i.find((R) => R === l[P]) && n.push(l[s]), n.length === i.length)
195
195
  return;
196
196
  l.children?.length && h(l.children);
197
197
  }
198
198
  }
199
- return h(e(c)), n.length ? n.length === 1 ? r("span", null, [n[0]]) : r($, {
199
+ return h(e(c)), n.length ? n.length === 1 ? d("span", null, [n[0]]) : d($, {
200
200
  size: 4
201
- }, x(t = n.map((a, l) => r(H, {
201
+ }, w(t = n.map((a, l) => d(H, {
202
202
  style: "margin-right: 0px",
203
203
  key: `${a}-${l}`
204
- }, x(a) ? a : {
204
+ }, w(a) ? a : {
205
205
  default: () => [a]
206
206
  }))) ? t : {
207
207
  default: () => [t]
208
- }) : r(g, null, [o.emptyText]);
208
+ }) : d(g, null, [o.emptyText]);
209
209
  });
210
210
  function V() {
211
211
  p.value?.focus?.();
@@ -216,7 +216,7 @@ const re = /* @__PURE__ */ L({
216
216
  function I(t) {
217
217
  return y(t);
218
218
  }
219
- return C({
219
+ return x({
220
220
  request: y,
221
221
  focus: V,
222
222
  blur: k
@@ -239,7 +239,7 @@ const re = /* @__PURE__ */ L({
239
239
  fn: B((s) => [j(t.$slots, n, q(O(s || {})))])
240
240
  })), e(m) ? {
241
241
  name: "notFoundContent",
242
- fn: B(() => [r(e(G), {
242
+ fn: B(() => [d(e(G), {
243
243
  size: "small"
244
244
  })]),
245
245
  key: "0"
@@ -247,5 +247,5 @@ const re = /* @__PURE__ */ L({
247
247
  }
248
248
  });
249
249
  export {
250
- re as default
250
+ de as default
251
251
  };
@@ -1,17 +1,17 @@
1
- import { defineComponent as te, reactive as re, ref as O, unref as h, nextTick as oe, toRaw as P, watch as ne, onWatcherCleanup as ie, computed as le, createBlock as se, openBlock as ae, mergeProps as ue, withCtx as ce, renderSlot as fe } from "vue";
2
- import { Form as de } from "@aplus-frontend/antdv";
3
- import { useProvideForm as ge } from "./context.mjs";
4
- import { isArray as f, cloneDeep as me, isEqual as pe, isFunction as M, isPlainObject as R, omit as he } from "lodash-unified";
5
- import { useUrlSearchParams as Fe } from "@vueuse/core";
6
- import { INTERNAL_FORM_INSTANCE_MARK as j } from "./constant.mjs";
7
- import { getRouteType as ye } from "../utils/index.mjs";
8
- import Te from "./utils/set.mjs";
9
- import { genParams as B, setToParams as x } from "./utils/params.mjs";
10
- import { useInjectFormProvider as Ve } from "./provider/context.mjs";
11
- import { getModelValue as W } from "./utils/get.mjs";
12
- import { useDevWarning as ve } from "../utils/warning.mjs";
1
+ import { defineComponent as ee, reactive as te, shallowRef as re, ref as oe, unref as h, nextTick as ne, toRaw as P, watch as ie, onWatcherCleanup as le, computed as se, createBlock as ae, openBlock as ue, mergeProps as ce, withCtx as fe, renderSlot as de } from "vue";
2
+ import { Form as ge } from "@aplus-frontend/antdv";
3
+ import { useProvideForm as me } from "./context.mjs";
4
+ import { isArray as f, cloneDeep as pe, isEqual as he, isFunction as R, isPlainObject as M, omit as Fe } from "lodash-unified";
5
+ import { useUrlSearchParams as ye } from "@vueuse/core";
6
+ import { INTERNAL_FORM_INSTANCE_MARK as O } from "./constant.mjs";
7
+ import { getRouteType as Te } from "../utils/index.mjs";
8
+ import Ve from "./utils/set.mjs";
9
+ import { genParams as B, setToParams as j } from "./utils/params.mjs";
10
+ import { useInjectFormProvider as ve } from "./provider/context.mjs";
11
+ import { getModelValue as x } from "./utils/get.mjs";
12
+ import { useDevWarning as Ce } from "../utils/warning.mjs";
13
13
  import { isDef as T } from "../utils/is.mjs";
14
- const je = /* @__PURE__ */ te({
14
+ const xe = /* @__PURE__ */ ee({
15
15
  name: "ApForm",
16
16
  __name: "ap-form",
17
17
  props: {
@@ -43,8 +43,8 @@ const je = /* @__PURE__ */ te({
43
43
  syncToUrl: { type: [Boolean, Function], default: !1 },
44
44
  syncToUrlPriority: { type: Boolean }
45
45
  },
46
- setup(N, { expose: S }) {
47
- const n = N;
46
+ setup(W, { expose: N }) {
47
+ const n = W;
48
48
  function V(e, t, r = !0, o) {
49
49
  if (f(e)) {
50
50
  let i = l;
@@ -60,11 +60,11 @@ const je = /* @__PURE__ */ te({
60
60
  }
61
61
  y();
62
62
  }
63
- const s = O(), v = Fe(ye()), F = Ve(), q = ve("ApForm"), C = O(
63
+ const s = re(), v = ye(Te()), F = ve(), S = Ce("ApForm"), C = oe(
64
64
  n.syncToUrl ? B(n.syncToUrl, v, "get") : {}
65
65
  );
66
- let d = me(_()), g = {};
67
- const l = re(_());
66
+ let d = pe(_()), g = {};
67
+ const l = te(_());
68
68
  let m = [];
69
69
  function _() {
70
70
  const e = n.initialValues || {};
@@ -76,13 +76,13 @@ const je = /* @__PURE__ */ te({
76
76
  ...e
77
77
  };
78
78
  }
79
- function D(e) {
79
+ function q(e) {
80
80
  const t = p(e, g);
81
- F.triggerFormFinish(n.name, e), n.syncToUrl && x(v, B(n.syncToUrl, t, "set")), n.onFinish?.(t);
81
+ F.triggerFormFinish(n.name, e), n.syncToUrl && j(v, B(n.syncToUrl, t, "set")), n.onFinish?.(t);
82
82
  }
83
- const K = async () => {
84
- s.value?.resetFields(), await oe(() => {
85
- Object.keys(l).forEach((e) => delete l[e]), Object.assign(l, d), y(), n.syncToUrl && x(
83
+ const D = async () => {
84
+ s.value?.resetFields(), await ne(() => {
85
+ Object.keys(l).forEach((e) => delete l[e]), Object.assign(l, d), y(), n.syncToUrl && j(
86
86
  v,
87
87
  B(
88
88
  n.syncToUrl,
@@ -91,20 +91,20 @@ const je = /* @__PURE__ */ te({
91
91
  )
92
92
  );
93
93
  });
94
- }, L = (e) => {
94
+ }, K = (e) => {
95
95
  s.value?.clearValidate(e);
96
- }, $ = (e, t) => s.value?.validateFields(e, t), k = async (e, t) => {
96
+ }, L = (e, t) => s.value?.validateFields(e, t), $ = async (e, t) => {
97
97
  const r = await s.value?.validateFields(
98
98
  e,
99
99
  t
100
100
  );
101
101
  return p(r, g);
102
- }, b = (e) => e === !0 ? P(l) : s.value?.getFieldsValue(e), G = (e) => {
102
+ }, b = (e) => e === !0 ? P(l) : s.value?.getFieldsValue(e), k = (e) => {
103
103
  const t = b(e);
104
104
  return p(t, g);
105
- }, H = (e, t) => s.value?.validate(e, t), J = (e, t = {}) => {
105
+ }, G = (e, t) => s.value?.validate(e, t), H = (e, t = {}) => {
106
106
  s.value?.scrollToField(e, t);
107
- }, Q = (e) => {
107
+ }, J = (e) => {
108
108
  Object.assign(l, e), y();
109
109
  }, I = (e, t, r = !0, o) => {
110
110
  V(e, t, r, o), y();
@@ -114,7 +114,7 @@ const je = /* @__PURE__ */ te({
114
114
  m = m.filter((t) => t !== e);
115
115
  };
116
116
  }
117
- function X(e, t) {
117
+ function Q(e, t) {
118
118
  if (f(e)) {
119
119
  let r = d;
120
120
  for (let o = 0; o < e.length - 1; o++)
@@ -123,17 +123,17 @@ const je = /* @__PURE__ */ te({
123
123
  } else
124
124
  d[e] = t;
125
125
  }
126
- function Y(e, t) {
126
+ function X(e, t) {
127
127
  if (!T(e) || !T(t))
128
128
  return;
129
- const r = W(d, t);
130
- if (pe(r, e))
129
+ const r = x(d, t);
130
+ if (he(r, e))
131
131
  return;
132
- const o = W(h(C), t);
133
- T(o) && n.syncToUrlPriority || (V(t, e, !1), X(t, e));
132
+ const o = x(h(C), t);
133
+ T(o) && n.syncToUrlPriority || (V(t, e, !1), Q(t, e));
134
134
  }
135
- function Z(e, t) {
136
- t && (g = Te(
135
+ function Y(e, t) {
136
+ t && (g = Ve(
137
137
  g,
138
138
  [e].flat(1),
139
139
  t,
@@ -141,17 +141,17 @@ const je = /* @__PURE__ */ te({
141
141
  ));
142
142
  }
143
143
  function w({ initialValue: e, name: t, transform: r }) {
144
- Y(e, t), Z(t, r);
144
+ X(e, t), Y(t, r);
145
145
  }
146
146
  function A() {
147
147
  return d;
148
148
  }
149
- function z(e) {
150
- if (q(
151
- e === j,
149
+ function Z(e) {
150
+ if (S(
151
+ e === O,
152
152
  "usage",
153
153
  "getInternalInstance should only used at internal"
154
- ), e === j)
154
+ ), e === O)
155
155
  return {
156
156
  registerField: w,
157
157
  registerWatch: U,
@@ -172,14 +172,14 @@ const je = /* @__PURE__ */ te({
172
172
  return;
173
173
  let r = f(e) ? [] : {};
174
174
  return Object.keys(e).forEach((o) => {
175
- const a = e[o], i = t?.[o], u = M(i) ? i : i?.transformer, ee = M(i) ? !0 : i?.flat;
176
- if (M(u)) {
175
+ const a = e[o], i = t?.[o], u = R(i) ? i : i?.transformer, z = R(i) ? !0 : i?.flat;
176
+ if (R(u)) {
177
177
  const c = u(a);
178
- ee ? f(c) && f(r) ? r = [...r, ...c] : R(c) && R(r) ? r = {
178
+ z ? f(c) && f(r) ? r = [...r, ...c] : M(c) && M(r) ? r = {
179
179
  ...r,
180
180
  ...c
181
181
  } : r[o] = c : r[o] = c;
182
- } else if (R(a) || f(a)) {
182
+ } else if (M(a) || f(a)) {
183
183
  const c = p(
184
184
  a,
185
185
  i
@@ -190,31 +190,31 @@ const je = /* @__PURE__ */ te({
190
190
  }), r;
191
191
  }
192
192
  const E = {
193
- resetFields: K,
194
- clearValidate: L,
195
- validateFields: $,
193
+ resetFields: D,
194
+ clearValidate: K,
195
+ validateFields: L,
196
196
  getFieldsValue: b,
197
- validate: H,
198
- scrollToField: J,
199
- setFieldsValue: Q,
197
+ validate: G,
198
+ scrollToField: H,
199
+ setFieldsValue: J,
200
200
  setFieldValue: I,
201
201
  registerWatch: U,
202
- validateFieldsReturnTransformed: k,
203
- getFieldsValueTransformed: G,
204
- getInternalInstance: z
202
+ validateFieldsReturnTransformed: $,
203
+ getFieldsValueTransformed: k,
204
+ getInternalInstance: Z
205
205
  };
206
- return ne(
206
+ return ie(
207
207
  () => n.name,
208
208
  (e) => {
209
- e && (F.registerForm(e, E), ie(() => {
209
+ e && (F.registerForm(e, E), le(() => {
210
210
  F.unregisterForm(n.name);
211
211
  }));
212
212
  },
213
213
  {
214
214
  immediate: !0
215
215
  }
216
- ), ge({
217
- model: le(() => l),
216
+ ), me({
217
+ model: se(() => l),
218
218
  updateModel: V,
219
219
  internalInstance: {
220
220
  registerWatch: U,
@@ -222,12 +222,12 @@ const je = /* @__PURE__ */ te({
222
222
  setFieldValue: I,
223
223
  getInitialValues: A
224
224
  }
225
- }), S(E), (e, t) => (ae(), se(h(de), ue(
225
+ }), N(E), (e, t) => (ue(), ae(h(ge), ce(
226
226
  {
227
227
  ref_key: "formRef",
228
228
  ref: s
229
229
  },
230
- h(he)(n, [
230
+ h(Fe)(n, [
231
231
  "initialValues",
232
232
  "onValuesChange",
233
233
  "onFinish",
@@ -237,16 +237,16 @@ const je = /* @__PURE__ */ te({
237
237
  {
238
238
  model: l,
239
239
  "data-form-name": e.name,
240
- onFinish: D
240
+ onFinish: q
241
241
  }
242
242
  ), {
243
- default: ce(() => [
244
- fe(e.$slots, "default")
243
+ default: fe(() => [
244
+ de(e.$slots, "default")
245
245
  ]),
246
246
  _: 3
247
247
  }, 16, ["model", "data-form-name"]));
248
248
  }
249
249
  });
250
250
  export {
251
- je as default
251
+ xe as default
252
252
  };