@aplus-frontend/ui 7.17.1 → 7.17.2

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 (37) hide show
  1. package/es/index.mjs +29 -31
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +48 -48
  3. package/es/src/ap-field/cascader/index.vue.mjs +64 -67
  4. package/es/src/ap-field/interface.d.ts +6 -1
  5. package/es/src/ap-field/select/index.vue.d.ts +1 -1
  6. package/es/src/ap-field/select/index.vue.mjs +145 -134
  7. package/es/src/ap-field/select/read.vue2.mjs +1 -0
  8. package/es/src/ap-form/interface.d.ts +18 -0
  9. package/es/src/ap-form/items/select/index.vue.d.ts +8 -6
  10. package/es/src/ap-form/items/switch/index.vue.d.ts +1 -1
  11. package/es/src/ap-table/constants.d.ts +7 -6
  12. package/es/src/check-card/index.vue2.mjs +61 -64
  13. package/es/src/hooks/index.d.ts +0 -1
  14. package/es/src/hooks/index.mjs +10 -12
  15. package/es/src/version.d.ts +1 -1
  16. package/es/src/version.mjs +1 -1
  17. package/lib/index.js +1 -1
  18. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  19. package/lib/src/ap-field/cascader/index.vue.js +1 -1
  20. package/lib/src/ap-field/interface.d.ts +6 -1
  21. package/lib/src/ap-field/select/index.vue.d.ts +1 -1
  22. package/lib/src/ap-field/select/index.vue.js +1 -1
  23. package/lib/src/ap-field/select/read.vue2.js +1 -1
  24. package/lib/src/ap-form/interface.d.ts +18 -0
  25. package/lib/src/ap-form/items/select/index.vue.d.ts +8 -6
  26. package/lib/src/ap-form/items/switch/index.vue.d.ts +1 -1
  27. package/lib/src/ap-table/constants.d.ts +7 -6
  28. package/lib/src/check-card/index.vue2.js +1 -1
  29. package/lib/src/hooks/index.d.ts +0 -1
  30. package/lib/src/hooks/index.js +1 -1
  31. package/lib/src/version.d.ts +1 -1
  32. package/lib/src/version.js +1 -1
  33. package/package.json +1 -1
  34. package/es/src/hooks/useMessage.d.ts +0 -62
  35. package/es/src/hooks/useMessage.mjs +0 -86
  36. package/lib/src/hooks/useMessage.d.ts +0 -62
  37. package/lib/src/hooks/useMessage.js +0 -1
package/es/index.mjs CHANGED
@@ -6,8 +6,8 @@ import { DEFAULT_NAMESPACE as A, DEFAULT_UIMODE as i, configProviderContextKey a
6
6
  import { keysOf as F, provideGlobalConfig as g, useGlobalConfig as I } from "./src/config-provider/hooks/use-global-config.mjs";
7
7
  import { buildLocaleContext as T, buildTranslator as b, localeContextKey as C, translate as G, useLocale as D } from "./src/config-provider/hooks/use-locale.mjs";
8
8
  import { defaultNamespace as P, namespaceContextKey as E, useGetDerivedNamespace as L, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
9
- import { ConfigProvider as N, globalConfigCached as M } from "./src/config-provider/config-provider.mjs";
10
- import { APConfigProvider as y } from "./src/config-provider/index.mjs";
9
+ import { ConfigProvider as N, globalConfigCached as w } from "./src/config-provider/config-provider.mjs";
10
+ import { APConfigProvider as M } from "./src/config-provider/index.mjs";
11
11
  import { ApFormItemText as k } from "./src/ap-form/items/text/index.mjs";
12
12
  import { default as U } from "./src/ap-form/items/text-area/index.vue.mjs";
13
13
  import { default as V } from "./src/ap-form/items/number/index.vue.mjs";
@@ -33,7 +33,7 @@ import { default as De } from "./src/ap-form/render/control.vue.mjs";
33
33
  import { default as Pe } from "./src/ap-form/render/item.vue.mjs";
34
34
  import { default as Le } from "./src/ap-form/provider/index.vue.mjs";
35
35
  import { ApField as ve, ApFieldRead as Ne } from "./src/ap-field/index.mjs";
36
- import { ApFieldText as we } from "./src/ap-field/text/index.mjs";
36
+ import { ApFieldText as ye } from "./src/ap-field/text/index.mjs";
37
37
  import { default as Be } from "./src/ap-field/checkbox/index.vue.mjs";
38
38
  import { default as Ke } from "./src/ap-field/date/index.vue.mjs";
39
39
  import { default as Oe } from "./src/ap-field/number/index.vue.mjs";
@@ -59,7 +59,7 @@ import { CheckCard as ho } from "./src/check-card/index.mjs";
59
59
  import { default as Eo } from "./src/check-card/group.vue.mjs";
60
60
  import { ApModal as Ro } from "./src/ap-modal/index.mjs";
61
61
  import { default as No } from "./src/ap-list/index.vue.mjs";
62
- import { default as wo } from "./src/ap-button/ap-button.vue.mjs";
62
+ import { default as yo } from "./src/ap-button/ap-button.vue.mjs";
63
63
  import { default as Bo } from "./src/ap-button/ap-action-button.vue.mjs";
64
64
  import { default as Ko } from "./src/ap-button/ap-confirm-button.vue.mjs";
65
65
  import { ApDrawer as Oo } from "./src/ap-drawer/index.mjs";
@@ -85,7 +85,7 @@ import { handleExportDownload as Dr } from "./src/business/ap-export-group/handl
85
85
  import { convertExportField as Pr } from "./src/business/ap-export-group/convertExportField.mjs";
86
86
  import { ApImage as Lr } from "./src/business/ap-image/index.mjs";
87
87
  import { ApInputRadio as vr } from "./src/business/ap-input-radio/index.mjs";
88
- import { ApLabel as Mr, ApLabelGroup as wr } from "./src/business/ap-label/index.mjs";
88
+ import { ApLabel as wr, ApLabelGroup as yr } from "./src/business/ap-label/index.mjs";
89
89
  import { locales as Br } from "./src/business/ap-ladder/interface.mjs";
90
90
  import { ApLadder as Kr } from "./src/business/ap-ladder/index.mjs";
91
91
  import { ApSelectLayout as Or } from "./src/business/ap-select-layout/index.mjs";
@@ -109,8 +109,8 @@ import { ApView as Gt } from "./src/business/ap-view/index.mjs";
109
109
  import { ApRadioGroup as ht } from "./src/business/ap-radio-group/index.mjs";
110
110
  import { ApKeepAliveProps as Et, forceStopTags as Lt } from "./src/business/ap-keep-alive/interface.mjs";
111
111
  import { ApKeepAlive as vt } from "./src/business/ap-keep-alive/index.mjs";
112
- import { LruCacher as Mt } from "./src/business/ap-keep-alive/cacher/lru-cacher.mjs";
113
- import { useApKeepAliveInject as yt } from "./src/business/ap-keep-alive/hook.mjs";
112
+ import { LruCacher as wt } from "./src/business/ap-keep-alive/cacher/lru-cacher.mjs";
113
+ import { useApKeepAliveInject as Mt } from "./src/business/ap-keep-alive/hook.mjs";
114
114
  import { matches as kt } from "./src/business/ap-keep-alive/utils.mjs";
115
115
  import { ApDraggableGrid as Ut } from "./src/business/ap-draggable-grid/index.mjs";
116
116
  import { ApValueSelectCard as Vt } from "./src/business/ap-value-select-card/index.mjs";
@@ -136,8 +136,8 @@ import { default as Dp } from "./src/scroll-bar/index.vue.mjs";
136
136
  import { default as Pp } from "./src/scroll-bar/internal.vue.mjs";
137
137
  import { default as Lp } from "./src/scroll-view/index.vue.mjs";
138
138
  import { default as vp } from "./src/portal/index.vue.mjs";
139
- import { default as Mp } from "./src/full-screen/index.vue.mjs";
140
- import { default as yp } from "./src/resize-observer/index.vue.mjs";
139
+ import { default as wp } from "./src/full-screen/index.vue.mjs";
140
+ import { default as Mp } from "./src/resize-observer/index.vue.mjs";
141
141
  import { ROW_SELECTION_FIELD as kp } from "./src/ap-grid/constants.mjs";
142
142
  import { toTreeArray as Up } from "./src/ap-grid/utils/to-tree-array.mjs";
143
143
  import { default as Vp } from "./src/ap-grid/index.vue.mjs";
@@ -151,12 +151,11 @@ import { default as oa } from "./src/ag-grid/index.vue.mjs";
151
151
  import { default as ta } from "./src/ag-grid/editable/index.vue.mjs";
152
152
  import { default as aa } from "./src/ag-grid/editable/form-item.vue.mjs";
153
153
  import { ApSkeleton as ma } from "./src/skeleton/index.mjs";
154
- import { useMessage as da } from "./src/hooks/useMessage.mjs";
155
- import { useControllableValue as sa } from "./src/hooks/useControllableValue.mjs";
156
- import { useManualRef as Aa } from "./src/hooks/useManualRef.mjs";
157
- import { useThrottleRef as na } from "./src/hooks/useThrottleRef.mjs";
158
- import { useFullScreen as Fa } from "./src/hooks/useFullScreen.mjs";
159
- import { useResize as Ia } from "./src/hooks/useResize.mjs";
154
+ import { useControllableValue as da } from "./src/hooks/useControllableValue.mjs";
155
+ import { useManualRef as sa } from "./src/hooks/useManualRef.mjs";
156
+ import { useThrottleRef as Aa } from "./src/hooks/useThrottleRef.mjs";
157
+ import { useFullScreen as na } from "./src/hooks/useFullScreen.mjs";
158
+ import { useResize as Fa } from "./src/hooks/useResize.mjs";
160
159
  const a = console.log;
161
160
  a(`UI version: ${p}`);
162
161
  const l = {
@@ -168,7 +167,7 @@ const l = {
168
167
  }
169
168
  };
170
169
  export {
171
- y as APConfigProvider,
170
+ M as APConfigProvider,
172
171
  oa as AgGrid,
173
172
  Bo as ApActionButton,
174
173
  Go as ApActionGroup,
@@ -180,7 +179,7 @@ export {
180
179
  dr as ApAttachment,
181
180
  sr as ApBatchAction,
182
181
  Ar as ApBatchActionGroup,
183
- wo as ApButton,
182
+ yo as ApButton,
184
183
  nr as ApButtonGroup,
185
184
  Fr as ApCard,
186
185
  Ko as ApConfirmButton,
@@ -208,7 +207,7 @@ export {
208
207
  Qe as ApFieldSelect,
209
208
  eo as ApFieldSlider,
210
209
  He as ApFieldSwitch,
211
- we as ApFieldText,
210
+ ye as ApFieldText,
212
211
  je as ApFieldTextArea,
213
212
  fo as ApFieldTreeSelect,
214
213
  sp as ApFilePreview,
@@ -243,8 +242,8 @@ export {
243
242
  vr as ApInputRadio,
244
243
  vt as ApKeepAlive,
245
244
  Et as ApKeepAliveProps,
246
- Mr as ApLabel,
247
- wr as ApLabelGroup,
245
+ wr as ApLabel,
246
+ yr as ApLabelGroup,
248
247
  Kr as ApLadder,
249
248
  No as ApList,
250
249
  Ro as ApModal,
@@ -285,17 +284,17 @@ export {
285
284
  $p as EditableGridFormItem,
286
285
  Ip as EditableTable,
287
286
  Tp as EditableTableFormItem,
288
- Mp as FullScreen,
287
+ wp as FullScreen,
289
288
  Zo as Highlight,
290
289
  Pp as InternalScrollBar,
291
290
  $o as LoadingBar,
292
- Mt as LruCacher,
291
+ wt as LruCacher,
293
292
  Xp as Mask,
294
293
  Zt as NeedNameKeyDefault,
295
294
  vp as Portal,
296
295
  kp as ROW_SELECTION_FIELD,
297
296
  Wo as Render,
298
- yp as ResizeObserver,
297
+ Mp as ResizeObserver,
299
298
  Dp as ScrollBar,
300
299
  Lp as ScrollView,
301
300
  Zp as Splitter,
@@ -316,7 +315,7 @@ export {
316
315
  ot as formatDataIndex,
317
316
  rt as formatNumber,
318
317
  mp as formatString,
319
- M as globalConfigCached,
318
+ w as globalConfigCached,
320
319
  Dr as handleExportDownload,
321
320
  kt as isNameMatches,
322
321
  F as keysOf,
@@ -328,22 +327,21 @@ export {
328
327
  G as translate,
329
328
  _t as useAgGridModal,
330
329
  $t as useAgGridSelectModal,
331
- yt as useApKeepAliveInject,
332
- sa as useControllableValue,
333
- Fa as useFullScreen,
330
+ Mt as useApKeepAliveInject,
331
+ da as useControllableValue,
332
+ na as useFullScreen,
334
333
  L as useGetDerivedNamespace,
335
334
  I as useGlobalConfig,
336
335
  D as useLocale,
337
- Aa as useManualRef,
338
- da as useMessage,
336
+ sa as useManualRef,
339
337
  R as useNamespace,
340
338
  Xr as usePageListAgGrid,
341
339
  Jr as usePageListApGrid,
342
340
  Wr as usePageListApTable,
343
- Ia as useResize,
341
+ Fa as useResize,
344
342
  ar as useTableModal,
345
343
  Ap as useTablePaging,
346
344
  mr as useTableSelectModal,
347
- na as useThrottleRef,
345
+ Aa as useThrottleRef,
348
346
  Xo as useTimeAgo
349
347
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as A, useSlots as L, ref as y, onMounted as P, watch as G, createElementBlock as W, openBlock as U, Fragment as $, createVNode as p, unref as l, withCtx as g, mergeProps as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
1
+ import { defineComponent as L, useSlots as P, ref as y, onMounted as G, watch as W, createElementBlock as U, openBlock as $, Fragment as q, createVNode as p, unref as l, mergeProps as g, withCtx as h, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
2
2
  import { cloneDeep as u, isEqual as ee, omit as oe } from "lodash-unified";
3
- import { ApForm as h } from "../../ap-form/index.mjs";
3
+ import { ApForm as C } from "../../ap-form/index.mjs";
4
4
  import { useInjectForm as te } from "../../ap-form/context.mjs";
5
5
  import { useWatch as ae } from "../../ap-form/hooks/use-watch.mjs";
6
6
  import { getModelValue as ne } from "../../ap-form/utils/get.mjs";
@@ -11,11 +11,11 @@ import { useEditableFormItemApi as se } from "../hooks/use-editable-form-item-ap
11
11
  import "../index.vue2.mjs";
12
12
  import ie from "../style/editable.mjs";
13
13
  import { getShadowName as me } from "../utils.mjs";
14
- import { getColumnTransformOptions as ue, arrayToObject as C } from "./utils.mjs";
14
+ import { getColumnTransformOptions as ue, arrayToObject as b } from "./utils.mjs";
15
15
  import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
16
16
  import { useGlobalConfig as pe } from "../../config-provider/hooks/use-global-config.mjs";
17
17
  import fe from "../index.vue.mjs";
18
- const _e = /* @__PURE__ */ A({
18
+ const Ne = /* @__PURE__ */ L({
19
19
  name: "EditableGrid",
20
20
  __name: "form-item",
21
21
  props: {
@@ -137,15 +137,15 @@ const _e = /* @__PURE__ */ A({
137
137
  name: {},
138
138
  formItem: {}
139
139
  },
140
- setup(b, {
141
- expose: R
140
+ setup(R, {
141
+ expose: B
142
142
  }) {
143
- const B = L(), o = b, {
144
- b: v
145
- } = de("editable-aggrid"), x = ie("editable-aggrid"), r = y(), {
143
+ const v = P(), o = R, {
144
+ b: x
145
+ } = de("editable-aggrid"), I = ie("editable-aggrid"), r = y(), {
146
146
  internalInstance: s
147
147
  } = te();
148
- function I(e) {
148
+ function S(e) {
149
149
  const t = ue(o.columns || []);
150
150
  if (!Object.keys(t).length || !e?.length)
151
151
  return e;
@@ -156,31 +156,31 @@ const _e = /* @__PURE__ */ A({
156
156
  }
157
157
  const i = me(o.name);
158
158
  let f = [];
159
- P(() => {
159
+ G(() => {
160
160
  const e = o.formItem?.initialValue ?? ne(s?.getInitialValues() ?? {}, o.name);
161
- e && (s?.updateInitialModel(i, C(u(e), o.rowKey)), f = u(e), n.value || _(u(e), "suffix", !0));
161
+ e && (s?.updateInitialModel(i, b(u(e), o.rowKey)), f = u(e), n.value || _(u(e), "suffix", !0));
162
162
  });
163
- const n = y([]), S = ae(o.name);
164
- G(() => S.value, (e) => {
163
+ const n = y([]), T = ae(o.name);
164
+ W(() => T.value, (e) => {
165
165
  ee(e, n.value) || c(e ?? u(f));
166
166
  }, {
167
167
  deep: !0,
168
168
  flush: "post",
169
169
  immediate: !0
170
170
  });
171
- const T = pe("valueTypeMap"), E = re(o, T, i), {
172
- add: F,
173
- addMultiple: V,
171
+ const E = pe("valueTypeMap"), F = re(o, E, i), {
172
+ add: V,
173
+ addMultiple: N,
174
174
  __addMultiple: _,
175
- remove: N,
176
- removeByKey: j,
177
- getRowData: k,
178
- getRowsData: D,
179
- setRowData: O,
180
- clear: z,
175
+ remove: j,
176
+ removeByKey: k,
177
+ getRowData: D,
178
+ getRowsData: O,
179
+ setRowData: z,
180
+ clear: H,
181
181
  refreshRowIds: d
182
182
  } = se(o, s, n, i);
183
- function H() {
183
+ function K() {
184
184
  const e = r.value?._internalGridApi;
185
185
  if (!d.value?.length || !e)
186
186
  return;
@@ -192,57 +192,57 @@ const _e = /* @__PURE__ */ A({
192
192
  }
193
193
  function c(e) {
194
194
  n.value = [...e];
195
- const t = C(e, o.rowKey);
195
+ const t = b(e, o.rowKey);
196
196
  s?.setFieldValue(o.name, [...e]), s?.setFieldValue(i, t);
197
197
  }
198
198
  function w(e, t) {
199
199
  const a = e === "end" ? n.value.length - 1 : e;
200
200
  r.value?.scrollToRow(a, t);
201
201
  }
202
- function K(e, t) {
202
+ function M(e, t) {
203
203
  r.value?.scrollToColumn(e, t);
204
204
  }
205
- return R({
206
- add: F,
207
- addMultiple: V,
208
- remove: N,
209
- removeByKey: j,
210
- getRowData: k,
211
- getRowsData: D,
212
- setRowData: O,
213
- clear: z,
205
+ return B({
206
+ add: V,
207
+ addMultiple: N,
208
+ remove: j,
209
+ removeByKey: k,
210
+ getRowData: D,
211
+ getRowsData: O,
212
+ setRowData: z,
213
+ clear: H,
214
214
  setTableData: c,
215
215
  scrollTo: w,
216
216
  scrollToRow: w,
217
- scrollToColumn: K,
217
+ scrollToColumn: M,
218
218
  table: r
219
- }), (e, t) => (U(), W($, null, [p(l(h).FormItem, {
219
+ }), (e, t) => ($(), U(q, null, [p(l(C).FormItem, {
220
220
  hidden: "",
221
221
  name: e.name,
222
222
  "initial-value": e.formItem?.initialValue,
223
- transform: I
224
- }, null, 8, ["name", "initial-value"]), p(l(h).FormItem, {
223
+ transform: S
224
+ }, null, 8, ["name", "initial-value"]), p(l(C).FormItem, g({
225
225
  label: e.label
226
- }, {
227
- default: g(() => [p(fe, q(l(oe)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
226
+ }, e.formItem), {
227
+ default: h(() => [p(fe, g(l(oe)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
228
228
  ref_key: "tableRef",
229
229
  ref: r,
230
- class: [l(v)(), l(x)],
230
+ class: [l(x)(), l(I)],
231
231
  size: "mini",
232
- columns: l(E),
232
+ columns: l(F),
233
233
  "data-source": n.value,
234
234
  "search-form": !1,
235
- onUpdate: H
235
+ onUpdate: K
236
236
  }), J({
237
237
  _: 2
238
- }, [Q(B, (a, m) => ({
238
+ }, [Q(v, (a, m) => ({
239
239
  name: m,
240
- fn: g((M) => [X(e.$slots, m, Y(Z(M || {})))])
240
+ fn: h((A) => [X(e.$slots, m, Y(Z(A || {})))])
241
241
  }))]), 1040, ["class", "columns", "data-source"])]),
242
242
  _: 3
243
- }, 8, ["label"])], 64));
243
+ }, 16, ["label"])], 64));
244
244
  }
245
245
  });
246
246
  export {
247
- _e as default
247
+ Ne as default
248
248
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as A, computed as w, useSlots as L, ref as O, unref as e, resolveComponent as U, createElementBlock as d, createBlock as B, openBlock as l, Fragment as S, toDisplayString as x, withCtx as f, renderList as N, mergeProps as E, createSlots as K, renderSlot as j, normalizeProps as q, guardReactiveProps as G, createVNode as W } from "vue";
2
- import { Space as $, Cascader as H } from "@aplus-frontend/antdv";
1
+ import { defineComponent as A, computed as b, useSlots as L, ref as O, unref as e, createElementBlock as u, createBlock as w, openBlock as l, Fragment as B, toDisplayString as x, withCtx as m, renderList as S, mergeProps as U, createSlots as E, renderSlot as K, normalizeProps as j, guardReactiveProps as q, createVNode as G } from "vue";
2
+ import { Space as W, Cascader as $, Spin as H } from "@aplus-frontend/antdv";
3
3
  import { omit as J, isArray as Q } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
5
  import { useDefaultPlaceholder as X } from "../hooks/use-default-placeholder.mjs";
6
6
  import { useOptions as Y } from "./use-options.mjs";
7
7
  import { useControllableValue as Z } from "../../hooks/useControllableValue.mjs";
8
- const ee = { key: 0 }, de = /* @__PURE__ */ A({
8
+ const ee = { key: 0 }, pe = /* @__PURE__ */ A({
9
9
  name: "ApFieldCascader",
10
10
  __name: "index",
11
11
  props: {
@@ -94,79 +94,76 @@ const ee = { key: 0 }, de = /* @__PURE__ */ A({
94
94
  loadData: { type: Boolean }
95
95
  },
96
96
  emits: ["update:value"],
97
- setup(k, { expose: P, emit: T }) {
98
- const a = k, _ = w(
99
- () => J(a, ["onUpdate:value", "value", "options", "loadData"])
100
- ), I = L(), V = T, u = O(), { value: h, updateValue: D } = Z(a, V), R = X("Cascader", a), { options: g, request: y, loading: v } = Y(a), C = w(() => {
101
- const o = e(h);
97
+ setup(N, { expose: k, emit: P }) {
98
+ const n = N, T = b(
99
+ () => J(n, ["onUpdate:value", "value", "options", "loadData"])
100
+ ), I = L(), V = P, i = O(), { value: f, updateValue: D } = Z(n, V), R = X("Cascader", n), { options: h, request: g, loading: y } = Y(n), v = b(() => {
101
+ const o = e(f);
102
102
  if (!o?.length) return [];
103
- const b = a.fieldNames?.label || "label", i = a.fieldNames?.value || "value";
104
- function r(m, t) {
105
- const s = [];
106
- for (const p of m || []) {
103
+ const C = n.fieldNames?.label || "label", s = n.fieldNames?.value || "value";
104
+ function a(c, t) {
105
+ const r = [];
106
+ for (const p of c || []) {
107
107
  if (t.find(
108
- (M) => M === p[i]
109
- ) && s.push(p[b]), s.length === t.length)
110
- return s;
111
- p.children?.length && s.push(...r(p.children, t));
108
+ (M) => M === p[s]
109
+ ) && r.push(p[C]), r.length === t.length)
110
+ return r;
111
+ p.children?.length && r.push(...a(p.children, t));
112
112
  }
113
- return s;
113
+ return r;
114
114
  }
115
- const n = [], c = Q(o[0]) ? o : [o];
116
- for (const m of c) {
117
- const t = r(g.value, m);
118
- t.length && n.push(t);
115
+ const d = [], F = Q(o[0]) ? o : [o];
116
+ for (const c of F) {
117
+ const t = a(h.value, c);
118
+ t.length && d.push(t);
119
119
  }
120
- return n;
120
+ return d;
121
121
  });
122
- function z() {
123
- u.value?.focus?.();
122
+ function _() {
123
+ i.value?.focus?.();
124
124
  }
125
- function F() {
126
- u.value?.blur?.();
125
+ function z() {
126
+ i.value?.blur?.();
127
127
  }
128
- return P({
129
- focus: z,
130
- blur: F,
131
- request: y
132
- }), (o, b) => {
133
- const i = U("Spin");
134
- return o.mode === "read" ? (l(), d(S, { key: 0 }, [
135
- C.value.length ? (l(), B(e($), {
136
- key: 1,
137
- size: 4
138
- }, {
139
- default: f(() => [
140
- (l(!0), d(S, null, N(C.value, (r, n) => (l(), d("span", { key: n }, x(r.join(", ")), 1))), 128))
141
- ]),
142
- _: 1
143
- })) : (l(), d("span", ee, x(o.emptyText), 1))
144
- ], 64)) : (l(), B(e(H), E({ key: 1 }, _.value, {
145
- ref: u.value,
146
- value: e(h),
147
- loading: e(v),
148
- options: e(g),
149
- placeholder: e(R),
150
- "load-data": o.loadData ? e(y) : void 0,
151
- "onUpdate:value": e(D)
152
- }), K({ _: 2 }, [
153
- N(I, (r, n) => ({
154
- name: n,
155
- fn: f((c) => [
156
- j(o.$slots, n, q(G(c || {})))
157
- ])
158
- })),
159
- e(v) ? {
160
- name: "notFoundContent",
161
- fn: f(() => [
162
- W(i, { size: "small" })
163
- ]),
164
- key: "0"
165
- } : void 0
166
- ]), 1040, ["value", "loading", "options", "placeholder", "load-data", "onUpdate:value"]));
167
- };
128
+ return k({
129
+ focus: _,
130
+ blur: z,
131
+ request: g
132
+ }), (o, C) => o.mode === "read" ? (l(), u(B, { key: 0 }, [
133
+ v.value.length ? (l(), w(e(W), {
134
+ key: 1,
135
+ size: 4
136
+ }, {
137
+ default: m(() => [
138
+ (l(!0), u(B, null, S(v.value, (s, a) => (l(), u("span", { key: a }, x(s.join(", ")), 1))), 128))
139
+ ]),
140
+ _: 1
141
+ })) : (l(), u("span", ee, x(o.emptyText), 1))
142
+ ], 64)) : (l(), w(e($), U({ key: 1 }, T.value, {
143
+ ref: i.value,
144
+ value: e(f),
145
+ loading: e(y),
146
+ options: e(h),
147
+ placeholder: e(R),
148
+ "load-data": o.loadData ? e(g) : void 0,
149
+ "onUpdate:value": e(D)
150
+ }), E({ _: 2 }, [
151
+ S(I, (s, a) => ({
152
+ name: a,
153
+ fn: m((d) => [
154
+ K(o.$slots, a, j(q(d || {})))
155
+ ])
156
+ })),
157
+ e(y) ? {
158
+ name: "notFoundContent",
159
+ fn: m(() => [
160
+ G(e(H), { size: "small" })
161
+ ]),
162
+ key: "0"
163
+ } : void 0
164
+ ]), 1040, ["value", "loading", "options", "placeholder", "load-data", "onUpdate:value"]));
168
165
  }
169
166
  });
170
167
  export {
171
- de as default
168
+ pe as default
172
169
  };
@@ -203,10 +203,15 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
203
203
  * @since 7.15.0
204
204
  */
205
205
  fetchOnFocus?: boolean;
206
+ /**
207
+ * 是否在打开选项列表时请求列表数据
208
+ * @since 7.17.2
209
+ */
210
+ fetchOnOpen?: boolean;
206
211
  /**
207
212
  * 是否延迟请求选项列表 true: 不请求选项; 'first-focus': 首次聚焦时触发网络请求
208
213
  */
209
- lazy?: boolean | 'first-focus';
214
+ lazy?: boolean | 'first-focus' | 'first-open';
210
215
  /**
211
216
  * 添加一个名为全部的节点(只在多选的情况下有效)
212
217
  */
@@ -468,7 +468,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
468
468
  disabled: boolean;
469
469
  virtual: boolean;
470
470
  autofocus: boolean;
471
- lazy: boolean | "first-focus";
471
+ lazy: boolean | "first-focus" | "first-open";
472
472
  loading: boolean;
473
473
  bordered: boolean;
474
474
  allowClear: boolean;