@aplus-frontend/ui 7.7.3 → 7.7.5

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 (131) hide show
  1. package/es/src/ap-action/group/index.vue.d.ts +1 -0
  2. package/es/src/ap-action/group/index.vue.mjs +28 -28
  3. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
  4. package/es/src/ap-button/ap-action-button.vue.d.ts +2 -1
  5. package/es/src/ap-button/ap-button.vue.d.ts +2 -1
  6. package/es/src/ap-field/checkbox/index.vue.mjs +18 -8
  7. package/es/src/ap-field/number/index.vue.d.ts +20 -0
  8. package/es/src/ap-field/number/index.vue.mjs +24 -23
  9. package/es/src/ap-field/number/read.vue2.mjs +3 -2
  10. package/es/src/ap-field/radio/index.vue.mjs +24 -24
  11. package/es/src/ap-field/rate/index.vue.mjs +10 -10
  12. package/es/src/ap-field/select/index.vue.d.ts +12 -4
  13. package/es/src/ap-field/select/index.vue.mjs +74 -71
  14. package/es/src/ap-field/slider/index.vue.d.ts +4 -2
  15. package/es/src/ap-field/slider/index.vue.mjs +12 -12
  16. package/es/src/ap-field/switch/index.vue.mjs +20 -20
  17. package/es/src/ap-field/text/index.vue2.mjs +23 -23
  18. package/es/src/ap-field/text/password.vue.mjs +9 -9
  19. package/es/src/ap-field/text-area/index.vue.mjs +24 -20
  20. package/es/src/ap-field/tree-select/index.vue.d.ts +2 -0
  21. package/es/src/ap-field/tree-select/index.vue.mjs +17 -17
  22. package/es/src/ap-form/ap-form.vue2.mjs +64 -64
  23. package/es/src/ap-form/drawer-form/index.vue.mjs +41 -41
  24. package/es/src/ap-form/item/index.vue.mjs +64 -64
  25. package/es/src/ap-form/items/number/index.vue.d.ts +22 -0
  26. package/es/src/ap-form/items/number/index.vue.mjs +10 -10
  27. package/es/src/ap-form/items/radio/index.vue.mjs +3 -3
  28. package/es/src/ap-form/items/select/index.vue.d.ts +18 -6
  29. package/es/src/ap-form/items/select/index.vue.mjs +5 -5
  30. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  31. package/es/src/ap-form/items/text/index.vue2.mjs +6 -6
  32. package/es/src/ap-form/items/text/password.vue.mjs +7 -7
  33. package/es/src/ap-form/items/text-area/index.vue.mjs +5 -5
  34. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
  35. package/es/src/ap-form/items/tree-select/index.vue.mjs +7 -7
  36. package/es/src/ap-form/modal-form/index.vue.d.ts +25 -1
  37. package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
  38. package/es/src/ap-form/search-form/index.vue.mjs +63 -63
  39. package/es/src/ap-form/style/item.mjs +8 -7
  40. package/es/src/ap-list/index.vue.mjs +6 -6
  41. package/es/src/ap-table/constants.d.ts +23 -4
  42. package/es/src/business/ap-batch-action-group/index.d.ts +34 -4
  43. package/es/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
  44. package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +58 -79
  45. package/es/src/business/ap-descriptions/interface.d.ts +2 -3
  46. package/es/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  47. package/es/src/business/ap-upload/apUpload.vue.mjs +33 -29
  48. package/es/src/business/ap-upload/apUploadTypes.d.ts +4 -0
  49. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +50 -49
  50. package/es/src/business/ap-upload/components/Picture.vue2.mjs +66 -65
  51. package/es/src/business/ap-upload/components/SingleFile.vue2.mjs +95 -94
  52. package/es/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  53. package/es/src/business/ap-upload/hooks/useOss.mjs +26 -24
  54. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  55. package/es/src/editable-table/form-item.vue.mjs +64 -64
  56. package/es/src/editable-table/index.vue.mjs +66 -66
  57. package/es/src/scroll-bar/index.vue.d.ts +7 -7
  58. package/es/src/scroll-bar/index.vue.mjs +21 -21
  59. package/es/src/scroll-bar/internal.vue.d.ts +4 -4
  60. package/es/src/scroll-bar/internal.vue.mjs +20 -20
  61. package/es/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  62. package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +13 -13
  63. package/es/src/scroll-view/index.vue.d.ts +25 -25
  64. package/es/src/version.d.ts +1 -1
  65. package/es/src/version.mjs +1 -1
  66. package/lib/src/ap-action/group/index.vue.d.ts +1 -0
  67. package/lib/src/ap-action/group/index.vue.js +1 -1
  68. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
  69. package/lib/src/ap-button/ap-action-button.vue.d.ts +2 -1
  70. package/lib/src/ap-button/ap-button.vue.d.ts +2 -1
  71. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  72. package/lib/src/ap-field/number/index.vue.d.ts +20 -0
  73. package/lib/src/ap-field/number/index.vue.js +1 -1
  74. package/lib/src/ap-field/number/read.vue2.js +1 -1
  75. package/lib/src/ap-field/radio/index.vue.js +1 -1
  76. package/lib/src/ap-field/rate/index.vue.js +1 -1
  77. package/lib/src/ap-field/select/index.vue.d.ts +12 -4
  78. package/lib/src/ap-field/select/index.vue.js +1 -1
  79. package/lib/src/ap-field/slider/index.vue.d.ts +4 -2
  80. package/lib/src/ap-field/slider/index.vue.js +1 -1
  81. package/lib/src/ap-field/switch/index.vue.js +1 -1
  82. package/lib/src/ap-field/text/index.vue2.js +1 -1
  83. package/lib/src/ap-field/text/password.vue.js +1 -1
  84. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  85. package/lib/src/ap-field/tree-select/index.vue.d.ts +2 -0
  86. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  87. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  88. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  89. package/lib/src/ap-form/item/index.vue.js +1 -1
  90. package/lib/src/ap-form/items/number/index.vue.d.ts +22 -0
  91. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  92. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  93. package/lib/src/ap-form/items/select/index.vue.d.ts +18 -6
  94. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  95. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  96. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  97. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  98. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  99. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
  100. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  101. package/lib/src/ap-form/modal-form/index.vue.d.ts +25 -1
  102. package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
  103. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  104. package/lib/src/ap-form/style/item.js +1 -1
  105. package/lib/src/ap-list/index.vue.js +1 -1
  106. package/lib/src/ap-table/constants.d.ts +23 -4
  107. package/lib/src/business/ap-batch-action-group/index.d.ts +34 -4
  108. package/lib/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
  109. package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
  110. package/lib/src/business/ap-descriptions/interface.d.ts +2 -3
  111. package/lib/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  112. package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
  113. package/lib/src/business/ap-upload/apUploadTypes.d.ts +4 -0
  114. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  115. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  116. package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -1
  117. package/lib/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  118. package/lib/src/business/ap-upload/hooks/useOss.js +1 -1
  119. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  120. package/lib/src/editable-table/form-item.vue.js +1 -1
  121. package/lib/src/editable-table/index.vue.js +1 -1
  122. package/lib/src/scroll-bar/index.vue.d.ts +7 -7
  123. package/lib/src/scroll-bar/index.vue.js +1 -1
  124. package/lib/src/scroll-bar/internal.vue.d.ts +4 -4
  125. package/lib/src/scroll-bar/internal.vue.js +1 -1
  126. package/lib/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
  127. package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
  128. package/lib/src/scroll-view/index.vue.d.ts +25 -25
  129. package/lib/src/version.d.ts +1 -1
  130. package/lib/src/version.js +1 -1
  131. package/package.json +5 -5
@@ -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
  };
@@ -1,20 +1,20 @@
1
- import { isVNode as Q, defineComponent as Y, useSlots as Z, ref as p, computed as w, unref as n, watch as P, cloneVNode as ee, createVNode as s, mergeProps as h, createElementBlock as N, openBlock as v, Fragment as te, createBlock as S, createCommentVNode as M, withCtx as b, renderSlot as _, withModifiers as ie, normalizeClass as ne, resolveDynamicComponent as I, createTextVNode as oe, toDisplayString as ae } from "vue";
2
- import { Button as z, Flex as se, Space as le, Drawer as re } from "@aplus-frontend/antdv";
1
+ import { isVNode as Q, defineComponent as Y, useSlots as Z, shallowRef as ee, ref as y, computed as w, unref as n, watch as P, cloneVNode as te, createVNode as s, mergeProps as p, createElementBlock as N, openBlock as h, Fragment as ie, createBlock as S, createCommentVNode as M, withCtx as v, renderSlot as _, withModifiers as ne, normalizeClass as oe, resolveDynamicComponent as I, createTextVNode as ae, toDisplayString as se } from "vue";
2
+ import { Button as z, Flex as le, Space as re, Drawer as ue } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
5
- import { getSingleVNode as ue } from "../../utils/slot.mjs";
5
+ import { getSingleVNode as de } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { isBoolean as de, isUndefined as me, omit as ce } from "lodash-unified";
8
- import { convertReactiveToRaw as fe } from "../../utils/index.mjs";
9
- import pe from "../style/drawer-form.mjs";
10
- import { useControllableValue as he } from "../../hooks/useControllableValue.mjs";
11
- import { useLocale as ve } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useNamespace as be } from "../../config-provider/hooks/use-namespace.mjs";
13
- import ge from "../ap-form.vue2.mjs";
7
+ import { isBoolean as me, isUndefined as ce, omit as fe } from "lodash-unified";
8
+ import { convertReactiveToRaw as pe } from "../../utils/index.mjs";
9
+ import he from "../style/drawer-form.mjs";
10
+ import { useControllableValue as ve } from "../../hooks/useControllableValue.mjs";
11
+ import { useLocale as be } from "../../config-provider/hooks/use-locale.mjs";
12
+ import { useNamespace as ge } from "../../config-provider/hooks/use-namespace.mjs";
13
+ import Fe from "../ap-form.vue2.mjs";
14
14
  function L(r) {
15
15
  return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Q(r);
16
16
  }
17
- const Ee = /* @__PURE__ */ Y({
17
+ const De = /* @__PURE__ */ Y({
18
18
  name: "ApFormDrawerForm",
19
19
  __name: "index",
20
20
  props: {
@@ -101,10 +101,10 @@ const Ee = /* @__PURE__ */ Y({
101
101
  expose: U,
102
102
  emit: j
103
103
  }) {
104
- const t = r, g = Z(), E = j, o = p(), d = p(), a = p(!1), {
104
+ const t = r, b = Z(), E = j, o = ee(), d = y(), a = y(!1), {
105
105
  value: C,
106
106
  updateValue: m
107
- } = he(t, E, {
107
+ } = ve(t, E, {
108
108
  valuePropName: "open",
109
109
  defaultValue: !1
110
110
  }), l = w(() => {
@@ -115,19 +115,19 @@ const Ee = /* @__PURE__ */ Y({
115
115
  maxWidth: window.innerWidth * 0.8,
116
116
  resizeOnOpen: !0
117
117
  };
118
- return de(t.resize) ? t.resize ? e : {} : {
118
+ return me(t.resize) ? t.resize ? e : {} : {
119
119
  minWidth: t.resize?.minWidth ?? e.minWidth,
120
120
  maxWidth: t.resize?.maxWidth ?? e.maxWidth,
121
121
  onResize: t.resize?.onResize ?? e.onResize,
122
- resizeOnOpen: me(t.resize?.resizeOnOpen) ? e.onResize : t.resize.resizeOnOpen
122
+ resizeOnOpen: ce(t.resize?.resizeOnOpen) ? e.onResize : t.resize.resizeOnOpen
123
123
  };
124
- }), u = p(T()), {
125
- t: F
126
- } = ve(), D = pe("ap-form-drawer-form"), {
124
+ }), u = y(T()), {
125
+ t: g
126
+ } = be(), D = he("ap-form-drawer-form"), {
127
127
  b: $,
128
128
  e: q,
129
129
  em: V
130
- } = be("ap-form-drawer-form"), A = w(() => [q("resize-bar"), {
130
+ } = ge("ap-form-drawer-form"), A = w(() => [q("resize-bar"), {
131
131
  [V("resize-bar", "min-disabled")]: n(u) === n(l).minWidth
132
132
  }, {
133
133
  [V("resize-bar", "max-disabled")]: n(u) === n(l).maxWidth
@@ -141,7 +141,7 @@ const Ee = /* @__PURE__ */ Y({
141
141
  const e = n(l)?.minWidth;
142
142
  return !e || e && e < t.width ? t.width : e;
143
143
  }
144
- const W = ue(g.trigger), R = W ? ee(W, {
144
+ const R = de(b.trigger), W = R ? te(R, {
145
145
  onClick: () => {
146
146
  m(!0);
147
147
  }
@@ -154,28 +154,28 @@ const Ee = /* @__PURE__ */ Y({
154
154
  e.push(s(z, {
155
155
  onClick: k,
156
156
  disabled: a.value
157
- }, L(i = F("ap.common.cancelText")) ? i : {
157
+ }, L(i = g("ap.common.cancelText")) ? i : {
158
158
  default: () => [i]
159
159
  }));
160
160
  }
161
- return t.submitter?.resetButtonProps !== !1 && e.push(s(z, h(t.submitter?.resetButtonProps || {}, {
161
+ return t.submitter?.resetButtonProps !== !1 && e.push(s(z, p(t.submitter?.resetButtonProps || {}, {
162
162
  key: "submit",
163
163
  disabled: a.value,
164
164
  onClick: H
165
165
  }), {
166
- default: () => [t.submitter?.resetText || F("ap.common.resetText")]
167
- })), t.submitter?.submitButtonProps !== !1 && e.push(s(z, h({
166
+ default: () => [t.submitter?.resetText || g("ap.common.resetText")]
167
+ })), t.submitter?.submitButtonProps !== !1 && e.push(s(z, p({
168
168
  type: "primary",
169
169
  key: "submit"
170
170
  }, t.submitter?.submitButtonProps || {}, {
171
171
  loading: a.value,
172
172
  onClick: J
173
173
  }), {
174
- default: () => [t.submitter?.submitText || F("ap.common.okText")]
175
- })), s(se, {
174
+ default: () => [t.submitter?.submitText || g("ap.common.okText")]
175
+ })), s(le, {
176
176
  justify: "flex-end"
177
177
  }, {
178
- default: () => [g.submitter ? g.submitter(e) : s(le, null, L(e) ? e : {
178
+ default: () => [b.submitter ? b.submitter(e) : s(re, null, L(e) ? e : {
179
179
  default: () => [e]
180
180
  })]
181
181
  });
@@ -185,8 +185,8 @@ const Ee = /* @__PURE__ */ Y({
185
185
  }
186
186
  function B(e) {
187
187
  const i = n(l), c = (document.body.offsetWidth || 1e3) - (e.clientX - document.body.offsetLeft), f = i?.minWidth ?? (t.width || 800), O = i?.maxWidth ?? window.innerWidth * 0.8;
188
- let y = c;
189
- c < f && (y = f), c > O && (y = O), u.value = y;
188
+ let F = c;
189
+ c < f && (F = f), c > O && (F = O), u.value = F;
190
190
  }
191
191
  function x() {
192
192
  document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", x);
@@ -199,7 +199,7 @@ const Ee = /* @__PURE__ */ Y({
199
199
  try {
200
200
  const e = await o.value?.validateFieldsReturnTransformed();
201
201
  t.submitter?.onSubmit?.(), a.value = !0;
202
- const i = t.onFinish?.(fe(e));
202
+ const i = t.onFinish?.(pe(e));
203
203
  if (t.submitTimeout && i instanceof Promise) {
204
204
  const f = setTimeout(() => a.value = !1, t.submitTimeout);
205
205
  i.finally(() => {
@@ -243,32 +243,32 @@ const Ee = /* @__PURE__ */ Y({
243
243
  getInternalInstance: (e) => o.value?.getInternalInstance(e),
244
244
  getFieldsValueTransformed: (e) => o.value?.getFieldsValueTransformed(e),
245
245
  validateFieldsReturnTransformed: (e) => o.value?.validateFieldsReturnTransformed(e)
246
- }), (e, i) => (v(), N(te, null, [s(n(re), h(e.drawerProps, {
246
+ }), (e, i) => (h(), N(ie, null, [s(n(ue), p(e.drawerProps, {
247
247
  open: n(C),
248
248
  width: u.value,
249
249
  class: [n($)(), n(D)],
250
250
  "onUpdate:open": K,
251
251
  onCancel: k
252
252
  }), {
253
- title: b(() => [_(e.$slots, "title", {}, () => [oe(ae(t.title), 1)])]),
254
- footer: b(() => [(v(), S(I(X.value)))]),
255
- default: b(() => [s(ge, h({
253
+ title: v(() => [_(e.$slots, "title", {}, () => [ae(se(t.title), 1)])]),
254
+ footer: v(() => [(h(), S(I(X.value)))]),
255
+ default: v(() => [s(Fe, p({
256
256
  ref_key: "formRef",
257
257
  ref: o
258
- }, n(ce)(t, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
259
- default: b(() => [_(e.$slots, "default")]),
258
+ }, n(fe)(t, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
259
+ default: v(() => [_(e.$slots, "default")]),
260
260
  _: 3
261
- }, 16), e.resize ? (v(), N("div", {
261
+ }, 16), e.resize ? (h(), N("div", {
262
262
  key: 0,
263
- class: ne(A.value),
264
- onMousedown: ie(G, ["stop", "prevent"])
263
+ class: oe(A.value),
264
+ onMousedown: ne(G, ["stop", "prevent"])
265
265
  }, null, 34)) : M("", !0)]),
266
266
  _: 3
267
- }, 16, ["open", "width", "class"]), n(R) ? (v(), S(I(n(R)), {
267
+ }, 16, ["open", "width", "class"]), n(W) ? (h(), S(I(n(W)), {
268
268
  key: 0
269
269
  })) : M("", !0)], 64));
270
270
  }
271
271
  });
272
272
  export {
273
- Ee as default
273
+ De as default
274
274
  };