@aplus-frontend/ui 0.1.9 → 0.1.11
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 +77 -75
- package/es/src/ap-download/ap-download.vue.d.ts +2 -2
- package/es/src/ap-download/ap-download.vue.mjs +30 -33
- package/es/src/ap-download/hooks/useStyle.d.ts +6 -0
- package/es/src/ap-download/hooks/useStyle.mjs +22 -0
- package/es/src/ap-download/index.mjs +4 -1
- package/es/src/ap-download/interface.d.ts +29 -6
- package/es/src/ap-download/interface.mjs +4 -1
- package/es/src/ap-download/utils/getFileInfo.d.ts +9 -0
- package/es/src/ap-download/utils/getFileInfo.mjs +44 -0
- package/es/src/ap-field/interface.d.ts +4 -0
- package/es/src/ap-field/select/index.vue.d.ts +6 -0
- package/es/src/ap-field/select/index.vue.mjs +36 -31
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.mjs +33 -23
- package/es/src/ap-table/ap-table.vue.mjs +158 -147
- package/es/src/ap-table/constants.d.ts +26 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/es/src/ap-table/hooks/use-table-paging.mjs +63 -63
- package/es/src/ap-table/interface.d.ts +13 -1
- package/es/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -2
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +69 -66
- package/es/src/business/ap-export-group/interface.d.ts +13 -3
- package/es/src/business/ap-export-group/interface.mjs +2 -2
- package/es/src/business/ap-label/ApLabel.vue2.mjs +18 -17
- package/es/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/es/src/business/ap-label/ApLabelGroup.mjs +17 -23
- package/es/src/business/ap-label/constans.d.ts +10 -2
- package/es/src/business/ap-label/constans.mjs +8 -0
- package/es/src/business/ap-label/interface.d.ts +13 -8
- package/es/src/business/ap-select-layout/index.css +1 -1
- package/es/src/business/index.d.ts +60 -5
- package/es/src/index.mjs +72 -70
- package/es/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/es/src/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.d.ts +2 -2
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/useStyle.d.ts +6 -0
- package/lib/src/ap-download/hooks/useStyle.js +1 -0
- package/lib/src/ap-download/index.js +1 -1
- package/lib/src/ap-download/interface.d.ts +29 -6
- package/lib/src/ap-download/interface.js +1 -1
- package/lib/src/ap-download/utils/getFileInfo.d.ts +9 -0
- package/lib/src/ap-download/utils/getFileInfo.js +1 -0
- package/lib/src/ap-field/interface.d.ts +4 -0
- package/lib/src/ap-field/select/index.vue.d.ts +6 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +26 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +13 -1
- package/lib/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -2
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/interface.d.ts +13 -3
- package/lib/src/business/ap-export-group/interface.js +1 -1
- package/lib/src/business/ap-label/ApLabel.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +10 -2
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +13 -8
- package/lib/src/business/ap-select-layout/index.css +1 -1
- package/lib/src/business/index.d.ts +60 -5
- package/lib/src/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/lib/src/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/package.json +3 -3
package/es/index.mjs
CHANGED
|
@@ -5,11 +5,11 @@ import { configProviderProps as x } from "./src/config-provider/config-provider-
|
|
|
5
5
|
import { configProviderContextKey as u, tableDefaultConfig as n } 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 b, localeContextKey as I, 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 h, namespaceContextKey as R, useGetDerivedNamespace as v, useNamespace as G } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { ConfigProvider as w, globalConfigCached as B } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as L } from "./src/config-provider/index.mjs";
|
|
11
|
-
import { Scrollbar as
|
|
12
|
-
import { CollapseContainer as
|
|
11
|
+
import { Scrollbar as y } from "./src/scroll-bar/index.mjs";
|
|
12
|
+
import { CollapseContainer as K, ScrollContainer as X } from "./src/container/index.mjs";
|
|
13
13
|
import { IconPicker as O } from "./src/icon-picker/index.mjs";
|
|
14
14
|
import { default as W } from "./src/locale/lang/zh-cn.mjs";
|
|
15
15
|
import { default as U } from "./src/locale/lang/en.mjs";
|
|
@@ -21,14 +21,14 @@ 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 Io, isSlotFormSchema as go } from "./src/pro-form/types/form.mjs";
|
|
24
|
-
import { Field as
|
|
24
|
+
import { Field as Do } from "./src/pro-form/index.mjs";
|
|
25
25
|
import { default as Ro } from "./src/pro-form/components/api-cascader.vue.mjs";
|
|
26
26
|
import { default as Go } from "./src/pro-form/components/api-radio-group.vue.mjs";
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
27
|
+
import { default as wo } from "./src/pro-form/components/api-select.vue.mjs";
|
|
28
|
+
import { default as ko } from "./src/pro-form/components/api-transfer.vue.mjs";
|
|
29
|
+
import { default as No } from "./src/pro-form/components/api-tree.vue.mjs";
|
|
30
|
+
import { default as Eo } from "./src/pro-form/components/radio-button-group.vue.mjs";
|
|
31
|
+
import { default as Xo } from "./src/pro-form/pro-form.vue.mjs";
|
|
32
32
|
import { default as Oo } from "./src/pro-form/components/api-tree-select.vue.mjs";
|
|
33
33
|
import { default as Wo } from "./src/pro-form/table-form.vue.mjs";
|
|
34
34
|
import { default as Uo } from "./src/pro-form/table-form-inner.vue.mjs";
|
|
@@ -47,13 +47,13 @@ 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 Ie } 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 he } from "./src/pro-table/hooks/use-table.mjs";
|
|
51
51
|
import { ApFormItemText as ve } from "./src/ap-form/items/text/index.mjs";
|
|
52
52
|
import { default as Me } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
53
|
-
import { default as
|
|
53
|
+
import { default as Be } 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
|
-
import { default as
|
|
56
|
-
import { default as
|
|
55
|
+
import { default as ye } from "./src/ap-form/items/date-range/index.vue.mjs";
|
|
56
|
+
import { default as Ke } from "./src/ap-form/items/radio/index.vue.mjs";
|
|
57
57
|
import { default as Ye } from "./src/ap-form/items/select/index.vue.mjs";
|
|
58
58
|
import { default as He } from "./src/ap-form/items/switch/index.vue.mjs";
|
|
59
59
|
import { default as ze } from "./src/ap-form/items/checkbox/index.vue.mjs";
|
|
@@ -74,13 +74,13 @@ 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 Ir } 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 hr } from "./src/ap-field/text/password.vue.mjs";
|
|
78
78
|
import { default as vr } from "./src/ap-field/slider/index.vue.mjs";
|
|
79
79
|
import { default as Mr } from "./src/ap-field/segmented/index.vue.mjs";
|
|
80
|
-
import { default as
|
|
81
|
-
import { adminToken as Lr, aplusToken as
|
|
82
|
-
import { ApActionItem as
|
|
83
|
-
import { default as
|
|
80
|
+
import { default as Br } from "./src/ap-field/rate/index.vue.mjs";
|
|
81
|
+
import { adminToken as Lr, aplusToken as Nr } from "./src/design-token/index.mjs";
|
|
82
|
+
import { ApActionItem as Er } from "./src/ap-action/index.mjs";
|
|
83
|
+
import { default as Xr } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
84
84
|
import { default as Or } from "./src/ap-action/item-popconfirm/index.vue.mjs";
|
|
85
85
|
import { default as Wr } from "./src/ap-action/item-dropdown/index.vue.mjs";
|
|
86
86
|
import { default as Ur } from "./src/ap-action/group/index.vue.mjs";
|
|
@@ -96,19 +96,20 @@ 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
97
|
import { NeedNameKeyDefault as ut } from "./src/ap-upload/apUploadTypes.mjs";
|
|
98
98
|
import { default as At } from "./src/ap-upload/apUpload.vue.mjs";
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import { default as Ht } from "./src/
|
|
108
|
-
import { default as zt } from "./src/editable-table/
|
|
109
|
-
import { default as Vt } from "./src/
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
99
|
+
import { ApDownLoadNeedNameKeyDefault as Ft } from "./src/ap-download/interface.mjs";
|
|
100
|
+
import { default as Ct } from "./src/ap-download/ap-download.vue.mjs";
|
|
101
|
+
import { CheckCard as bt } from "./src/check-card/index.mjs";
|
|
102
|
+
import { default as gt } from "./src/check-card/group.vue.mjs";
|
|
103
|
+
import { ApModal as Dt } from "./src/ap-modal/index.mjs";
|
|
104
|
+
import { default as Rt } from "./src/ap-list/index.vue.mjs";
|
|
105
|
+
import { ApBatchAction as Gt, ApExpandAlert as Mt, ApExportGroup as wt, ApInputRadio as Bt, ApLabel as kt, ApLabelGroup as Lt, ApSelectLayout as Nt, ApStatus as yt, ApStatusGroup as Et, ApTitle as Kt } from "./src/business/index.mjs";
|
|
106
|
+
import { useTablePaging as Yt } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
107
|
+
import { default as Ht } from "./src/ap-table/ap-table.vue.mjs";
|
|
108
|
+
import { default as zt } from "./src/editable-table/index.vue.mjs";
|
|
109
|
+
import { default as Vt } from "./src/editable-table/form-item.vue.mjs";
|
|
110
|
+
import { default as jt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
111
|
+
import { useMessage as Jt } from "./src/hooks/useMessage.mjs";
|
|
112
|
+
import { useControllableValue as Zt } from "./src/hooks/useControllableValue.mjs";
|
|
112
113
|
const p = {
|
|
113
114
|
install: (r) => {
|
|
114
115
|
for (const t in e) {
|
|
@@ -120,25 +121,26 @@ const p = {
|
|
|
120
121
|
export {
|
|
121
122
|
L as APConfigProvider,
|
|
122
123
|
Ur as ApActionGroup,
|
|
123
|
-
|
|
124
|
+
Er as ApActionItem,
|
|
124
125
|
Wr as ApActionItemDropdown,
|
|
125
|
-
|
|
126
|
+
Xr as ApActionItemModal,
|
|
126
127
|
Or as ApActionItemPopconfirm,
|
|
127
|
-
|
|
128
|
+
Gt as ApBatchAction,
|
|
128
129
|
Qr as ApCustomColumn,
|
|
129
130
|
_r as ApCustomSelect,
|
|
130
|
-
|
|
131
|
-
Ft as
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
jt as ApDescriptions,
|
|
132
|
+
Ft as ApDownLoadNeedNameKeyDefault,
|
|
133
|
+
Ct as ApDownload,
|
|
134
|
+
Mt as ApExpandAlert,
|
|
135
|
+
wt as ApExportGroup,
|
|
134
136
|
fr as ApField,
|
|
135
137
|
dr as ApFieldCheckbox,
|
|
136
138
|
ir as ApFieldDate,
|
|
137
139
|
Ir as ApFieldDateRange,
|
|
138
140
|
nr as ApFieldNumber,
|
|
139
|
-
|
|
141
|
+
hr as ApFieldPassword,
|
|
140
142
|
cr as ApFieldRadio,
|
|
141
|
-
|
|
143
|
+
Br as ApFieldRate,
|
|
142
144
|
Mr as ApFieldSegmented,
|
|
143
145
|
Pr as ApFieldSelect,
|
|
144
146
|
vr as ApFieldSlider,
|
|
@@ -149,10 +151,10 @@ export {
|
|
|
149
151
|
Je as ApFormItem,
|
|
150
152
|
ze as ApFormItemCheckbox,
|
|
151
153
|
Le as ApFormItemDate,
|
|
152
|
-
|
|
154
|
+
ye as ApFormItemDateRange,
|
|
153
155
|
Ze as ApFormItemGroup,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
Be as ApFormItemNumber,
|
|
157
|
+
Ke as ApFormItemRadio,
|
|
156
158
|
Ye as ApFormItemSelect,
|
|
157
159
|
He as ApFormItemSwitch,
|
|
158
160
|
ve as ApFormItemText,
|
|
@@ -162,35 +164,35 @@ export {
|
|
|
162
164
|
ar as ApFormModalForm,
|
|
163
165
|
rr as ApFormSearchForm,
|
|
164
166
|
xt as ApInfoLayout,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
167
|
+
Bt as ApInputRadio,
|
|
168
|
+
kt as ApLabel,
|
|
169
|
+
Lt as ApLabelGroup,
|
|
170
|
+
Rt as ApList,
|
|
171
|
+
Dt as ApModal,
|
|
172
|
+
Nt as ApSelectLayout,
|
|
173
|
+
yt as ApStatus,
|
|
174
|
+
Et as ApStatusGroup,
|
|
175
|
+
Ht as ApTable,
|
|
174
176
|
mt as ApTag,
|
|
175
177
|
st as ApTagGroup,
|
|
176
|
-
|
|
178
|
+
Kt as ApTitle,
|
|
177
179
|
At as ApUpload,
|
|
178
180
|
Ro as ApiCascader,
|
|
179
181
|
Go as ApiRadioGroup,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
wo as ApiSelect,
|
|
183
|
+
ko as ApiTransfer,
|
|
184
|
+
No as ApiTree,
|
|
183
185
|
Oo as ApiTreeSelect,
|
|
184
186
|
Qo as BaseButton,
|
|
185
187
|
fe as BaseModal,
|
|
186
188
|
$ as BasicArrow,
|
|
187
189
|
j as BasicHelp,
|
|
188
190
|
q as BasicTitle,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
bt as CheckCard,
|
|
192
|
+
gt as CheckCardGroup,
|
|
193
|
+
K as CollapseContainer,
|
|
192
194
|
Q as CollapseTransition,
|
|
193
|
-
|
|
195
|
+
w as ConfigProvider,
|
|
194
196
|
xe as CountdownButton,
|
|
195
197
|
ie as CountdownInput,
|
|
196
198
|
le as CropperAvatar,
|
|
@@ -199,30 +201,30 @@ export {
|
|
|
199
201
|
et as DictCode,
|
|
200
202
|
ce as Dropdown,
|
|
201
203
|
Ie as EditTableHeaderIcon,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
+
zt as EditableTable,
|
|
205
|
+
Vt as EditableTableFormItem,
|
|
204
206
|
_ as ExpandTransition,
|
|
205
207
|
oo as ExpandXTransition,
|
|
206
208
|
eo as FadeTransition,
|
|
207
|
-
|
|
209
|
+
Do as Field,
|
|
208
210
|
l as Icon,
|
|
209
211
|
O as IconPicker,
|
|
210
212
|
$o as ModalButton,
|
|
211
213
|
ut as NeedNameKeyDefault,
|
|
212
214
|
qo as PopConfirmButton,
|
|
213
|
-
|
|
215
|
+
Xo as ProForm,
|
|
214
216
|
Te as ProTable,
|
|
215
217
|
Wo as ProTableForm,
|
|
216
218
|
Uo as ProTableFormInner,
|
|
217
|
-
|
|
219
|
+
Eo as RadioButtonGroup,
|
|
218
220
|
ro as ScaleRotateTransition,
|
|
219
221
|
to as ScaleTransition,
|
|
220
|
-
|
|
222
|
+
X as ScrollContainer,
|
|
221
223
|
ao as ScrollXReverseTransition,
|
|
222
224
|
po as ScrollXTransition,
|
|
223
225
|
fo as ScrollYReverseTransition,
|
|
224
226
|
mo as ScrollYTransition,
|
|
225
|
-
|
|
227
|
+
y as Scrollbar,
|
|
226
228
|
lo as SlideXReverseTransition,
|
|
227
229
|
so as SlideXTransition,
|
|
228
230
|
xo as SlideYReverseTransition,
|
|
@@ -233,7 +235,7 @@ export {
|
|
|
233
235
|
Pe as TableImg,
|
|
234
236
|
pt as WorkOrderModal,
|
|
235
237
|
Lr as adminToken,
|
|
236
|
-
|
|
238
|
+
Nr as aplusToken,
|
|
237
239
|
S as buildLocaleContext,
|
|
238
240
|
b as buildTranslator,
|
|
239
241
|
u as configProviderContextKey,
|
|
@@ -241,10 +243,10 @@ export {
|
|
|
241
243
|
ne as createPrompt,
|
|
242
244
|
tt as createWorkOrderModal,
|
|
243
245
|
p as default,
|
|
244
|
-
|
|
246
|
+
h as defaultNamespace,
|
|
245
247
|
U as en,
|
|
246
248
|
$r as generateTableList,
|
|
247
|
-
|
|
249
|
+
B as globalConfigCached,
|
|
248
250
|
Io as isComponentFormSchema,
|
|
249
251
|
go as isSlotFormSchema,
|
|
250
252
|
c as keysOf,
|
|
@@ -255,18 +257,18 @@ export {
|
|
|
255
257
|
g as translate,
|
|
256
258
|
qr as useCacheColumnSetting,
|
|
257
259
|
To as useComponentRegister,
|
|
258
|
-
|
|
260
|
+
Zt as useControllableValue,
|
|
259
261
|
no as useDescription,
|
|
260
262
|
So as useForm,
|
|
261
263
|
v as useGetDerivedNamespace,
|
|
262
264
|
T as useGlobalConfig,
|
|
263
265
|
P as useLocale,
|
|
264
|
-
|
|
266
|
+
Jt as useMessage,
|
|
265
267
|
te as useModal,
|
|
266
268
|
ee as useModalContext,
|
|
267
269
|
ae as useModalInner,
|
|
268
270
|
G as useNamespace,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
+
he as useTable,
|
|
272
|
+
Yt as useTablePaging,
|
|
271
273
|
W as zhCn
|
|
272
274
|
};
|
|
@@ -3,11 +3,11 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes,
|
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
icon?(_: {}): any;
|
|
5
5
|
};
|
|
6
|
-
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps
|
|
6
|
+
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps<Record<string, string>>>, {
|
|
7
7
|
size: string;
|
|
8
8
|
color: string;
|
|
9
9
|
disabled: boolean;
|
|
10
|
-
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps
|
|
10
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps<Record<string, string>>>, {
|
|
11
11
|
size: string;
|
|
12
12
|
color: string;
|
|
13
13
|
disabled: boolean;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, computed as a, unref as s, openBlock as _, createElementBlock as C, normalizeStyle as y, normalizeClass as n, createElementVNode as t, renderSlot as w, toDisplayString as z } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
|
-
import { useOssInit as
|
|
3
|
+
import { useOssInit as N } from "./hooks/index.mjs";
|
|
4
4
|
import "./style/ap-download.css";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
5
|
+
import { getFileInfo as O } from "./utils/getFileInfo.mjs";
|
|
6
|
+
import { useStyle as S } from "./hooks/useStyle.mjs";
|
|
7
|
+
import { useLocale as b } from "../config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { useGlobalConfig as h } from "../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
const A = { class: "icon" }, B = { class: "text" }, W = /* @__PURE__ */ g({
|
|
9
10
|
name: "ApDownload",
|
|
10
11
|
__name: "ap-download",
|
|
11
12
|
props: {
|
|
@@ -14,43 +15,39 @@ const W = { class: "icon" }, D = { class: "text" }, j = /* @__PURE__ */ y({
|
|
|
14
15
|
size: { default: "middle" },
|
|
15
16
|
disabled: { type: Boolean, default: !1 },
|
|
16
17
|
fileName: {},
|
|
18
|
+
needName: { type: [Boolean, Object] },
|
|
17
19
|
getOssAccess: {}
|
|
18
20
|
},
|
|
19
21
|
setup(l) {
|
|
20
|
-
const { lang:
|
|
21
|
-
|
|
22
|
-
e.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}), w = async () => {
|
|
33
|
-
t.disabled || await (await k(
|
|
34
|
-
t.getOssAccess,
|
|
35
|
-
z(c)
|
|
36
|
-
)).downloadFile(t.fileName);
|
|
22
|
+
const { lang: r } = b(), c = a(() => r.value === "zh-cn" ? "zh_CN" : "en_US"), e = l, i = h("apUpload"), { wrapperStyle: p, getWrapperClass: d, getInnerWrapperClass: m } = S(
|
|
23
|
+
e.color,
|
|
24
|
+
e.size,
|
|
25
|
+
e.disabled
|
|
26
|
+
), f = a(() => {
|
|
27
|
+
var o;
|
|
28
|
+
return e.getOssAccess || ((o = i.value) == null ? void 0 : o.getOssAccess);
|
|
29
|
+
}), u = async () => {
|
|
30
|
+
e.disabled || await (await N(
|
|
31
|
+
f.value,
|
|
32
|
+
s(c)
|
|
33
|
+
)).downloadFile(O(e.needName, e.fileName));
|
|
37
34
|
};
|
|
38
|
-
return (
|
|
39
|
-
style:
|
|
40
|
-
class:
|
|
41
|
-
onClick:
|
|
35
|
+
return (o, F) => (_(), C("span", {
|
|
36
|
+
style: y(s(p)),
|
|
37
|
+
class: n(s(d)),
|
|
38
|
+
onClick: u
|
|
42
39
|
}, [
|
|
43
|
-
|
|
44
|
-
class:
|
|
40
|
+
t("span", {
|
|
41
|
+
class: n(s(m))
|
|
45
42
|
}, [
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
t("span", A, [
|
|
44
|
+
w(o.$slots, "icon")
|
|
48
45
|
]),
|
|
49
|
-
|
|
46
|
+
t("span", B, z(o.text), 1)
|
|
50
47
|
], 2)
|
|
51
48
|
], 6));
|
|
52
49
|
}
|
|
53
50
|
});
|
|
54
51
|
export {
|
|
55
|
-
|
|
52
|
+
W as default
|
|
56
53
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { computed as o } from "vue";
|
|
2
|
+
import { getHexWithOpacity as u } from "../utils/getFileInfo.mjs";
|
|
3
|
+
import "../../config-provider/index.mjs";
|
|
4
|
+
import { useNamespace as d } from "../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
import { useGlobalConfig as c } from "../../config-provider/hooks/use-global-config.mjs";
|
|
6
|
+
function h(p, n, t) {
|
|
7
|
+
const { b: a, bm: r } = d("ap-download"), i = c("uiMode"), s = o(() => ({
|
|
8
|
+
"--download-main-color": p,
|
|
9
|
+
"--download-main-color-opacity": u(p, 0.6)
|
|
10
|
+
})), l = o(() => [a("wrapper"), r("wrapper", n)].filter(Boolean)), m = o(() => {
|
|
11
|
+
const e = [a("inner-wrapper"), r("inner-wrapper", n)];
|
|
12
|
+
return t && (i.value === "aplus" ? e.push(r("inner-wrapper", "disabled")) : e.push(r("inner-wrapper", "disabled-admin"))), e;
|
|
13
|
+
});
|
|
14
|
+
return {
|
|
15
|
+
wrapperStyle: s,
|
|
16
|
+
getWrapperClass: l,
|
|
17
|
+
getInnerWrapperClass: m
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
h as useStyle
|
|
22
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { accessCreate } from '@aplus-frontend/oss';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* 类型转换为单例和数组
|
|
4
|
+
*/
|
|
5
|
+
type TypeToSingleAndArray<Type = any> = Type extends any ? Type | Type[] : never;
|
|
6
|
+
export interface ApDownLoadProps<FileNameType extends Record<string, string> = Record<string, string>> {
|
|
3
7
|
/**
|
|
4
8
|
* 标签内容
|
|
5
9
|
*/
|
|
@@ -17,9 +21,28 @@ export interface ApDownLoadProps {
|
|
|
17
21
|
* @default false
|
|
18
22
|
*/
|
|
19
23
|
disabled?: boolean;
|
|
20
|
-
fileName:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
fileName: TypeToSingleAndArray<string | FileNameType>;
|
|
25
|
+
/**
|
|
26
|
+
* 是否需要fileName别名
|
|
27
|
+
* 默认false
|
|
28
|
+
* 可以传配置项nameKey,pathKey
|
|
29
|
+
* 默认为name,path
|
|
30
|
+
*/
|
|
31
|
+
needName?: ApDownLoadNeedNameModel;
|
|
32
|
+
getOssAccess?: () => Promise<accessCreate>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 别名配置项
|
|
36
|
+
*/
|
|
37
|
+
export type ApDownLoadNeedNameModel = boolean | {
|
|
38
|
+
nameKey?: string;
|
|
39
|
+
pathKey?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* 别名默认值
|
|
43
|
+
*/
|
|
44
|
+
export declare enum ApDownLoadNeedNameKeyDefault {
|
|
45
|
+
nameKey = "name",
|
|
46
|
+
pathKey = "path"
|
|
25
47
|
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApDownLoadNeedNameModel } from '../interface';
|
|
2
|
+
/**
|
|
3
|
+
* 根据needName将fileName转换为OSS下载格式
|
|
4
|
+
*/
|
|
5
|
+
export declare function getFileInfo(needName?: ApDownLoadNeedNameModel, fileName?: any): any;
|
|
6
|
+
/**
|
|
7
|
+
* 根据hexColor颜色和opacity透明度计算rgba颜色数值,返回
|
|
8
|
+
*/
|
|
9
|
+
export declare function getHexWithOpacity(hexColor: string, opacity: number): string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ApDownLoadNeedNameKeyDefault as y } from "../interface.mjs";
|
|
2
|
+
function K(t, r) {
|
|
3
|
+
if (t === !0) {
|
|
4
|
+
if (typeof r == "string")
|
|
5
|
+
return r;
|
|
6
|
+
if (Array.isArray(r))
|
|
7
|
+
return r.map((p) => ({
|
|
8
|
+
path: p == null ? void 0 : p[y.pathKey],
|
|
9
|
+
fileName: p == null ? void 0 : p[y.pathKey]
|
|
10
|
+
}));
|
|
11
|
+
if (typeof r == "object")
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
path: r == null ? void 0 : r[y.pathKey],
|
|
15
|
+
fileName: r == null ? void 0 : r[y.pathKey]
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
} else if (typeof t == "object") {
|
|
19
|
+
if (typeof r == "string")
|
|
20
|
+
return r;
|
|
21
|
+
if (Array.isArray(r))
|
|
22
|
+
return r.map((p) => ({
|
|
23
|
+
path: p == null ? void 0 : p[(t == null ? void 0 : t.pathKey) || y.pathKey],
|
|
24
|
+
fileName: p == null ? void 0 : p[(t == null ? void 0 : t.nameKey) || y.pathKey]
|
|
25
|
+
}));
|
|
26
|
+
if (typeof r == "object")
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
path: r == null ? void 0 : r[(t == null ? void 0 : t.pathKey) || y.pathKey],
|
|
30
|
+
fileName: r == null ? void 0 : r[(t == null ? void 0 : t.nameKey) || y.pathKey]
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
} else
|
|
34
|
+
return r;
|
|
35
|
+
}
|
|
36
|
+
function g(t, r) {
|
|
37
|
+
t.length === 4 && (t = `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`);
|
|
38
|
+
const p = parseInt(t.slice(1, 3), 16), s = parseInt(t.slice(3, 5), 16), u = parseInt(t.slice(5, 7), 16), c = Math.round(r * 255).toString(16).padStart(2, "0");
|
|
39
|
+
return `#${p.toString(16).padStart(2, "0")}${s.toString(16).padStart(2, "0")}${u.toString(16).padStart(2, "0")}${c}`;
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
K as getFileInfo,
|
|
43
|
+
g as getHexWithOpacity
|
|
44
|
+
};
|
|
@@ -109,6 +109,10 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
|
|
|
109
109
|
* 是否在Select框聚焦时再次触发选项请求
|
|
110
110
|
*/
|
|
111
111
|
refetchOnFocus?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* 是否延迟请求选项列表
|
|
114
|
+
*/
|
|
115
|
+
lazy?: boolean;
|
|
112
116
|
};
|
|
113
117
|
export type ApFieldSelectExpose = {
|
|
114
118
|
focus: () => void;
|
|
@@ -36,6 +36,8 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
36
36
|
labelInValue: undefined;
|
|
37
37
|
multiple: undefined;
|
|
38
38
|
searchMode: string;
|
|
39
|
+
refetchOnFocus: boolean;
|
|
40
|
+
lazy: boolean;
|
|
39
41
|
}>, {
|
|
40
42
|
focus: typeof focus;
|
|
41
43
|
blur: typeof blur;
|
|
@@ -60,6 +62,8 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
60
62
|
labelInValue: undefined;
|
|
61
63
|
multiple: undefined;
|
|
62
64
|
searchMode: string;
|
|
65
|
+
refetchOnFocus: boolean;
|
|
66
|
+
lazy: boolean;
|
|
63
67
|
}>>> & {
|
|
64
68
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
65
69
|
}, {
|
|
@@ -78,8 +82,10 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
78
82
|
defaultActiveFirstOption: boolean;
|
|
79
83
|
labelInValue: boolean;
|
|
80
84
|
multiple: boolean;
|
|
85
|
+
lazy: boolean;
|
|
81
86
|
emptyText: string;
|
|
82
87
|
searchMode: "filter" | "request";
|
|
88
|
+
refetchOnFocus: boolean;
|
|
83
89
|
}, {}>;
|
|
84
90
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
85
91
|
export default _default;
|