@aplus-frontend/ui 0.1.4 → 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.
- package/es/index.mjs +60 -59
- package/es/src/ap-field/interface.d.ts +4 -0
- package/es/src/ap-field/select/index.vue.mjs +56 -51
- package/es/src/ap-table/constants.d.ts +12 -0
- package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +32 -0
- package/es/src/business/ap-batch-action/ApBatchAction.vue.mjs +4 -0
- package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +46 -0
- package/es/src/business/ap-batch-action/index.css +24 -0
- package/es/src/business/ap-batch-action/interface.d.ts +0 -0
- package/es/src/business/index.d.ts +46 -0
- package/es/src/business/index.mjs +14 -11
- package/es/src/editable-table/utils.mjs +1 -1
- package/es/src/index.mjs +176 -175
- package/es/src/locale/lang/en.mjs +5 -0
- package/es/src/locale/lang/zh-cn.mjs +5 -0
- package/es/src/theme/ap-batch-action/ap-batch-action.css +24 -0
- package/es/src/theme/css-var/index.mjs +17 -5
- package/lib/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +4 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +12 -0
- package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +32 -0
- package/lib/src/business/ap-batch-action/ApBatchAction.vue.js +1 -0
- package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -0
- package/lib/src/business/ap-batch-action/index.css +24 -0
- package/lib/src/business/ap-batch-action/interface.d.ts +0 -0
- package/lib/src/business/index.d.ts +46 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-batch-action/ap-batch-action.css +24 -0
- package/lib/src/theme/css-var/index.js +1 -1
- 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
|
|
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
|
|
9
|
-
import { ConfigProvider as
|
|
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
|
|
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
|
|
25
|
-
import { default as
|
|
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
|
|
28
|
-
import { default as
|
|
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
|
|
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
|
|
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
|
|
53
|
-
import { default as
|
|
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
|
|
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
|
|
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
|
|
80
|
-
import { default as
|
|
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
|
|
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
|
|
104
|
-
import { ApExpandAlert as
|
|
105
|
-
import { useTablePaging as
|
|
106
|
-
import { default as
|
|
107
|
-
import { default as
|
|
108
|
-
import { default as
|
|
109
|
-
import { default as
|
|
110
|
-
import { useMessage as
|
|
111
|
-
import { useControllableValue as
|
|
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
|
-
|
|
130
|
+
Ut as ApDescriptions,
|
|
130
131
|
Ft as ApDownload,
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
138
|
-
|
|
138
|
+
ur as ApFieldNumber,
|
|
139
|
+
Dr as ApFieldPassword,
|
|
139
140
|
cr as ApFieldRadio,
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
165
|
+
Bt as ApInputRadio,
|
|
165
166
|
Gt as ApLabel,
|
|
166
|
-
|
|
167
|
+
ht as ApList,
|
|
167
168
|
gt as ApModal,
|
|
168
169
|
kt as ApSelectLayout,
|
|
169
170
|
wt as ApStatus,
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
Lt as ApStatusGroup,
|
|
172
|
+
Kt as ApTable,
|
|
172
173
|
mt as ApTag,
|
|
173
174
|
st as ApTagGroup,
|
|
174
|
-
|
|
175
|
+
yt as ApTitle,
|
|
175
176
|
At as ApUpload,
|
|
176
|
-
|
|
177
|
+
Ro as ApiCascader,
|
|
177
178
|
Mo as ApiRadioGroup,
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
|
|
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
|
-
|
|
201
|
-
|
|
201
|
+
Ot as EditableTable,
|
|
202
|
+
Wt as EditableTableFormItem,
|
|
202
203
|
_ as ExpandTransition,
|
|
203
204
|
oo as ExpandXTransition,
|
|
204
205
|
eo as FadeTransition,
|
|
205
|
-
|
|
206
|
+
ho as Field,
|
|
206
207
|
l as Icon,
|
|
207
208
|
O as IconPicker,
|
|
208
209
|
$o as ModalButton,
|
|
209
|
-
|
|
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
|
-
|
|
238
|
+
n as configProviderContextKey,
|
|
238
239
|
x as configProviderProps,
|
|
239
|
-
|
|
240
|
+
ue as createPrompt,
|
|
240
241
|
tt as createWorkOrderModal,
|
|
241
242
|
p as default,
|
|
242
|
-
|
|
243
|
+
D as defaultNamespace,
|
|
243
244
|
U as en,
|
|
244
245
|
$r as generateTableList,
|
|
245
|
-
|
|
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
|
-
|
|
251
|
+
R as namespaceContextKey,
|
|
251
252
|
F as provideGlobalConfig,
|
|
252
|
-
|
|
253
|
+
u as tableDefaultConfig,
|
|
253
254
|
g as translate,
|
|
254
255
|
qr as useCacheColumnSetting,
|
|
255
256
|
To as useComponentRegister,
|
|
256
|
-
|
|
257
|
-
|
|
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
|
-
|
|
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
|
-
|
|
268
|
-
|
|
268
|
+
De as useTable,
|
|
269
|
+
Nt as useTablePaging,
|
|
269
270
|
W as zhCn
|
|
270
271
|
};
|
|
@@ -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
|
|
2
|
-
import { debounce as
|
|
3
|
-
import { Select as
|
|
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
|
|
6
|
-
import { useDefaultPlaceholder as
|
|
7
|
-
import { useControllableValue as
|
|
8
|
-
const
|
|
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
|
|
96
|
-
const B =
|
|
96
|
+
let u = 0;
|
|
97
|
+
const B = H((o) => {
|
|
97
98
|
if (!y(e.request))
|
|
98
99
|
return;
|
|
99
|
-
|
|
100
|
-
const t =
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
105
|
+
n.value = !1;
|
|
105
106
|
});
|
|
106
107
|
}, 300), e = w, b = (o, t) => {
|
|
107
|
-
var
|
|
108
|
-
const l = ((
|
|
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
|
-
},
|
|
111
|
-
async function
|
|
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
|
-
|
|
115
|
-
const t =
|
|
115
|
+
n.value = !0, u += 1;
|
|
116
|
+
const t = u;
|
|
116
117
|
try {
|
|
117
|
-
o && (
|
|
118
|
+
o && (i.value = []);
|
|
118
119
|
const l = await e.request();
|
|
119
|
-
if (t !==
|
|
120
|
+
if (t !== u)
|
|
120
121
|
return;
|
|
121
|
-
|
|
122
|
+
i.value = l;
|
|
122
123
|
} finally {
|
|
123
|
-
|
|
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
|
-
|
|
131
|
+
s();
|
|
128
132
|
});
|
|
129
|
-
const { value: p, updateValue: x } =
|
|
130
|
-
const o =
|
|
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 (
|
|
137
|
+
if ($(o))
|
|
134
138
|
return o.map(
|
|
135
139
|
(l) => {
|
|
136
|
-
var
|
|
137
|
-
return (
|
|
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 =
|
|
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:
|
|
153
|
+
notFoundContent: n.value ? void 0 : null
|
|
150
154
|
} : {
|
|
151
155
|
showArrow: !0,
|
|
152
|
-
filterOption:
|
|
156
|
+
filterOption: j(e == null ? void 0 : e.filterOption) ? b : e == null ? void 0 : e.filterOption
|
|
153
157
|
}), {
|
|
154
|
-
...
|
|
155
|
-
|
|
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:
|
|
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:
|
|
180
|
-
}), (o, t) => o.mode === "read" ? (v(), A("span",
|
|
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:
|
|
188
|
-
"onUpdate:value":
|
|
189
|
-
options:
|
|
190
|
-
loading:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
203
|
+
n.value ? {
|
|
199
204
|
name: "notFoundContent",
|
|
200
205
|
fn: h(() => [
|
|
201
|
-
|
|
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
|
-
|
|
214
|
+
re as default
|
|
210
215
|
};
|
|
@@ -11312,6 +11312,9 @@ export declare const apTableRenderItemMap: {
|
|
|
11312
11312
|
type: PropType<"filter" | "request">;
|
|
11313
11313
|
default: string;
|
|
11314
11314
|
};
|
|
11315
|
+
refetchOnFocus: {
|
|
11316
|
+
type: PropType<boolean>;
|
|
11317
|
+
};
|
|
11315
11318
|
}>> & {
|
|
11316
11319
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
11317
11320
|
}, {
|
|
@@ -11578,6 +11581,9 @@ export declare const apTableRenderItemMap: {
|
|
|
11578
11581
|
type: PropType<"filter" | "request">;
|
|
11579
11582
|
default: string;
|
|
11580
11583
|
};
|
|
11584
|
+
refetchOnFocus: {
|
|
11585
|
+
type: PropType<boolean>;
|
|
11586
|
+
};
|
|
11581
11587
|
}>> & {
|
|
11582
11588
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
11583
11589
|
}, {
|
|
@@ -11863,6 +11869,9 @@ export declare const apTableRenderItemMap: {
|
|
|
11863
11869
|
type: PropType<"filter" | "request">;
|
|
11864
11870
|
default: string;
|
|
11865
11871
|
};
|
|
11872
|
+
refetchOnFocus: {
|
|
11873
|
+
type: PropType<boolean>;
|
|
11874
|
+
};
|
|
11866
11875
|
}>> & {
|
|
11867
11876
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
11868
11877
|
}, {
|
|
@@ -12149,6 +12158,9 @@ export declare const apTableRenderItemMap: {
|
|
|
12149
12158
|
type: PropType<"filter" | "request">;
|
|
12150
12159
|
default: string;
|
|
12151
12160
|
};
|
|
12161
|
+
refetchOnFocus: {
|
|
12162
|
+
type: PropType<boolean>;
|
|
12163
|
+
};
|
|
12152
12164
|
}>> & {
|
|
12153
12165
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
12154
12166
|
}, {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
interface Props {
|
|
3
|
+
/**
|
|
4
|
+
* 选中行的Key列表
|
|
5
|
+
*/
|
|
6
|
+
selectedRowKeys?: any[];
|
|
7
|
+
/**
|
|
8
|
+
* 清空
|
|
9
|
+
*/
|
|
10
|
+
clearAll?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
prefix?(_: {}): any;
|
|
14
|
+
suffix?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToOption<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent as m, computed as u, openBlock as f, createElementBlock as h, normalizeClass as _, unref as t, renderSlot as r, createElementVNode as s, createTextVNode as n, toDisplayString as c, createVNode as A, withCtx as B } from "vue";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
import { Button as v } from "ant-design-vue";
|
|
4
|
+
import "../../config-provider/index.mjs";
|
|
5
|
+
import { useNamespace as y } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
import { useLocale as C } from "../../config-provider/hooks/use-locale.mjs";
|
|
7
|
+
const k = { class: "selected-desc" }, x = { class: "selected-desc-conut" }, N = { class: "selected-desc-clean" }, K = /* @__PURE__ */ m({
|
|
8
|
+
__name: "ApBatchAction",
|
|
9
|
+
props: {
|
|
10
|
+
selectedRowKeys: {},
|
|
11
|
+
clearAll: { type: Function }
|
|
12
|
+
},
|
|
13
|
+
setup(p) {
|
|
14
|
+
const { b: i } = y("ap-batch-action"), { t: o } = C(), l = p, d = u(() => {
|
|
15
|
+
var e;
|
|
16
|
+
return ((e = l.selectedRowKeys) == null ? void 0 : e.length) || 0;
|
|
17
|
+
});
|
|
18
|
+
return (e, a) => (f(), h("div", {
|
|
19
|
+
class: _([t(i)()])
|
|
20
|
+
}, [
|
|
21
|
+
r(e.$slots, "prefix"),
|
|
22
|
+
s("div", k, [
|
|
23
|
+
s("div", x, [
|
|
24
|
+
n(c(t(o)("ap.apBatchAction.selected")) + " ", 1),
|
|
25
|
+
s("span", null, c(d.value), 1),
|
|
26
|
+
n(" " + c(t(o)("ap.apBatchAction.piecesOfData")), 1)
|
|
27
|
+
]),
|
|
28
|
+
s("div", N, [
|
|
29
|
+
A(t(v), {
|
|
30
|
+
type: "link",
|
|
31
|
+
onClick: a[0] || (a[0] = (w) => l.clearAll && l.clearAll())
|
|
32
|
+
}, {
|
|
33
|
+
default: B(() => [
|
|
34
|
+
n(c(t(o)("ap.apBatchAction.empty")), 1)
|
|
35
|
+
]),
|
|
36
|
+
_: 1
|
|
37
|
+
})
|
|
38
|
+
])
|
|
39
|
+
]),
|
|
40
|
+
r(e.$slots, "suffix")
|
|
41
|
+
], 2));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
K as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.aplus-ap-batch-action {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
}
|
|
6
|
+
.aplus-ap-batch-action .selected-desc {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
margin-right: 16px;
|
|
10
|
+
}
|
|
11
|
+
.aplus-ap-batch-action .selected-desc-conut {
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
color: var(--ap-batch-action-color-font, #8896b0);
|
|
14
|
+
}
|
|
15
|
+
.aplus-ap-batch-action .selected-desc-conut span {
|
|
16
|
+
color: var(--ap-batch-action-color-active, #0070ff);
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
}
|
|
19
|
+
.aplus-ap-batch-action .selected-desc-clean {
|
|
20
|
+
margin-left: 8px;
|
|
21
|
+
}
|
|
22
|
+
.aplus-ap-batch-action .selected-desc-clean > * {
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
File without changes
|
|
@@ -1179,3 +1179,49 @@ export declare const ApInputRadio: DefineComponent<{
|
|
|
1179
1179
|
stringMode: boolean;
|
|
1180
1180
|
controls: boolean;
|
|
1181
1181
|
}, {}>;
|
|
1182
|
+
export declare const ApBatchAction: {
|
|
1183
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
1184
|
+
selectedRowKeys: {
|
|
1185
|
+
type: PropType<any[]>;
|
|
1186
|
+
};
|
|
1187
|
+
clearAll: {
|
|
1188
|
+
type: PropType<() => void>;
|
|
1189
|
+
};
|
|
1190
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
1191
|
+
selectedRowKeys: {
|
|
1192
|
+
type: PropType<any[]>;
|
|
1193
|
+
};
|
|
1194
|
+
clearAll: {
|
|
1195
|
+
type: PropType<() => void>;
|
|
1196
|
+
};
|
|
1197
|
+
}>>, {}, true, {}, {}, {
|
|
1198
|
+
P: {};
|
|
1199
|
+
B: {};
|
|
1200
|
+
D: {};
|
|
1201
|
+
C: {};
|
|
1202
|
+
M: {};
|
|
1203
|
+
Defaults: {};
|
|
1204
|
+
}, Readonly< ExtractPropTypes<{
|
|
1205
|
+
selectedRowKeys: {
|
|
1206
|
+
type: PropType<any[]>;
|
|
1207
|
+
};
|
|
1208
|
+
clearAll: {
|
|
1209
|
+
type: PropType<() => void>;
|
|
1210
|
+
};
|
|
1211
|
+
}>>, {}, {}, {}, {}, {}>;
|
|
1212
|
+
__isFragment?: never;
|
|
1213
|
+
__isTeleport?: never;
|
|
1214
|
+
__isSuspense?: never;
|
|
1215
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
1216
|
+
selectedRowKeys: {
|
|
1217
|
+
type: PropType<any[]>;
|
|
1218
|
+
};
|
|
1219
|
+
clearAll: {
|
|
1220
|
+
type: PropType<() => void>;
|
|
1221
|
+
};
|
|
1222
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
1223
|
+
$slots: {
|
|
1224
|
+
prefix?(_: {}): any;
|
|
1225
|
+
suffix?(_: {}): any;
|
|
1226
|
+
};
|
|
1227
|
+
});
|