@aplus-frontend/ui 0.4.30 → 0.4.32

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 (149) hide show
  1. package/es/src/ap-action/group/index.vue.mjs +3 -3
  2. package/es/src/ap-action/item/index.vue2.mjs +5 -5
  3. package/es/src/ap-action/item-dropdown/index.vue.mjs +7 -7
  4. package/es/src/ap-action/item-modal/index.vue.mjs +2 -2
  5. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  6. package/es/src/ap-button/ap-action-button.vue.mjs +2 -2
  7. package/es/src/ap-button/ap-button.vue.mjs +2 -2
  8. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +3 -3
  9. package/es/src/ap-descriptions/help-message/index.vue2.mjs +4 -4
  10. package/es/src/ap-download/ap-download.vue.mjs +1 -1
  11. package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
  12. package/es/src/ap-field/date/index.vue.mjs +4 -4
  13. package/es/src/ap-field/date-range/index.vue.mjs +8 -8
  14. package/es/src/ap-field/index.mjs +30 -30
  15. package/es/src/ap-field/interface.d.ts +4 -0
  16. package/es/src/ap-field/number/index.vue.mjs +8 -8
  17. package/es/src/ap-field/radio/index.vue.mjs +1 -1
  18. package/es/src/ap-field/rate/index.vue.mjs +2 -2
  19. package/es/src/ap-field/segmented/index.vue.mjs +1 -1
  20. package/es/src/ap-field/select/index.vue.mjs +112 -93
  21. package/es/src/ap-field/select/use-select-options.d.ts +21 -0
  22. package/es/src/ap-field/select/use-select-options.mjs +43 -0
  23. package/es/src/ap-field/slider/index.vue.mjs +4 -4
  24. package/es/src/ap-field/switch/index.vue.mjs +3 -3
  25. package/es/src/ap-field/text/index.vue2.mjs +2 -2
  26. package/es/src/ap-field/text/password.vue.mjs +2 -2
  27. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  28. package/es/src/ap-form/ap-form.vue2.mjs +2 -2
  29. package/es/src/ap-form/drawer-form/index.vue.mjs +9 -9
  30. package/es/src/ap-form/item/index.vue.mjs +7 -7
  31. package/es/src/ap-form/item-group/index.vue.mjs +3 -3
  32. package/es/src/ap-form/items/checkbox/index.vue.mjs +2 -2
  33. package/es/src/ap-form/items/date/index.vue.mjs +2 -2
  34. package/es/src/ap-form/items/date-range/index.vue.mjs +2 -2
  35. package/es/src/ap-form/items/number/index.vue.mjs +2 -2
  36. package/es/src/ap-form/items/radio/index.vue.mjs +2 -2
  37. package/es/src/ap-form/items/select/index.vue.mjs +2 -2
  38. package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
  39. package/es/src/ap-form/items/text/group.vue2.mjs +2 -2
  40. package/es/src/ap-form/items/text/index.vue2.mjs +2 -2
  41. package/es/src/ap-form/items/text/password.vue.mjs +2 -2
  42. package/es/src/ap-form/items/text-area/index.vue.mjs +2 -2
  43. package/es/src/ap-form/modal-form/index.vue.mjs +7 -7
  44. package/es/src/ap-form/render/item.vue.mjs +2 -2
  45. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  46. package/es/src/ap-form/set/index.vue.mjs +1 -1
  47. package/es/src/ap-info-layout/ApInfoLayout.vue.mjs +2 -2
  48. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +2 -2
  49. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.mjs +1 -1
  50. package/es/src/ap-list/index.vue.mjs +4 -4
  51. package/es/src/ap-table/ap-table.vue2.mjs +28 -28
  52. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +3 -3
  53. package/es/src/ap-table/components/index/index.vue2.mjs +2 -2
  54. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +52 -33
  55. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +3 -3
  56. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +1 -1
  57. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +1 -1
  58. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +1 -1
  59. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +11 -11
  60. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
  61. package/es/src/ap-table/components/status/index.vue2.mjs +2 -2
  62. package/es/src/ap-table/constants.mjs +40 -40
  63. package/es/src/ap-tag/ap-tag-group.vue.mjs +8 -8
  64. package/es/src/ap-tag/ap-tag.vue.mjs +2 -2
  65. package/es/src/ap-upload/apUpload.vue.mjs +5 -5
  66. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +3 -3
  67. package/es/src/ap-upload/components/Picture.vue2.mjs +6 -6
  68. package/es/src/ap-upload/components/SingleFile.vue2.mjs +7 -7
  69. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
  70. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +2 -2
  71. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +2 -2
  72. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +36 -34
  73. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +1 -1
  74. package/es/src/business/ap-batch-action-group/index.d.ts +7 -7
  75. package/es/src/business/ap-batch-action-group/interface.d.ts +2 -2
  76. package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +1 -1
  77. package/es/src/business/ap-card/ApCard.vue2.mjs +7 -7
  78. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -11
  79. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +9 -9
  80. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +5 -5
  81. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +4 -4
  82. package/es/src/business/ap-group-search/images/icon-down.vue.mjs +2 -2
  83. package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +2 -2
  84. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +2 -2
  85. package/es/src/business/ap-image/ApImage.vue2.mjs +1 -1
  86. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +2 -2
  87. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +1 -1
  88. package/es/src/business/ap-ladder/HelpMessageIcon.vue2.mjs +1 -1
  89. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +4 -4
  90. package/es/src/business/ap-status/ApStatus.vue2.mjs +8 -8
  91. package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +4 -4
  92. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  93. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
  94. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +14 -14
  95. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +3 -3
  96. package/es/src/business/ap-title/ApTitle.vue2.mjs +7 -7
  97. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +1 -1
  98. package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
  99. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
  100. package/es/src/business/batch-input-group/form-item.vue.mjs +2 -2
  101. package/es/src/business/batch-input-group/index.vue.d.ts +1 -0
  102. package/es/src/business/batch-input-group/index.vue.mjs +70 -60
  103. package/es/src/business/batch-input-group/interface.d.ts +5 -1
  104. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +2 -2
  105. package/es/src/business/hooks/useTableRefresh.mjs +39 -32
  106. package/es/src/check-card/index.vue2.mjs +3 -3
  107. package/es/src/editable-table/form-item.vue.mjs +2 -2
  108. package/es/src/editable-table/index.vue.mjs +2 -2
  109. package/es/src/full-screen/index.vue.mjs +3 -3
  110. package/es/src/hooks/useFullScreen.mjs +5 -5
  111. package/es/src/locale/lang/en.mjs +2 -2
  112. package/es/src/locale/lang/zh-cn.mjs +2 -2
  113. package/es/src/portal/index.vue.mjs +2 -2
  114. package/es/src/scroll-bar/index.vue.mjs +3 -3
  115. package/es/src/scroll-bar/internal.vue.mjs +2 -2
  116. package/es/src/scroll-view/index.vue.mjs +9 -9
  117. package/es/src/work-order-modal/help-message.vue2.mjs +2 -2
  118. package/es/src/work-order-modal/work-order-modal.vue.mjs +2 -2
  119. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  120. package/lib/src/ap-field/index.js +1 -1
  121. package/lib/src/ap-field/interface.d.ts +4 -0
  122. package/lib/src/ap-field/select/index.vue.js +1 -1
  123. package/lib/src/ap-field/select/use-select-options.d.ts +21 -0
  124. package/lib/src/ap-field/select/use-select-options.js +1 -0
  125. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  126. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -1
  127. package/lib/src/ap-table/constants.js +1 -1
  128. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  129. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  130. package/lib/src/business/ap-batch-action-group/index.d.ts +7 -7
  131. package/lib/src/business/ap-batch-action-group/interface.d.ts +2 -2
  132. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -0
  133. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  134. package/lib/src/business/batch-input-group/interface.d.ts +5 -1
  135. package/lib/src/business/hooks/useTableRefresh.js +1 -1
  136. package/lib/src/locale/lang/en.js +1 -1
  137. package/lib/src/locale/lang/zh-cn.js +1 -1
  138. package/package.json +1 -1
  139. package/theme/ap-table/ap-table.css +2 -2
  140. package/theme/ap-table-modal/index.css +2 -2
  141. package/theme/batch-input-group/index.css +5 -1
  142. package/theme/batch-input-group/index.less +1 -0
  143. package/theme/batch-input-group/popover-input.css +2 -1
  144. package/theme/batch-input-group/popover-input.less +5 -1
  145. package/theme/index.css +7 -3
  146. package/theme/scroll-bar/index.css +2 -2
  147. package/theme/scroll-bar/index.less +2 -2
  148. package/theme/ap-scroll-bar/index.css +0 -31
  149. package/theme/ap-scroll-bar/index.less +0 -39
@@ -1,12 +1,12 @@
1
- import { defineComponent as _, ref as y, onMounted as L, computed as w, unref as a, openBlock as S, createElementBlock as R, toDisplayString as z, createBlock as D, mergeProps as U, createSlots as K, renderList as H, withCtx as B, renderSlot as $, normalizeProps as j, guardReactiveProps as E, createVNode as W } from "vue";
2
- import { debounce as G, isFunction as g, isArray as J, isNil as Q, omit as X } from "lodash-unified";
3
- import { Select as Y, Spin as Z } from "@aplus-frontend/antdv";
1
+ import { defineComponent as z, ref as B, onMounted as D, computed as f, unref as n, createElementBlock as E, createBlock as K, openBlock as C, toDisplayString as H, mergeProps as $, createSlots as j, renderList as W, withCtx as F, 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 { omitUndefined as ee } from "../../utils/index.mjs";
6
- import { useDefaultPlaceholder as oe } from "../hooks/use-default-placeholder.mjs";
7
- import te from "../hooks/use-options.mjs";
8
- import { useControllableValue as le } from "../../hooks/useControllableValue.mjs";
9
- const ne = { key: 0 }, pe = /* @__PURE__ */ _({
5
+ import { omitUndefined as ne } from "../../utils/index.mjs";
6
+ import { useDefaultPlaceholder as ae } from "../hooks/use-default-placeholder.mjs";
7
+ import { useSelectOptions as re, SELECT_ALL_VALUE_KEY as p } from "./use-select-options.mjs";
8
+ import { useControllableValue as ue } from "../../hooks/useControllableValue.mjs";
9
+ const ie = { key: 0 }, ye = /* @__PURE__ */ z({
10
10
  name: "ApFieldSelect",
11
11
  __name: "index",
12
12
  props: {
@@ -92,83 +92,80 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
92
92
  "onUpdate:value": {},
93
93
  searchMode: { default: "filter" },
94
94
  refetchOnFocus: { type: Boolean, default: !1 },
95
- lazy: { type: Boolean, default: !1 }
95
+ lazy: { type: Boolean, default: !1 },
96
+ addAll: { type: [Boolean, Number] }
96
97
  },
97
98
  emits: ["update:value"],
98
- setup(C, { expose: F, emit: b }) {
99
- let r = 0;
100
- const N = G((o) => {
101
- if (!g(e.request))
99
+ setup(N, { expose: O, emit: A }) {
100
+ let u = 0;
101
+ const V = X((e) => {
102
+ if (!b(t.request))
102
103
  return;
103
- r += 1;
104
- const t = r;
105
- i([]), u.value = !0, e.request(o).then((l) => {
106
- r === t && i(l);
104
+ u += 1;
105
+ const o = u;
106
+ s([]), r.value = !0, t.request(e).then((l) => {
107
+ u === o && s(l);
107
108
  }).finally(() => {
108
- u.value = !1;
109
+ r.value = !1;
109
110
  });
110
- }, 300), e = C, O = (o, t) => {
111
- var n;
112
- const l = ((n = e.fieldNames) == null ? void 0 : n.label) || "label";
113
- return typeof (t == null ? void 0 : t[l]) == "string" && t[l].toLowerCase().indexOf(o.toLowerCase()) > -1;
114
- }, { options: s, updateOptions: i } = te(e), c = y(), u = y((e == null ? void 0 : e.loading) || !1), x = b;
115
- async function f(o = !0) {
116
- if (!g(e.request))
111
+ }, 300), t = N, x = (e, o) => {
112
+ var a;
113
+ const l = ((a = t.fieldNames) == null ? void 0 : a.label) || "label";
114
+ return typeof (o == null ? void 0 : o[l]) == "string" && o[l].toLowerCase().indexOf(e.toLowerCase()) > -1;
115
+ }, { options: i, updateOptions: s } = re(t), m = B(), r = B((t == null ? void 0 : t.loading) || !1), I = A;
116
+ async function v(e = !0) {
117
+ if (!b(t.request))
117
118
  return;
118
- u.value = !0, r += 1;
119
- const t = r;
119
+ r.value = !0, u += 1;
120
+ const o = u;
120
121
  try {
121
- o && i([]);
122
- const l = await e.request();
123
- if (t !== r)
122
+ e && s([]);
123
+ const l = await t.request();
124
+ if (o !== u)
124
125
  return;
125
- i(l);
126
+ s(l);
126
127
  } finally {
127
- u.value = !1;
128
+ r.value = !1;
128
129
  }
129
130
  }
130
- function I(o) {
131
- var t;
132
- (t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && r > 0 && !u.value && f(!0);
131
+ function P(e) {
132
+ var o;
133
+ (o = t.onFocus) == null || o.call(t, e), t.refetchOnFocus && u > 0 && !r.value && v(!0);
133
134
  }
134
- L(() => {
135
- if (e.lazy) {
136
- r += 1;
137
- return;
138
- }
139
- f();
135
+ D(() => {
136
+ t.lazy || v();
140
137
  });
141
- const { value: m, updateValue: P } = le(e, x), V = oe("Select", e), k = w(() => {
142
- var d, v;
143
- const o = a(m);
144
- if (!o)
145
- return e.emptyText;
146
- const t = ((d = e.fieldNames) == null ? void 0 : d.label) || "label", l = ((v = e.fieldNames) == null ? void 0 : v.value) || "value";
147
- if (J(o))
148
- return o.map(
149
- (p) => {
150
- var h;
151
- return (h = a(s).find((T) => T[l] === p)) == null ? void 0 : h[t];
138
+ const { value: d, updateValue: h } = ue(t, I), k = ae("Select", t), L = f(() => {
139
+ var c, g;
140
+ const e = n(d);
141
+ if (!e)
142
+ return t.emptyText;
143
+ const o = ((c = t.fieldNames) == null ? void 0 : c.label) || "label", l = ((g = t.fieldNames) == null ? void 0 : g.value) || "value";
144
+ if (Z(e))
145
+ return e.map(
146
+ (y) => {
147
+ var w;
148
+ return (w = n(i).find((U) => U[l] === y)) == null ? void 0 : w[o];
152
149
  }
153
- ).filter(Boolean).join("、") || e.emptyText;
154
- const n = a(s).find(
155
- (p) => p[l] === o
150
+ ).filter(Boolean).join("、") || t.emptyText;
151
+ const a = n(i).find(
152
+ (y) => y[l] === e
156
153
  );
157
- return (n == null ? void 0 : n[t]) || e.emptyText;
158
- }), q = w(() => {
159
- const o = !!(e != null && e.showSearch), t = e.searchMode;
154
+ return (a == null ? void 0 : a[o]) || t.emptyText;
155
+ }), T = f(() => {
156
+ const e = !!(t != null && t.showSearch), o = t.searchMode;
160
157
  let l = {};
161
- return o && (l = t === "request" ? {
158
+ return e && (l = o === "request" ? {
162
159
  showArrow: !1,
163
160
  defaultActiveFirstOption: !1,
164
- onSearch: N,
165
- notFoundContent: u.value ? void 0 : null
161
+ onSearch: V,
162
+ notFoundContent: r.value ? void 0 : null
166
163
  } : {
167
164
  showArrow: !0,
168
- filterOption: Q(e == null ? void 0 : e.filterOption) ? O : e == null ? void 0 : e.filterOption
165
+ filterOption: ee(t == null ? void 0 : t.filterOption) ? x : t == null ? void 0 : t.filterOption
169
166
  }), {
170
- ...ee(
171
- X(e, [
167
+ ...ne(
168
+ te(t, [
172
169
  "mode",
173
170
  "value",
174
171
  "onUpdate:value",
@@ -179,51 +176,73 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
179
176
  "onBeforeSelect"
180
177
  ])
181
178
  ),
182
- placeholder: a(V),
179
+ placeholder: n(k),
183
180
  ...l
184
181
  };
182
+ }), S = f(
183
+ () => i.value.map((e) => {
184
+ var o;
185
+ return e[((o = t.fieldNames) == null ? void 0 : o.value) || "value"];
186
+ }).filter((e) => e !== p)
187
+ ), _ = f(() => {
188
+ if (!t.multiple || !t.addAll)
189
+ return n(d);
190
+ if (i.value.some(
191
+ (e) => {
192
+ var o;
193
+ return e[((o = t.fieldNames) == null ? void 0 : o.value) || "value"] === p;
194
+ }
195
+ )) {
196
+ const e = n(S), o = n(d) || [];
197
+ if (e.length && e.every((l) => o == null ? void 0 : o.includes(l)))
198
+ return [p];
199
+ }
200
+ return n(d);
185
201
  });
186
- function A() {
187
- var o;
188
- (o = c.value) == null || o.focus();
202
+ function q(e) {
203
+ return t.multiple && e.includes(p) ? h(n(S)) : h(e);
189
204
  }
190
205
  function M() {
191
- var o;
192
- (o = c.value) == null || o.blur();
206
+ var e;
207
+ (e = m.value) == null || e.focus();
208
+ }
209
+ function R() {
210
+ var e;
211
+ (e = m.value) == null || e.blur();
193
212
  }
194
- return F({
195
- focus: A,
196
- blur: M,
197
- request: f
198
- }), (o, t) => o.mode === "read" ? (S(), R("span", ne, z(k.value), 1)) : (S(), D(a(Y), U({
213
+ return O({
214
+ focus: M,
215
+ blur: R,
216
+ request: v
217
+ }), (e, o) => e.mode === "read" ? (C(), E("span", ie, H(L.value), 1)) : (C(), K(n(oe), $({
199
218
  key: 1,
200
219
  ref_key: "selectRef",
201
- ref: c,
220
+ ref: m,
202
221
  "allow-clear": ""
203
- }, q.value, {
204
- mode: o.multiple ? "multiple" : void 0,
205
- value: a(m),
206
- options: a(s),
207
- loading: u.value,
208
- "onUpdate:value": a(P),
209
- onFocus: I
210
- }), K({ _: 2 }, [
211
- H(o.$slots, (l, n) => ({
212
- name: n,
213
- fn: B((d) => [
214
- $(o.$slots, n, j(E(d || {})))
222
+ }, T.value, {
223
+ mode: e.multiple ? "multiple" : void 0,
224
+ value: _.value,
225
+ options: n(i),
226
+ loading: r.value,
227
+ "onUpdate:value": q,
228
+ onFocus: P
229
+ }), j({ _: 2 }, [
230
+ W(e.$slots, (l, a) => ({
231
+ name: a,
232
+ fn: F((c) => [
233
+ Y(e.$slots, a, G(J(c || {})))
215
234
  ])
216
235
  })),
217
- u.value ? {
236
+ r.value ? {
218
237
  name: "notFoundContent",
219
- fn: B(() => [
220
- W(a(Z), { size: "small" })
238
+ fn: F(() => [
239
+ Q(n(le), { size: "small" })
221
240
  ]),
222
241
  key: "0"
223
242
  } : void 0
224
- ]), 1040, ["mode", "value", "options", "loading", "onUpdate:value"]));
243
+ ]), 1040, ["mode", "value", "options", "loading"]));
225
244
  }
226
245
  });
227
246
  export {
228
- pe as default
247
+ ye as default
229
248
  };
@@ -0,0 +1,21 @@
1
+ import { ApFieldSelectProps } from '../interface';
2
+ import { DefaultOptionType } from '@aplus-frontend/antdv/es/select';
3
+ import { Ref } from 'vue';
4
+ export declare const SELECT_ALL_VALUE_KEY = "SELECTABLE_ALL_VALUE_KEY";
5
+ export declare const useSelectOptions: (props: ApFieldSelectProps) => {
6
+ options: Ref<{
7
+ [x: string]: any;
8
+ label?: any;
9
+ value?: string | number | null | undefined;
10
+ children?: Omit<DefaultOptionType, "children">[] | undefined;
11
+ disabled?: boolean | undefined;
12
+ }[], DefaultOptionType[] | {
13
+ [x: string]: any;
14
+ label?: any;
15
+ value?: string | number | null | undefined;
16
+ children?: Omit<DefaultOptionType, "children">[] | undefined;
17
+ disabled?: boolean | undefined;
18
+ }[]>;
19
+ updateOptions: (nextOptions?: DefaultOptionType[]) => void;
20
+ };
21
+ export default useSelectOptions;
@@ -0,0 +1,43 @@
1
+ import "../../config-provider/index.mjs";
2
+ import { ref as m, watch as L } from "vue";
3
+ import { useLocale as r } from "../../config-provider/hooks/use-locale.mjs";
4
+ const A = "SELECTABLE_ALL_VALUE_KEY", h = (t) => {
5
+ var u, i;
6
+ const e = m((t == null ? void 0 : t.options) || []), { t: o } = r(), d = {
7
+ [((u = t.fieldNames) == null ? void 0 : u.label) || "label"]: o("ap.common.all"),
8
+ [((i = t.fieldNames) == null ? void 0 : i.value) || "value"]: A
9
+ };
10
+ function c(l) {
11
+ const a = t.addAll;
12
+ if (!t.multiple || !a)
13
+ return !1;
14
+ const f = Math.min(0, a === !0 ? 0 : a);
15
+ return l.length > f;
16
+ }
17
+ function n(l) {
18
+ if (l) {
19
+ if (!c(l)) {
20
+ e.value = l;
21
+ return;
22
+ }
23
+ e.value = [d, ...l];
24
+ }
25
+ }
26
+ return L(
27
+ () => t.options,
28
+ (l) => {
29
+ n(l);
30
+ },
31
+ {
32
+ deep: !0
33
+ }
34
+ ), {
35
+ options: e,
36
+ updateOptions: n
37
+ };
38
+ };
39
+ export {
40
+ A as SELECT_ALL_VALUE_KEY,
41
+ h as default,
42
+ h as useSelectOptions
43
+ };
@@ -1,4 +1,4 @@
1
- import { defineComponent as x, useSlots as g, ref as k, computed as C, unref as o, openBlock as u, createElementBlock as S, Fragment as _, createTextVNode as P, toDisplayString as T, createBlock as V, mergeProps as b, createSlots as h, renderList as F, withCtx as R, renderSlot as U, normalizeProps as A, guardReactiveProps as $ } from "vue";
1
+ import { defineComponent as x, useSlots as g, ref as k, computed as C, unref as o, createElementBlock as S, createBlock as _, openBlock as u, Fragment as P, createTextVNode as T, toDisplayString as V, mergeProps as b, createSlots as h, renderList as F, withCtx as R, renderSlot as U, normalizeProps as A, guardReactiveProps as $ } from "vue";
2
2
  import { Slider as N } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { isNil as w, isArray as z, omit as D } from "lodash-unified";
@@ -57,9 +57,9 @@ const I = /* @__PURE__ */ x({
57
57
  return p({
58
58
  focus: v,
59
59
  blur: y
60
- }), (e, t) => e.mode === "read" ? (u(), S(_, { key: 0 }, [
61
- P(T(c.value), 1)
62
- ], 64)) : (u(), V(o(N), b(
60
+ }), (e, t) => e.mode === "read" ? (u(), S(P, { key: 0 }, [
61
+ T(V(c.value), 1)
62
+ ], 64)) : (u(), _(o(N), b(
63
63
  { key: 1 },
64
64
  o(D)(a, [
65
65
  "value",
@@ -1,4 +1,4 @@
1
- import { defineComponent as z, useSlots as D, ref as T, unref as o, computed as g, createVNode as s, Fragment as f, openBlock as h, createBlock as k, resolveDynamicComponent as E, createElementBlock as K, mergeProps as p, createSlots as v, renderList as V, withCtx as C, renderSlot as B, normalizeProps as b, guardReactiveProps as w } from "vue";
1
+ import { defineComponent as z, useSlots as D, ref as T, unref as o, computed as g, createVNode as s, Fragment as f, createBlock as k, createElementBlock as E, openBlock as h, resolveDynamicComponent as K, mergeProps as p, createSlots as v, renderList as V, withCtx as C, renderSlot as B, normalizeProps as b, guardReactiveProps as w } from "vue";
2
2
  import { Switch as A, Popconfirm as L } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { isNil as M, isFunction as R, omit as P } from "lodash-unified";
@@ -86,9 +86,9 @@ const O = /* @__PURE__ */ z({
86
86
  const n = o(d);
87
87
  return M(n) ? s(f, null, [e.emptyText]) : n === e.checkedValue ? s(f, null, [e.checkedChildren || ((i = c.checkedChildren) == null ? void 0 : i.call(c)) || `${e.checkedValue}`]) : s(f, null, [e.unCheckedChildren || ((t = c.unCheckedChildren) == null ? void 0 : t.call(c)) || `${e.unCheckedValue}`]);
88
88
  }), U = g(() => r(e.confirm) ? R(e.confirm) ? e.confirm(o(d)) : e.confirm : {});
89
- return (n, u) => n.mode === "read" ? (h(), k(E($.value), {
89
+ return (n, u) => n.mode === "read" ? (h(), k(K($.value), {
90
90
  key: 0
91
- })) : (h(), K(f, {
91
+ })) : (h(), E(f, {
92
92
  key: 1
93
93
  }, [!o(r)(n.confirm) || n.disabled ? (h(), k(o(A), p({
94
94
  key: 0
@@ -1,4 +1,4 @@
1
- import { isVNode as v, defineComponent as B, ref as g, useSlots as h, computed as b, createVNode as d, mergeProps as C, unref as u, Fragment as S, openBlock as _, createBlock as R, resolveDynamicComponent as w } from "vue";
1
+ import { isVNode as v, defineComponent as B, ref as g, useSlots as h, computed as b, createVNode as d, mergeProps as C, unref as u, Fragment as S, createBlock as _, openBlock as R, resolveDynamicComponent as w } from "vue";
2
2
  import { Input as T } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { omit as V } from "lodash-unified";
@@ -133,7 +133,7 @@ const K = /* @__PURE__ */ B({
133
133
  default: () => [o]
134
134
  }) : d(S, null, [n.prefix || ((e = o == null ? void 0 : o.prefix) == null ? void 0 : e.call(o)), u(r) || n.emptyText, n.suffix || ((t = o == null ? void 0 : o.suffix) == null ? void 0 : t.call(o))]);
135
135
  }
136
- return (e, t) => (_(), R(w(y())));
136
+ return (e, t) => (R(), _(w(y())));
137
137
  }
138
138
  });
139
139
  export {
@@ -1,4 +1,4 @@
1
- import { isVNode as x, defineComponent as h, ref as C, useSlots as g, unref as i, createVNode as o, mergeProps as w, Fragment as P, openBlock as U, createBlock as V, resolveDynamicComponent as _ } from "vue";
1
+ import { isVNode as x, defineComponent as h, ref as C, useSlots as g, unref as i, createVNode as o, mergeProps as w, Fragment as P, createBlock as U, openBlock as V, resolveDynamicComponent as _ } from "vue";
2
2
  import { Input as S, Space as T } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { omit as I } from "lodash-unified";
@@ -152,7 +152,7 @@ const G = /* @__PURE__ */ h({
152
152
  }, [n ? o(O, null, null) : o(j, null, null)])]
153
153
  })), p;
154
154
  }
155
- return (e, n) => (U(), V(_(B())));
155
+ return (e, n) => (V(), U(_(B())));
156
156
  }
157
157
  });
158
158
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, ref as y, computed as v, openBlock as r, createElementBlock as x, normalizeClass as B, unref as o, toDisplayString as h, createBlock as b, mergeProps as C } from "vue";
1
+ import { defineComponent as f, ref as y, computed as v, createElementBlock as x, createBlock as B, openBlock as r, normalizeClass as h, unref as o, toDisplayString as b, mergeProps as C } from "vue";
2
2
  import { isNil as z, omit as A } from "lodash-unified";
3
3
  import "../../hooks/index.mjs";
4
4
  import "../../config-provider/index.mjs";
@@ -76,8 +76,8 @@ const S = /* @__PURE__ */ f({
76
76
  })
77
77
  }), (e, n) => e.mode === "read" ? (r(), x("span", {
78
78
  key: 0,
79
- class: B(o(m)())
80
- }, h(o(z)(o(a)) || o(a) === "" ? e.emptyText : o(a)), 3)) : (r(), b(o(g).TextArea, C({ key: 1 }, o(A)(l, ["onUpdate:value", "value"]), {
79
+ class: h(o(m)())
80
+ }, b(o(z)(o(a)) || o(a) === "" ? e.emptyText : o(a)), 3)) : (r(), B(o(g).TextArea, C({ key: 1 }, o(A)(l, ["onUpdate:value", "value"]), {
81
81
  ref_key: "textAreaRef",
82
82
  ref: t,
83
83
  placeholder: o(c),
@@ -1,4 +1,4 @@
1
- import { defineComponent as J, ref as O, reactive as Q, unref as h, nextTick as X, toRaw as j, watch as Y, onWatcherCleanup as Z, computed as ee, openBlock as te, createBlock as re, mergeProps as le, withCtx as oe, renderSlot as ie } from "vue";
1
+ import { defineComponent as J, reactive as Q, ref as O, unref as h, nextTick as X, toRaw as j, watch as Y, onWatcherCleanup as Z, computed as ee, createBlock as te, openBlock as re, mergeProps as le, withCtx as oe, renderSlot as ie } from "vue";
2
2
  import { Form as ne } from "@aplus-frontend/antdv";
3
3
  import { useProvideForm as se } from "./context.mjs";
4
4
  import { isArray as f, cloneDeep as ae, isFunction as R, isPlainObject as _, omit as ue } from "lodash-unified";
@@ -220,7 +220,7 @@ const Re = /* @__PURE__ */ J({
220
220
  registerField: b,
221
221
  setFieldValue: P
222
222
  }
223
- }), A(w), (e, t) => (te(), re(h(ne), le({
223
+ }), A(w), (e, t) => (re(), te(h(ne), le({
224
224
  ref_key: "formRef",
225
225
  ref: a
226
226
  }, h(ue)(o, ["initialValues", "onValuesChange", "onFinish"]), {
@@ -1,4 +1,4 @@
1
- import { isVNode as K, defineComponent as Q, useSlots as Y, ref as v, computed as w, unref as l, watch as P, cloneVNode as Z, createVNode as d, mergeProps as b, openBlock as y, createElementBlock as N, Fragment as ee, withCtx as g, renderSlot as M, createTextVNode as te, toDisplayString as ie, createBlock as S, resolveDynamicComponent as _, normalizeClass as ne, withModifiers as oe, createCommentVNode as L } from "vue";
1
+ import { isVNode as K, defineComponent as Q, useSlots as Y, ref as v, computed as w, unref as l, watch as P, cloneVNode as Z, createVNode as d, mergeProps as b, createElementBlock as N, openBlock as y, Fragment as ee, createBlock as M, createCommentVNode as S, withCtx as g, renderSlot as _, withModifiers as te, normalizeClass as ie, resolveDynamicComponent as L, createTextVNode as ne, toDisplayString as oe } from "vue";
2
2
  import { Button as V, Flex as le, Space as ae, Drawer as se } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
@@ -274,23 +274,23 @@ const je = /* @__PURE__ */ Q({
274
274
  "onUpdate:open": H,
275
275
  onCancel: R
276
276
  }), {
277
- title: g(() => [M(e.$slots, "title", {}, () => [te(ie(n.title), 1)])]),
278
- footer: g(() => [(y(), S(_(I.value)))]),
277
+ title: g(() => [_(e.$slots, "title", {}, () => [ne(oe(n.title), 1)])]),
278
+ footer: g(() => [(y(), M(L(I.value)))]),
279
279
  default: g(() => [d(ve, b({
280
280
  ref_key: "formRef",
281
281
  ref: a
282
282
  }, l(ce)(n, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
283
- default: g(() => [M(e.$slots, "default")]),
283
+ default: g(() => [_(e.$slots, "default")]),
284
284
  _: 3
285
285
  }, 16), e.resize ? (y(), N("div", {
286
286
  key: 0,
287
- class: ne(q.value),
288
- onMousedown: oe(A, ["stop", "prevent"])
289
- }, null, 34)) : L("", !0)]),
287
+ class: ie(q.value),
288
+ onMousedown: te(A, ["stop", "prevent"])
289
+ }, null, 34)) : S("", !0)]),
290
290
  _: 3
291
- }, 16, ["open", "width"]), l(x) ? (y(), S(_(l(x)), {
291
+ }, 16, ["open", "width"]), l(x) ? (y(), M(L(l(x)), {
292
292
  key: 0
293
- })) : L("", !0)], 64));
293
+ })) : S("", !0)], 64));
294
294
  }
295
295
  });
296
296
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, useSlots as $, ref as d, onMounted as j, computed as F, unref as l, watch as q, cloneVNode as E, openBlock as g, createBlock as h, mergeProps as K, createSlots as O, withCtx as i, resolveDynamicComponent as Q, createCommentVNode as U, createElementVNode as G, normalizeClass as H, createVNode as p, normalizeStyle as J, renderList as M, renderSlot as W, normalizeProps as X, guardReactiveProps as Y } from "vue";
1
+ import { defineComponent as D, useSlots as $, ref as d, onMounted as j, computed as F, unref as l, watch as q, cloneVNode as E, createBlock as g, openBlock as h, mergeProps as K, createSlots as O, withCtx as i, createCommentVNode as Q, resolveDynamicComponent as U, renderList as G, createElementVNode as H, normalizeClass as J, createVNode as p, normalizeStyle as M, renderSlot as W, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
2
  import { Form as Z, Tooltip as ee, TypographyText as oe } from "@aplus-frontend/antdv";
3
3
  import { useToken as le } from "@aplus-frontend/antdv/es/theme/internal";
4
4
  import { isFunction as B, cloneDeep as te, isArray as ae, omit as C } from "lodash-unified";
@@ -124,7 +124,7 @@ const Ce = /* @__PURE__ */ D({
124
124
  clearValidate: A,
125
125
  resetField: L,
126
126
  getFieldValue: R
127
- }), (e, t) => (g(), h(l(Z).Item, K({
127
+ }), (e, t) => (h(), g(l(Z).Item, K({
128
128
  ref_key: "formItemRef",
129
129
  ref: n
130
130
  }, l(C)(o, [...l(re), "tooltip", "label"]), {
@@ -136,22 +136,22 @@ const Ce = /* @__PURE__ */ D({
136
136
  colon: e.bordered ? !1 : o.colon
137
137
  }), O({
138
138
  default: i(() => [
139
- V.value ? (g(), h(Q(V.value), { key: 0 })) : U("", !0)
139
+ V.value ? (h(), g(U(V.value), { key: 0 })) : Q("", !0)
140
140
  ]),
141
141
  _: 2
142
142
  }, [
143
143
  o.tooltip ? {
144
144
  name: "tooltip",
145
145
  fn: i(({ class: a }) => [
146
- G("span", {
147
- class: H(a)
146
+ H("span", {
147
+ class: J(a)
148
148
  }, [
149
149
  p(l(ee), {
150
150
  title: o.tooltip
151
151
  }, {
152
152
  default: i(() => [
153
153
  p(l(ne), {
154
- style: J({ color: l(x).colorPrimary })
154
+ style: M({ color: l(x).colorPrimary })
155
155
  }, null, 8, ["style"])
156
156
  ]),
157
157
  _: 1
@@ -171,7 +171,7 @@ const Ce = /* @__PURE__ */ D({
171
171
  ]),
172
172
  key: "1"
173
173
  } : void 0,
174
- M(l(C)(r, "default"), (a, b) => ({
174
+ G(l(C)(r, "default"), (a, b) => ({
175
175
  name: b,
176
176
  fn: i((_) => [
177
177
  W(e.$slots, b, X(Y(_ || {})))
@@ -1,4 +1,4 @@
1
- import { isVNode as C, defineComponent as h, useSlots as w, onBeforeUpdate as k, watch as _, shallowRef as B, computed as P, unref as r, createVNode as R, mergeProps as u, openBlock as s, createBlock as d, withCtx as S, createElementBlock as b, Fragment as x, renderList as N, resolveDynamicComponent as j } from "vue";
1
+ import { isVNode as C, defineComponent as h, useSlots as w, onBeforeUpdate as k, shallowRef as _, watch as B, computed as P, unref as r, createVNode as R, mergeProps as u, createBlock as d, openBlock as s, withCtx as S, createElementBlock as b, Fragment as x, renderList as N, resolveDynamicComponent as j } from "vue";
2
2
  import { Col as v, Row as F } from "@aplus-frontend/antdv";
3
3
  import { pick as D, isBoolean as I, omit as O } from "lodash-unified";
4
4
  import { apFormItemColPropKeys as V } from "../constant.mjs";
@@ -33,10 +33,10 @@ const T = /* @__PURE__ */ h({
33
33
  } = G("ap-form-item-group"), i = t, a = w();
34
34
  k(() => {
35
35
  p.value = l(a.default());
36
- }), _(() => a.default(), (o) => {
36
+ }), B(() => a.default(), (o) => {
37
37
  p.value = l(o);
38
38
  });
39
- const p = B(l(a.default())), f = P(() => r(p).map((o, m) => {
39
+ const p = _(l(a.default())), f = P(() => r(p).map((o, m) => {
40
40
  const e = o.props, n = D(e, V), g = n != null && n.span ? {} : $(i.countPerRow), y = I(e.hidden) ? !!e.hidden : E(e.hidden);
41
41
  return {
42
42
  key: `${m}-${A(e.name)}`,
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, useSlots as m, openBlock as u, createBlock as c, normalizeProps as a, guardReactiveProps as t, unref as o, createSlots as b, withCtx as r, createVNode as B, mergeProps as _, renderList as v, renderSlot as x } from "vue";
1
+ import { defineComponent as f, useSlots as m, createBlock as u, openBlock as c, normalizeProps as a, guardReactiveProps as t, unref as o, createSlots as b, withCtx as r, createVNode as B, mergeProps as _, renderList as v, renderSlot as x } from "vue";
2
2
  import "../../item/index.vue2.mjs";
3
3
  import "../../../ap-field/index.mjs";
4
4
  import { omit as i } from "lodash-unified";
@@ -51,7 +51,7 @@ const w = /* @__PURE__ */ f({
51
51
  },
52
52
  setup(d) {
53
53
  const s = d, n = m();
54
- return (e, h) => (u(), c(y, a(t(o(i)(s, ["field", "disabled"]))), b({
54
+ return (e, h) => (c(), u(y, a(t(o(i)(s, ["field", "disabled"]))), b({
55
55
  default: r(() => [
56
56
  B(o(g), _({ disabled: e.disabled }, e.field), null, 16, ["disabled"])
57
57
  ]),
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, useSlots as B, computed as v, openBlock as y, createBlock as x, normalizeProps as r, guardReactiveProps as t, unref as a, createSlots as s, withCtx as i, createVNode as g, renderList as p, renderSlot as f } from "vue";
1
+ import { defineComponent as h, useSlots as B, computed as v, createBlock as y, openBlock as x, normalizeProps as r, guardReactiveProps as t, unref as a, createSlots as s, withCtx as i, createVNode as g, renderList as p, renderSlot as f } from "vue";
2
2
  import "../../item/index.vue2.mjs";
3
3
  import "../../../ap-field/date/index.vue2.mjs";
4
4
  import { isUndefined as F, omit as m, pick as S } from "lodash-unified";
@@ -62,7 +62,7 @@ const L = /* @__PURE__ */ h({
62
62
  bordered: e.bordered ? !1 : F((o = e.field) == null ? void 0 : o.bordered) ? !0 : e.field.bordered
63
63
  };
64
64
  });
65
- return (o, P) => (y(), x(k, r(t(a(m)(e, ["field", "placeholder", "disabled"]))), s({
65
+ return (o, P) => (x(), y(k, r(t(a(m)(e, ["field", "placeholder", "disabled"]))), s({
66
66
  default: i(() => [
67
67
  g(C, r(t(b.value)), s({ _: 2 }, [
68
68
  p(a(m)(n, a(u)), (_, l) => ({
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, useSlots as g, computed as v, openBlock as y, createBlock as x, normalizeProps as r, guardReactiveProps as t, unref as o, createSlots as p, withCtx as i, createVNode as F, renderList as f, renderSlot as m } from "vue";
1
+ import { defineComponent as B, useSlots as g, computed as v, createBlock as y, openBlock as x, normalizeProps as r, guardReactiveProps as t, unref as o, createSlots as p, withCtx as i, createVNode as F, renderList as f, renderSlot as m } from "vue";
2
2
  import "../../item/index.vue2.mjs";
3
3
  import "../../../ap-field/index.mjs";
4
4
  import { isUndefined as S, omit as u, pick as k } from "lodash-unified";
@@ -62,7 +62,7 @@ const I = /* @__PURE__ */ B({
62
62
  bordered: e.bordered ? !1 : S((l = e.field) == null ? void 0 : l.bordered) ? !0 : (d = e.field) == null ? void 0 : d.bordered
63
63
  };
64
64
  });
65
- return (l, d) => (y(), x(C, r(t(o(u)(e, ["field", "placeholder", "disabled"]))), p({
65
+ return (l, d) => (x(), y(C, r(t(o(u)(e, ["field", "placeholder", "disabled"]))), p({
66
66
  default: i(() => [
67
67
  F(o(P), r(t(_.value)), p({ _: 2 }, [
68
68
  f(o(u)(s, o(c)), (h, a) => ({
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, useSlots as B, ref as _, openBlock as g, createBlock as x, normalizeProps as t, guardReactiveProps as s, unref as l, createSlots as d, withCtx as n, createVNode as k, mergeProps as N, renderList as i, renderSlot as u } from "vue";
1
+ import { defineComponent as y, useSlots as B, ref as _, createBlock as g, openBlock as x, normalizeProps as t, guardReactiveProps as s, unref as l, createSlots as d, withCtx as n, createVNode as k, mergeProps as N, renderList as i, renderSlot as u } from "vue";
2
2
  import "../../item/index.vue2.mjs";
3
3
  import "../../../ap-field/number/index.vue2.mjs";
4
4
  import { omit as f, pick as S } from "lodash-unified";
@@ -63,7 +63,7 @@ const T = /* @__PURE__ */ y({
63
63
  var e;
64
64
  (e = a.value) == null || e.blur();
65
65
  }
66
- }), (e, R) => (g(), x(C, t(s(l(f)(h, ["field", "placeholder", "disabled"]))), d({
66
+ }), (e, R) => (x(), g(C, t(s(l(f)(h, ["field", "placeholder", "disabled"]))), d({
67
67
  default: n(() => [
68
68
  k(F, N({
69
69
  ref_key: "inputNumberRef",
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, useSlots as m, ref as c, openBlock as b, createBlock as v, normalizeProps as a, guardReactiveProps as t, unref as r, createSlots as _, withCtx as s, createVNode as y, mergeProps as B, renderList as x, renderSlot as g } from "vue";
1
+ import { defineComponent as u, useSlots as m, ref as c, createBlock as b, openBlock as v, normalizeProps as a, guardReactiveProps as t, unref as r, createSlots as _, withCtx as s, createVNode as y, mergeProps as B, renderList as x, renderSlot as g } from "vue";
2
2
  import "../../item/index.vue2.mjs";
3
3
  import "../../../ap-field/index.mjs";
4
4
  import { omit as h } from "lodash-unified";
@@ -60,7 +60,7 @@ const q = /* @__PURE__ */ u({
60
60
  var e;
61
61
  (e = o.value) == null || e.blur();
62
62
  }
63
- }), (e, P) => (b(), v(k, a(t(r(h)(n, ["field", "disabled"]))), _({
63
+ }), (e, P) => (v(), b(k, a(t(r(h)(n, ["field", "disabled"]))), _({
64
64
  default: s(() => [
65
65
  y(r(C), B({
66
66
  ref_key: "radioRef",