@aplus-frontend/ui 0.1.3 → 0.1.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 (47) hide show
  1. package/es/index.mjs +60 -59
  2. package/es/src/ap-action/style/item-dropdown.css +1 -0
  3. package/es/src/ap-download/interface.d.ts +4 -1
  4. package/es/src/ap-field/interface.d.ts +4 -0
  5. package/es/src/ap-field/select/index.vue.mjs +56 -51
  6. package/es/src/ap-field/text/index.vue.d.ts +5 -5
  7. package/es/src/ap-modal/type.d.ts +2 -2
  8. package/es/src/ap-modal/utils/createModal.mjs +35 -27
  9. package/es/src/ap-table/constants.d.ts +22 -10
  10. package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +32 -0
  11. package/es/src/business/ap-batch-action/ApBatchAction.vue.mjs +4 -0
  12. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +46 -0
  13. package/es/src/business/ap-batch-action/index.css +24 -0
  14. package/es/src/business/ap-batch-action/interface.d.ts +0 -0
  15. package/es/src/business/index.d.ts +46 -0
  16. package/es/src/business/index.mjs +14 -11
  17. package/es/src/editable-table/utils.mjs +1 -1
  18. package/es/src/index.mjs +176 -175
  19. package/es/src/locale/lang/en.mjs +5 -0
  20. package/es/src/locale/lang/zh-cn.mjs +5 -0
  21. package/es/src/theme/ap-action/item-dropdown.css +1 -0
  22. package/es/src/theme/ap-batch-action/ap-batch-action.css +24 -0
  23. package/es/src/theme/css-var/index.mjs +17 -5
  24. package/lib/index.js +1 -1
  25. package/lib/src/ap-action/style/item-dropdown.css +1 -0
  26. package/lib/src/ap-download/interface.d.ts +4 -1
  27. package/lib/src/ap-field/interface.d.ts +4 -0
  28. package/lib/src/ap-field/select/index.vue.js +1 -1
  29. package/lib/src/ap-field/text/index.vue.d.ts +5 -5
  30. package/lib/src/ap-modal/type.d.ts +2 -2
  31. package/lib/src/ap-modal/utils/createModal.js +1 -1
  32. package/lib/src/ap-table/constants.d.ts +22 -10
  33. package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +32 -0
  34. package/lib/src/business/ap-batch-action/ApBatchAction.vue.js +1 -0
  35. package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -0
  36. package/lib/src/business/ap-batch-action/index.css +24 -0
  37. package/lib/src/business/ap-batch-action/interface.d.ts +0 -0
  38. package/lib/src/business/index.d.ts +46 -0
  39. package/lib/src/business/index.js +1 -1
  40. package/lib/src/editable-table/utils.js +1 -1
  41. package/lib/src/index.js +1 -1
  42. package/lib/src/locale/lang/en.js +1 -1
  43. package/lib/src/locale/lang/zh-cn.js +1 -1
  44. package/lib/src/theme/ap-action/item-dropdown.css +1 -0
  45. package/lib/src/theme/ap-batch-action/ap-batch-action.css +24 -0
  46. package/lib/src/theme/css-var/index.js +1 -1
  47. package/package.json +3 -3
package/es/index.mjs CHANGED
@@ -2,11 +2,11 @@ import * as e from "./src/index.mjs";
2
2
  import "./src/hooks/index.mjs";
3
3
  import { Icon as l, SvgIcon as s } from "./src/icon/index.mjs";
4
4
  import { configProviderProps as x } from "./src/config-provider/config-provider-props.mjs";
5
- import { configProviderContextKey as u, tableDefaultConfig as n } from "./src/config-provider/constants.mjs";
5
+ import { configProviderContextKey as n, tableDefaultConfig as u } from "./src/config-provider/constants.mjs";
6
6
  import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as T } from "./src/config-provider/hooks/use-global-config.mjs";
7
7
  import { buildLocaleContext as S, buildTranslator as I, localeContextKey as b, translate as g, useLocale as P } from "./src/config-provider/hooks/use-locale.mjs";
8
- import { defaultNamespace as R, namespaceContextKey as h, useGetDerivedNamespace as v, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
9
- import { ConfigProvider as k, globalConfigCached as w } from "./src/config-provider/config-provider.mjs";
8
+ import { defaultNamespace as D, namespaceContextKey as R, useGetDerivedNamespace as v, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
9
+ import { ConfigProvider as G, globalConfigCached as k } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as L } from "./src/config-provider/index.mjs";
11
11
  import { Scrollbar as E } from "./src/scroll-bar/index.mjs";
12
12
  import { CollapseContainer as X, ScrollContainer as K } from "./src/container/index.mjs";
@@ -16,16 +16,16 @@ import { default as U } from "./src/locale/lang/en.mjs";
16
16
  import { BasicArrow as $, BasicHelp as j, BasicTitle as q } from "./src/basic/index.mjs";
17
17
  import { default as Q } from "./src/transition/collapse-transition.vue.mjs";
18
18
  import { ExpandTransition as _, ExpandXTransition as oo, FadeTransition as eo, ScaleRotateTransition as ro, ScaleTransition as to, ScrollXReverseTransition as ao, ScrollXTransition as po, ScrollYReverseTransition as fo, ScrollYTransition as mo, SlideXReverseTransition as lo, SlideXTransition as so, SlideYReverseTransition as xo, SlideYTransition as io } from "./src/transition/index.mjs";
19
- import { useDescription as no } from "./src/description/use-description.mjs";
19
+ import { useDescription as uo } from "./src/description/use-description.mjs";
20
20
  import { Description as co } from "./src/description/index.mjs";
21
21
  import { useComponentRegister as To } from "./src/pro-form/hooks/use-component-register.mjs";
22
22
  import { useForm as So } from "./src/pro-form/hooks/use-form.mjs";
23
23
  import { isComponentFormSchema as bo, isSlotFormSchema as go } from "./src/pro-form/types/form.mjs";
24
- import { Field as Do } from "./src/pro-form/index.mjs";
25
- import { default as ho } from "./src/pro-form/components/api-cascader.vue.mjs";
24
+ import { Field as ho } from "./src/pro-form/index.mjs";
25
+ import { default as Ro } from "./src/pro-form/components/api-cascader.vue.mjs";
26
26
  import { default as Mo } from "./src/pro-form/components/api-radio-group.vue.mjs";
27
- import { default as ko } from "./src/pro-form/components/api-select.vue.mjs";
28
- import { default as Bo } from "./src/pro-form/components/api-transfer.vue.mjs";
27
+ import { default as Go } from "./src/pro-form/components/api-select.vue.mjs";
28
+ import { default as wo } from "./src/pro-form/components/api-transfer.vue.mjs";
29
29
  import { default as yo } from "./src/pro-form/components/api-tree.vue.mjs";
30
30
  import { default as No } from "./src/pro-form/components/radio-button-group.vue.mjs";
31
31
  import { default as Ko } from "./src/pro-form/pro-form.vue.mjs";
@@ -41,16 +41,16 @@ import { useModal as te, useModalInner as ae } from "./src/modal/hooks/use-modal
41
41
  import { BaseModal as fe } from "./src/modal/index.mjs";
42
42
  import { CropperAvatar as le, CropperImage as se } from "./src/cropper/index.mjs";
43
43
  import { CountdownButton as xe, CountdownInput as ie } from "./src/count-down/index.mjs";
44
- import { createPrompt as ne } from "./src/prompt/index.mjs";
44
+ import { createPrompt as ue } from "./src/prompt/index.mjs";
45
45
  import { Dropdown as ce } from "./src/dropdown/index.mjs";
46
46
  import { default as Te } from "./src/pro-table/pro-table.vue.mjs";
47
47
  import { default as Se } from "./src/pro-table/components/table-action.vue.mjs";
48
48
  import { default as be } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
49
49
  import { default as Pe } from "./src/pro-table/components/table-image.vue.mjs";
50
- import { useTable as Re } from "./src/pro-table/hooks/use-table.mjs";
50
+ import { useTable as De } from "./src/pro-table/hooks/use-table.mjs";
51
51
  import { ApFormItemText as ve } from "./src/ap-form/items/text/index.mjs";
52
- import { default as Ge } from "./src/ap-form/items/text-area/index.vue.mjs";
53
- import { default as we } from "./src/ap-form/items/number/index.vue.mjs";
52
+ import { default as Be } from "./src/ap-form/items/text-area/index.vue.mjs";
53
+ import { default as ke } from "./src/ap-form/items/number/index.vue.mjs";
54
54
  import { default as Le } from "./src/ap-form/items/date/index.vue.mjs";
55
55
  import { default as Ee } from "./src/ap-form/items/date-range/index.vue.mjs";
56
56
  import { default as Xe } from "./src/ap-form/items/radio/index.vue.mjs";
@@ -68,16 +68,16 @@ import { ApField as fr } from "./src/ap-field/index.mjs";
68
68
  import { ApFieldText as lr } from "./src/ap-field/text/index.mjs";
69
69
  import { default as dr } from "./src/ap-field/checkbox/index.vue.mjs";
70
70
  import { default as ir } from "./src/ap-field/date/index.vue.mjs";
71
- import { default as nr } from "./src/ap-field/number/index.vue.mjs";
71
+ import { default as ur } from "./src/ap-field/number/index.vue.mjs";
72
72
  import { default as cr } from "./src/ap-field/radio/index.vue.mjs";
73
73
  import { default as Tr } from "./src/ap-field/switch/index.vue.mjs";
74
74
  import { default as Sr } from "./src/ap-field/text-area/index.vue.mjs";
75
75
  import { default as br } from "./src/ap-field/date-range/index.vue.mjs";
76
76
  import { default as Pr } from "./src/ap-field/select/index.vue.mjs";
77
- import { default as Rr } from "./src/ap-field/text/password.vue.mjs";
77
+ import { default as Dr } from "./src/ap-field/text/password.vue.mjs";
78
78
  import { default as vr } from "./src/ap-field/slider/index.vue.mjs";
79
- import { default as Gr } from "./src/ap-field/segmented/index.vue.mjs";
80
- import { default as wr } from "./src/ap-field/rate/index.vue.mjs";
79
+ import { default as Br } from "./src/ap-field/segmented/index.vue.mjs";
80
+ import { default as kr } from "./src/ap-field/rate/index.vue.mjs";
81
81
  import { adminToken as Lr, aplusToken as yr } from "./src/design-token/index.mjs";
82
82
  import { ApActionItem as Nr } from "./src/ap-action/index.mjs";
83
83
  import { default as Kr } from "./src/ap-action/item-modal/index.vue.mjs";
@@ -94,21 +94,21 @@ import { default as pt } from "./src/work-order-modal/work-order-modal.vue.mjs";
94
94
  import { default as mt } from "./src/ap-tag/ap-tag.vue.mjs";
95
95
  import { default as st } from "./src/ap-tag/ap-tag-group.vue.mjs";
96
96
  import { default as xt } from "./src/ap-layout/ap-info-layout/ap-info-layout.vue.mjs";
97
- import { NeedNameKeyDefault as ut } from "./src/ap-upload/apUploadTypes.mjs";
97
+ import { NeedNameKeyDefault as nt } from "./src/ap-upload/apUploadTypes.mjs";
98
98
  import { default as At } from "./src/ap-upload/apUpload.vue.mjs";
99
99
  import { default as Ft } from "./src/ap-download/ap-download.vue.mjs";
100
100
  import { CheckCard as Ct } from "./src/check-card/index.mjs";
101
101
  import { default as It } from "./src/check-card/group.vue.mjs";
102
102
  import { ApModal as gt } from "./src/ap-modal/index.mjs";
103
- import { default as Dt } from "./src/ap-list/index.vue.mjs";
104
- import { ApExpandAlert as ht, ApExportGroup as vt, ApInputRadio as Mt, ApLabel as Gt, ApSelectLayout as kt, ApStatus as wt, ApStatusGroup as Bt, ApTitle as Lt } from "./src/business/index.mjs";
105
- import { useTablePaging as Et } from "./src/ap-table/hooks/use-table-paging.mjs";
106
- import { default as Xt } from "./src/ap-table/ap-table.vue.mjs";
107
- import { default as Yt } from "./src/editable-table/index.vue.mjs";
108
- import { default as Ht } from "./src/editable-table/form-item.vue.mjs";
109
- import { default as zt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
110
- import { useMessage as Vt } from "./src/hooks/useMessage.mjs";
111
- import { useControllableValue as jt } from "./src/hooks/useControllableValue.mjs";
103
+ import { default as ht } from "./src/ap-list/index.vue.mjs";
104
+ import { ApBatchAction as Rt, ApExpandAlert as vt, ApExportGroup as Mt, ApInputRadio as Bt, ApLabel as Gt, ApSelectLayout as kt, ApStatus as wt, ApStatusGroup as Lt, ApTitle as yt } from "./src/business/index.mjs";
105
+ import { useTablePaging as Nt } from "./src/ap-table/hooks/use-table-paging.mjs";
106
+ import { default as Kt } from "./src/ap-table/ap-table.vue.mjs";
107
+ import { default as Ot } from "./src/editable-table/index.vue.mjs";
108
+ import { default as Wt } from "./src/editable-table/form-item.vue.mjs";
109
+ import { default as Ut } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
110
+ import { useMessage as $t } from "./src/hooks/useMessage.mjs";
111
+ import { useControllableValue as qt } from "./src/hooks/useControllableValue.mjs";
112
112
  const p = {
113
113
  install: (r) => {
114
114
  for (const t in e) {
@@ -124,21 +124,22 @@ export {
124
124
  Wr as ApActionItemDropdown,
125
125
  Kr as ApActionItemModal,
126
126
  Or as ApActionItemPopconfirm,
127
+ Rt as ApBatchAction,
127
128
  Qr as ApCustomColumn,
128
129
  _r as ApCustomSelect,
129
- zt as ApDescriptions,
130
+ Ut as ApDescriptions,
130
131
  Ft as ApDownload,
131
- ht as ApExpandAlert,
132
- vt as ApExportGroup,
132
+ vt as ApExpandAlert,
133
+ Mt as ApExportGroup,
133
134
  fr as ApField,
134
135
  dr as ApFieldCheckbox,
135
136
  ir as ApFieldDate,
136
137
  br as ApFieldDateRange,
137
- nr as ApFieldNumber,
138
- Rr as ApFieldPassword,
138
+ ur as ApFieldNumber,
139
+ Dr as ApFieldPassword,
139
140
  cr as ApFieldRadio,
140
- wr as ApFieldRate,
141
- Gr as ApFieldSegmented,
141
+ kr as ApFieldRate,
142
+ Br as ApFieldSegmented,
142
143
  Pr as ApFieldSelect,
143
144
  vr as ApFieldSlider,
144
145
  Tr as ApFieldSwitch,
@@ -150,33 +151,33 @@ export {
150
151
  Le as ApFormItemDate,
151
152
  Ee as ApFormItemDateRange,
152
153
  Ze as ApFormItemGroup,
153
- we as ApFormItemNumber,
154
+ ke as ApFormItemNumber,
154
155
  Xe as ApFormItemRadio,
155
156
  Ye as ApFormItemSelect,
156
157
  He as ApFormItemSwitch,
157
158
  ve as ApFormItemText,
158
- Ge as ApFormItemTextArea,
159
+ Be as ApFormItemTextArea,
159
160
  Ve as ApFormItemTextPassword,
160
161
  or as ApFormList,
161
162
  ar as ApFormModalForm,
162
163
  rr as ApFormSearchForm,
163
164
  xt as ApInfoLayout,
164
- Mt as ApInputRadio,
165
+ Bt as ApInputRadio,
165
166
  Gt as ApLabel,
166
- Dt as ApList,
167
+ ht as ApList,
167
168
  gt as ApModal,
168
169
  kt as ApSelectLayout,
169
170
  wt as ApStatus,
170
- Bt as ApStatusGroup,
171
- Xt as ApTable,
171
+ Lt as ApStatusGroup,
172
+ Kt as ApTable,
172
173
  mt as ApTag,
173
174
  st as ApTagGroup,
174
- Lt as ApTitle,
175
+ yt as ApTitle,
175
176
  At as ApUpload,
176
- ho as ApiCascader,
177
+ Ro as ApiCascader,
177
178
  Mo as ApiRadioGroup,
178
- ko as ApiSelect,
179
- Bo as ApiTransfer,
179
+ Go as ApiSelect,
180
+ wo as ApiTransfer,
180
181
  yo as ApiTree,
181
182
  Oo as ApiTreeSelect,
182
183
  Qo as BaseButton,
@@ -188,7 +189,7 @@ export {
188
189
  It as CheckCardGroup,
189
190
  X as CollapseContainer,
190
191
  Q as CollapseTransition,
191
- k as ConfigProvider,
192
+ G as ConfigProvider,
192
193
  xe as CountdownButton,
193
194
  ie as CountdownInput,
194
195
  le as CropperAvatar,
@@ -197,16 +198,16 @@ export {
197
198
  et as DictCode,
198
199
  ce as Dropdown,
199
200
  be as EditTableHeaderIcon,
200
- Yt as EditableTable,
201
- Ht as EditableTableFormItem,
201
+ Ot as EditableTable,
202
+ Wt as EditableTableFormItem,
202
203
  _ as ExpandTransition,
203
204
  oo as ExpandXTransition,
204
205
  eo as FadeTransition,
205
- Do as Field,
206
+ ho as Field,
206
207
  l as Icon,
207
208
  O as IconPicker,
208
209
  $o as ModalButton,
209
- ut as NeedNameKeyDefault,
210
+ nt as NeedNameKeyDefault,
210
211
  qo as PopConfirmButton,
211
212
  Ko as ProForm,
212
213
  Te as ProTable,
@@ -234,37 +235,37 @@ export {
234
235
  yr as aplusToken,
235
236
  S as buildLocaleContext,
236
237
  I as buildTranslator,
237
- u as configProviderContextKey,
238
+ n as configProviderContextKey,
238
239
  x as configProviderProps,
239
- ne as createPrompt,
240
+ ue as createPrompt,
240
241
  tt as createWorkOrderModal,
241
242
  p as default,
242
- R as defaultNamespace,
243
+ D as defaultNamespace,
243
244
  U as en,
244
245
  $r as generateTableList,
245
- w as globalConfigCached,
246
+ k as globalConfigCached,
246
247
  bo as isComponentFormSchema,
247
248
  go as isSlotFormSchema,
248
249
  c as keysOf,
249
250
  b as localeContextKey,
250
- h as namespaceContextKey,
251
+ R as namespaceContextKey,
251
252
  F as provideGlobalConfig,
252
- n as tableDefaultConfig,
253
+ u as tableDefaultConfig,
253
254
  g as translate,
254
255
  qr as useCacheColumnSetting,
255
256
  To as useComponentRegister,
256
- jt as useControllableValue,
257
- no as useDescription,
257
+ qt as useControllableValue,
258
+ uo as useDescription,
258
259
  So as useForm,
259
260
  v as useGetDerivedNamespace,
260
261
  T as useGlobalConfig,
261
262
  P as useLocale,
262
- Vt as useMessage,
263
+ $t as useMessage,
263
264
  te as useModal,
264
265
  ee as useModalContext,
265
266
  ae as useModalInner,
266
267
  M as useNamespace,
267
- Re as useTable,
268
- Et as useTablePaging,
268
+ De as useTable,
269
+ Nt as useTablePaging,
269
270
  W as zhCn
270
271
  };
@@ -10,4 +10,5 @@
10
10
  color: #0070ff;
11
11
  margin-left: 4px;
12
12
  font-size: 14px;
13
+ display: inline-flex;
13
14
  }
@@ -17,6 +17,9 @@ export interface ApDownLoadProps {
17
17
  * @default false
18
18
  */
19
19
  disabled?: boolean;
20
- fileName: string;
20
+ fileName: Array<string> | string | Array<{
21
+ path: string;
22
+ fileName: string;
23
+ }>;
21
24
  getOssAccess: () => Promise<accessCreate>;
22
25
  }
@@ -105,6 +105,10 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
105
105
  * 如果设置showSearch=true,此时设置searchMode=filter将进行前端筛选,设置searchMode=request将会走后端筛选
106
106
  */
107
107
  searchMode?: 'filter' | 'request';
108
+ /**
109
+ * 是否在Select框聚焦时再次触发选项请求
110
+ */
111
+ refetchOnFocus?: boolean;
108
112
  };
109
113
  export type ApFieldSelectExpose = {
110
114
  focus: () => void;
@@ -1,11 +1,11 @@
1
- import { defineComponent as k, ref as c, onMounted as q, computed as m, unref as a, openBlock as v, createElementBlock as A, toDisplayString as M, createBlock as O, mergeProps as T, createSlots as _, renderList as R, withCtx as h, renderSlot as D, normalizeProps as U, guardReactiveProps as L, createVNode as z } from "vue";
2
- import { debounce as K, isFunction as y, isArray as H, isNil as $, omit as j } from "lodash-unified";
3
- import { Select as E, Spin as W } from "ant-design-vue";
1
+ import { defineComponent as k, ref as f, onMounted as q, computed as m, unref as r, openBlock as v, createElementBlock as A, toDisplayString as M, createBlock as T, mergeProps as _, createSlots as R, renderList as D, withCtx as h, renderSlot as U, normalizeProps as L, guardReactiveProps as z, createVNode as K } from "vue";
2
+ import { debounce as H, isFunction as y, isArray as $, isNil as j, omit as E } from "lodash-unified";
3
+ import { Select as W, Spin as G } from "ant-design-vue";
4
4
  import "../../hooks/index.mjs";
5
- import { omitUndefined as G } from "../../utils/index.mjs";
6
- import { useDefaultPlaceholder as J } from "../hooks/use-default-placeholder.mjs";
7
- import { useControllableValue as Q } from "../../hooks/useControllableValue.mjs";
8
- const X = { key: 0 }, ae = /* @__PURE__ */ k({
5
+ import { omitUndefined as J } from "../../utils/index.mjs";
6
+ import { useDefaultPlaceholder as Q } from "../hooks/use-default-placeholder.mjs";
7
+ import { useControllableValue as X } from "../../hooks/useControllableValue.mjs";
8
+ const Y = { key: 0 }, re = /* @__PURE__ */ k({
9
9
  name: "ApFieldSelect",
10
10
  __name: "index",
11
11
  props: {
@@ -88,56 +88,60 @@ const X = { key: 0 }, ae = /* @__PURE__ */ k({
88
88
  multiple: { type: Boolean, default: void 0 },
89
89
  value: {},
90
90
  "onUpdate:value": {},
91
- searchMode: { default: "filter" }
91
+ searchMode: { default: "filter" },
92
+ refetchOnFocus: { type: Boolean }
92
93
  },
93
94
  emits: ["update:value"],
94
95
  setup(w, { expose: S, emit: g }) {
95
- let i = 0;
96
- const B = K((o) => {
96
+ let u = 0;
97
+ const B = H((o) => {
97
98
  if (!y(e.request))
98
99
  return;
99
- i += 1;
100
- const t = i;
101
- r.value = [], u.value = !0, e.request(o).then((l) => {
102
- i === t && (r.value = l);
100
+ u += 1;
101
+ const t = u;
102
+ i.value = [], n.value = !0, e.request(o).then((l) => {
103
+ u === t && (i.value = l);
103
104
  }).finally(() => {
104
- u.value = !1;
105
+ n.value = !1;
105
106
  });
106
107
  }, 300), e = w, b = (o, t) => {
107
- var n;
108
- const l = ((n = e.fieldNames) == null ? void 0 : n.label) || "label";
108
+ var a;
109
+ const l = ((a = e.fieldNames) == null ? void 0 : a.label) || "label";
109
110
  return typeof (t == null ? void 0 : t.label) == "string" && t[l].indexOf(o) > -1;
110
- }, r = c((e == null ? void 0 : e.options) || []), d = c(), u = c((e == null ? void 0 : e.loading) || !1), C = g;
111
- async function f(o = !0) {
111
+ }, i = f((e == null ? void 0 : e.options) || []), d = f(), n = f((e == null ? void 0 : e.loading) || !1), C = g;
112
+ async function s(o = !0) {
112
113
  if (!y(e.request))
113
114
  return;
114
- u.value = !0, i += 1;
115
- const t = i;
115
+ n.value = !0, u += 1;
116
+ const t = u;
116
117
  try {
117
- o && (r.value = []);
118
+ o && (i.value = []);
118
119
  const l = await e.request();
119
- if (t !== i)
120
+ if (t !== u)
120
121
  return;
121
- r.value = l;
122
+ i.value = l;
122
123
  } finally {
123
- u.value = !1;
124
+ n.value = !1;
124
125
  }
125
126
  }
127
+ function F() {
128
+ e.refetchOnFocus && u > 0 && !n.value && s(!0);
129
+ }
126
130
  q(() => {
127
- f();
131
+ s();
128
132
  });
129
- const { value: p, updateValue: x } = Q(e, C), F = J("Select", e), I = m(() => {
130
- const o = a(p);
133
+ const { value: p, updateValue: x } = X(e, C), I = Q("Select", e), O = m(() => {
134
+ const o = r(p);
131
135
  if (!o)
132
136
  return e.emptyText;
133
- if (H(o))
137
+ if ($(o))
134
138
  return o.map(
135
139
  (l) => {
136
- var n;
137
- return (n = a(r).find((s) => s.value === l)) == null ? void 0 : n.label;
140
+ var a;
141
+ return (a = r(i).find((c) => c.value === l)) == null ? void 0 : a.label;
138
142
  }
139
143
  ).filter(Boolean).join("、") || e.emptyText;
140
- const t = a(r).find((l) => l.value === o);
144
+ const t = r(i).find((l) => l.value === o);
141
145
  return (t == null ? void 0 : t.label) || e.emptyText;
142
146
  }), P = m(() => {
143
147
  const o = !!(e != null && e.showSearch), t = e.searchMode;
@@ -146,13 +150,13 @@ const X = { key: 0 }, ae = /* @__PURE__ */ k({
146
150
  showArrow: !1,
147
151
  defaultActiveFirstOption: !1,
148
152
  onSearch: B,
149
- notFoundContent: u.value ? void 0 : null
153
+ notFoundContent: n.value ? void 0 : null
150
154
  } : {
151
155
  showArrow: !0,
152
- filterOption: $(e == null ? void 0 : e.filterOption) ? b : e == null ? void 0 : e.filterOption
156
+ filterOption: j(e == null ? void 0 : e.filterOption) ? b : e == null ? void 0 : e.filterOption
153
157
  }), {
154
- ...G(
155
- j(e, [
158
+ ...J(
159
+ E(e, [
156
160
  "mode",
157
161
  "value",
158
162
  "onUpdate:value",
@@ -161,7 +165,7 @@ const X = { key: 0 }, ae = /* @__PURE__ */ k({
161
165
  "searchMode"
162
166
  ])
163
167
  ),
164
- placeholder: a(F),
168
+ placeholder: r(I),
165
169
  ...l
166
170
  };
167
171
  });
@@ -176,29 +180,30 @@ const X = { key: 0 }, ae = /* @__PURE__ */ k({
176
180
  return S({
177
181
  focus: V,
178
182
  blur: N,
179
- request: f
180
- }), (o, t) => o.mode === "read" ? (v(), A("span", X, M(I.value), 1)) : (v(), O(a(E), T({
183
+ request: s
184
+ }), (o, t) => o.mode === "read" ? (v(), A("span", Y, M(O.value), 1)) : (v(), T(r(W), _({
181
185
  key: 1,
182
186
  "allow-clear": "",
183
187
  ref_key: "selectRef",
184
188
  ref: d
185
189
  }, P.value, {
186
190
  mode: o.multiple ? "multiple" : void 0,
187
- value: a(p),
188
- "onUpdate:value": a(x),
189
- options: r.value,
190
- loading: u.value
191
- }), _({ _: 2 }, [
192
- R(o.$slots, (l, n) => ({
193
- name: n,
194
- fn: h((s) => [
195
- D(o.$slots, n, U(L(s || {})))
191
+ value: r(p),
192
+ "onUpdate:value": r(x),
193
+ options: i.value,
194
+ loading: n.value,
195
+ onFocus: F
196
+ }), R({ _: 2 }, [
197
+ D(o.$slots, (l, a) => ({
198
+ name: a,
199
+ fn: h((c) => [
200
+ U(o.$slots, a, L(z(c || {})))
196
201
  ])
197
202
  })),
198
- u.value ? {
203
+ n.value ? {
199
204
  name: "notFoundContent",
200
205
  fn: h(() => [
201
- z(a(W), { size: "small" })
206
+ K(r(G), { size: "small" })
202
207
  ]),
203
208
  key: "0"
204
209
  } : void 0
@@ -206,5 +211,5 @@ const X = { key: 0 }, ae = /* @__PURE__ */ k({
206
211
  }
207
212
  });
208
213
  export {
209
- ae as default
214
+ re as default
210
215
  };
@@ -2,11 +2,11 @@ import { ApFieldTextProps, FieldMode } from '../interface';
2
2
  import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
3
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
4
  type ApFieldTextSlots = {
5
- addonAfter: any;
6
- addonBefore: any;
7
- prefix: any;
8
- suffix: any;
9
- clearIcon: any;
5
+ addonAfter?: any;
6
+ addonBefore?: any;
7
+ prefix?: any;
8
+ suffix?: any;
9
+ clearIcon?: any;
10
10
  };
11
11
  declare function __VLS_template(): Readonly<ApFieldTextSlots> & ApFieldTextSlots;
12
12
  declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFieldTextProps>, {
@@ -1,7 +1,7 @@
1
1
  import { ModalProps } from 'ant-design-vue';
2
2
  export type CreateModalFuncProps = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer'> & Partial<{
3
- onCancel: (e: MouseEvent) => void | Promise<unknown>;
4
- onOk: (e: MouseEvent) => void | Promise<unknown>;
3
+ onCancel: (params: any) => void | Promise<unknown>;
4
+ onOk: (params: any) => void | Promise<unknown>;
5
5
  getContainer: HTMLElement;
6
6
  content: any;
7
7
  }>;
@@ -1,36 +1,44 @@
1
- import { render as p, defineComponent as f, createVNode as l, mergeProps as m, h as u } from "vue";
2
- import { ConfigProvider as C, Modal as g } from "ant-design-vue";
3
- import { globalConfigCached as O } from "../../config-provider/config-provider.mjs";
4
- const L = (s) => {
5
- let r, n;
6
- function a() {
7
- r && r(!1), setTimeout(() => {
8
- p(null, t), i.removeChild(t);
1
+ import { render as l, defineComponent as C, createVNode as h, mergeProps as g, h as O } from "vue";
2
+ import { ConfigProvider as k, Modal as y } from "ant-design-vue";
3
+ import { globalConfigCached as v } from "../../config-provider/config-provider.mjs";
4
+ const b = (i) => {
5
+ let p, n;
6
+ function d() {
7
+ p && p(!1), setTimeout(() => {
8
+ l(null, r), c.removeChild(r);
9
9
  }, 500);
10
10
  }
11
- function c(e) {
11
+ function m(e) {
12
12
  n && n(e);
13
13
  }
14
- const h = /* @__PURE__ */ f({
14
+ const f = /* @__PURE__ */ C({
15
15
  data() {
16
16
  return {
17
17
  open: !0,
18
- props: s
18
+ props: i
19
19
  };
20
20
  },
21
21
  methods: {
22
- async handleCancel(e) {
23
- var o, d;
24
- (o = this.props) != null && o.onCancel && await ((d = this.props) == null ? void 0 : d.onCancel(e)), a();
22
+ async handleCancel() {
23
+ var e, o, t, s, a;
24
+ if ((e = this.props) != null && e.onCancel) {
25
+ const u = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
26
+ await ((a = this.props) == null ? void 0 : a.onCancel(u));
27
+ }
28
+ d();
25
29
  },
26
- async handleOk(e) {
27
- var o;
30
+ async handleOk() {
31
+ var e, o, t, s;
28
32
  try {
29
- n({
33
+ if (n({
30
34
  confirmLoading: !0
31
- }), (o = this.props) != null && o.onOk && await this.props.onOk(e), n({
35
+ }), (e = this.props) != null && e.onOk) {
36
+ const a = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
37
+ await this.props.onOk(a);
38
+ }
39
+ n({
32
40
  confirmLoading: !1
33
- }), a();
41
+ }), d();
34
42
  } catch {
35
43
  n({
36
44
  confirmLoading: !1
@@ -39,7 +47,7 @@ const L = (s) => {
39
47
  }
40
48
  },
41
49
  created() {
42
- r = (e) => {
50
+ p = (e) => {
43
51
  this.open = e;
44
52
  }, n = (e) => {
45
53
  this.props = {
@@ -52,8 +60,8 @@ const L = (s) => {
52
60
  const {
53
61
  ...e
54
62
  } = this.props;
55
- return delete e.onCancel, delete e.onOk, l(C, O.value, {
56
- default: () => [l(g, m({
63
+ return delete e.onCancel, delete e.onOk, h(k, v.value, {
64
+ default: () => [h(y, g({
57
65
  open: this.open,
58
66
  destroyOnClose: !0,
59
67
  onCancel: this.handleCancel,
@@ -66,12 +74,12 @@ const L = (s) => {
66
74
  })]
67
75
  });
68
76
  }
69
- }), i = s.getContainer || document.body, t = document.createElement("div");
70
- return i.appendChild(t), p(u(h), t), {
71
- destroy: a,
72
- update: c
77
+ }), c = i.getContainer || document.body, r = document.createElement("div");
78
+ return c.appendChild(r), l(O(f), r), {
79
+ destroy: d,
80
+ update: m
73
81
  };
74
82
  };
75
83
  export {
76
- L as createModal
84
+ b as createModal
77
85
  };