@aplus-frontend/ui 0.4.32 → 0.4.34
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 +119 -117
- package/es/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
- package/es/src/ap-button/ap-confirm-button.vue.mjs +56 -0
- package/es/src/ap-button/ap-confirm-button.vue2.mjs +4 -0
- package/es/src/ap-button/index.d.ts +2 -1
- package/es/src/ap-button/index.mjs +1 -0
- package/es/src/ap-button/interface.d.ts +6 -1
- package/es/src/ap-button/utils/index.d.ts +2 -0
- package/es/src/ap-button/utils/index.mjs +36 -16
- package/es/src/ap-modal/utils/createModal.mjs +44 -34
- package/es/src/index.mjs +109 -107
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
- package/lib/src/ap-button/ap-confirm-button.vue.js +1 -0
- package/lib/src/ap-button/ap-confirm-button.vue2.js +1 -0
- package/lib/src/ap-button/index.d.ts +2 -1
- package/lib/src/ap-button/index.js +1 -1
- package/lib/src/ap-button/interface.d.ts +6 -1
- package/lib/src/ap-button/utils/index.d.ts +2 -0
- package/lib/src/ap-button/utils/index.js +1 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/index.js +1 -1
- package/package.json +3 -3
- package/theme/antd-global-overwrite/admin/index.css +7 -0
- package/theme/antd-global-overwrite/admin/modal.css +7 -0
- package/theme/antd-global-overwrite/admin/modal.less +9 -0
- package/theme/antd-global-overwrite/aplus/index.css +7 -0
- package/theme/antd-global-overwrite/aplus/modal.css +7 -0
- package/theme/antd-global-overwrite/aplus/modal.less +9 -0
- package/theme/ap-form/ap-form-item.css +3 -0
- package/theme/ap-form/ap-form-item.less +9 -0
- package/theme/ap-form/index.css +3 -0
- package/theme/ap-form/search-form.css +3 -0
- package/theme/ap-table/ap-table.css +3 -0
- package/theme/ap-table-modal/index.css +3 -0
- package/theme/editable-table/index.css +3 -0
- package/theme/index.css +3 -0
package/es/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { buildLocaleContext as T, buildTranslator as S, localeContextKey as C, t
|
|
|
8
8
|
import { defaultNamespace as G, namespaceContextKey as P, useGetDerivedNamespace as R, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
import { ConfigProvider as L, globalConfigCached as N } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as w } from "./src/config-provider/index.mjs";
|
|
11
|
-
import { ApFormItemText as
|
|
11
|
+
import { ApFormItemText as B } from "./src/ap-form/items/text/index.mjs";
|
|
12
12
|
import { default as K } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
13
13
|
import { default as U } from "./src/ap-form/items/number/index.vue.mjs";
|
|
14
14
|
import { default as V } from "./src/ap-form/items/date/index.vue.mjs";
|
|
@@ -35,7 +35,7 @@ import { ApFieldText as Re } from "./src/ap-field/text/index.mjs";
|
|
|
35
35
|
import { default as Ee } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
36
36
|
import { default as Ne } from "./src/ap-field/date/index.vue.mjs";
|
|
37
37
|
import { default as we } from "./src/ap-field/number/index.vue.mjs";
|
|
38
|
-
import { default as
|
|
38
|
+
import { default as Be } from "./src/ap-field/radio/index.vue.mjs";
|
|
39
39
|
import { default as Ke } from "./src/ap-field/switch/index.vue.mjs";
|
|
40
40
|
import { default as Ue } from "./src/ap-field/text-area/index.vue.mjs";
|
|
41
41
|
import { default as Ve } from "./src/ap-field/date-range/index.vue.mjs";
|
|
@@ -61,63 +61,64 @@ import { default as Mo } from "./src/ap-upload/apUpload.vue.mjs";
|
|
|
61
61
|
import { ApDownLoadNeedNameKeyDefault as Lo } from "./src/ap-download/interface.mjs";
|
|
62
62
|
import { default as yo } from "./src/ap-download/ap-download.vue.mjs";
|
|
63
63
|
import { CheckCard as vo } from "./src/check-card/index.mjs";
|
|
64
|
-
import { default as
|
|
64
|
+
import { default as ko } from "./src/check-card/group.vue.mjs";
|
|
65
65
|
import { ApModal as Oo } from "./src/ap-modal/index.mjs";
|
|
66
66
|
import { default as zo } from "./src/ap-list/index.vue.mjs";
|
|
67
67
|
import { default as Wo } from "./src/ap-button/ap-button.vue.mjs";
|
|
68
68
|
import { default as Ho } from "./src/ap-button/ap-action-button.vue.mjs";
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import { default as lt } from "./src/business/
|
|
101
|
-
import { default as dt } from "./src/business/batch-input-group/
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import { default as Tt } from "./src/editable-table/
|
|
107
|
-
import { default as Ct } from "./src/
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import { default as Rt } from "./src/scroll-bar/
|
|
111
|
-
import { default as Et } from "./src/scroll-
|
|
112
|
-
import { default as Nt } from "./src/
|
|
113
|
-
import { default as wt } from "./src/
|
|
114
|
-
import { default as
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
69
|
+
import { default as jo } from "./src/ap-button/ap-confirm-button.vue.mjs";
|
|
70
|
+
import { ApDrawer as Jo } from "./src/ap-drawer/index.mjs";
|
|
71
|
+
import { ApTransformDataHelper as Xo } from "./src/utils/ap-trans-data/index.mjs";
|
|
72
|
+
import { default as Zo } from "./src/business/ap-table-modal/index.mjs";
|
|
73
|
+
import { useTableModal as or } from "./src/business/ap-table-modal/hooks/use-table-modal.mjs";
|
|
74
|
+
import { useTableSelectModal as tr } from "./src/business/ap-table-modal/hooks/use-table-select-modal.mjs";
|
|
75
|
+
import { ApAttachment as ar } from "./src/business/ap-attachment/index.mjs";
|
|
76
|
+
import { ApBatchAction as mr } from "./src/business/ap-batch-action/index.mjs";
|
|
77
|
+
import { ApBatchActionGroup as xr } from "./src/business/ap-batch-action-group/index.mjs";
|
|
78
|
+
import { ApButtonGroup as ur } from "./src/business/ap-button-group/index.mjs";
|
|
79
|
+
import { ApCard as Ar } from "./src/business/ap-card/index.mjs";
|
|
80
|
+
import { ApExpandAlert as ir } from "./src/business/ap-expand-alert/index.mjs";
|
|
81
|
+
import { ApExportGroupActionType as Fr } from "./src/business/ap-export-group/interface.mjs";
|
|
82
|
+
import { ApExportGroup as br } from "./src/business/ap-export-group/index.mjs";
|
|
83
|
+
import { handleExportDownload as Sr } from "./src/business/ap-export-group/handleExportDownload.mjs";
|
|
84
|
+
import { convertExportField as Dr } from "./src/business/ap-export-group/convertExportField.mjs";
|
|
85
|
+
import { ApImage as hr } from "./src/business/ap-image/index.mjs";
|
|
86
|
+
import { ApInputRadio as Pr } from "./src/business/ap-input-radio/index.mjs";
|
|
87
|
+
import { ApLabel as Mr, ApLabelGroup as Er } from "./src/business/ap-label/index.mjs";
|
|
88
|
+
import { locales as Nr } from "./src/business/ap-ladder/interface.mjs";
|
|
89
|
+
import { ApLadder as wr } from "./src/business/ap-ladder/index.mjs";
|
|
90
|
+
import { ApSelectLayout as Br } from "./src/business/ap-select-layout/index.mjs";
|
|
91
|
+
import { ApStatus as Kr, ApStatusGroup as Or } from "./src/business/ap-status/index.mjs";
|
|
92
|
+
import { ApTitle as zr } from "./src/business/ap-title/index.mjs";
|
|
93
|
+
import { usePageListApTable as Wr } from "./src/business/hooks/usePageListApTable.mjs";
|
|
94
|
+
import { useTableRefresh as Hr } from "./src/business/hooks/useTableRefresh.mjs";
|
|
95
|
+
import { computedRecords as jr, flattenColumns as qr, formatDataIndex as Jr, formatNumber as Qr } from "./src/business/ap-summary/utils.mjs";
|
|
96
|
+
import { ApSummary as Yr } from "./src/business/ap-summary/index.mjs";
|
|
97
|
+
import { ApNeedNameKeyDefault as et } from "./src/business/ap-appendix/interface.mjs";
|
|
98
|
+
import { ApAppendix as rt } from "./src/business/ap-appendix/index.mjs";
|
|
99
|
+
import { ApExtensionSelect as pt, ApGroupSearch as at, ApPopoverSelect as ft } from "./src/business/ap-group-search/index.mjs";
|
|
100
|
+
import { default as lt } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
|
|
101
|
+
import { default as dt } from "./src/business/batch-input-group/index.vue.mjs";
|
|
102
|
+
import { default as st } from "./src/business/batch-input-group/form-item.vue.mjs";
|
|
103
|
+
import { ApSizeInput as nt } from "./src/business/ap-size-input/index.mjs";
|
|
104
|
+
import { useTablePaging as ct } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
105
|
+
import { ApTable as It } from "./src/ap-table/index.mjs";
|
|
106
|
+
import { default as Tt } from "./src/editable-table/index.vue.mjs";
|
|
107
|
+
import { default as Ct } from "./src/editable-table/form-item.vue.mjs";
|
|
108
|
+
import { default as gt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
109
|
+
import { ensureRangeValue as Gt } from "./src/scroll-bar/utils/index.mjs";
|
|
110
|
+
import { default as Rt } from "./src/scroll-bar/index.vue.mjs";
|
|
111
|
+
import { default as Et } from "./src/scroll-bar/internal.vue.mjs";
|
|
112
|
+
import { default as Nt } from "./src/scroll-view/index.vue.mjs";
|
|
113
|
+
import { default as wt } from "./src/portal/index.vue.mjs";
|
|
114
|
+
import { default as Bt } from "./src/full-screen/index.vue.mjs";
|
|
115
|
+
import { default as Kt } from "./src/resize-observer/index.vue.mjs";
|
|
116
|
+
import { useMessage as Ut } from "./src/hooks/useMessage.mjs";
|
|
117
|
+
import { useControllableValue as Vt } from "./src/hooks/useControllableValue.mjs";
|
|
118
|
+
import { useManualRef as _t } from "./src/hooks/useManualRef.mjs";
|
|
119
|
+
import { useThrottleRef as $t } from "./src/hooks/useThrottleRef.mjs";
|
|
120
|
+
import { useFullScreen as qt } from "./src/hooks/useFullScreen.mjs";
|
|
121
|
+
import { useResize as Qt } from "./src/hooks/useResize.mjs";
|
|
121
122
|
const a = {
|
|
122
123
|
install: (r) => {
|
|
123
124
|
for (const t in o) {
|
|
@@ -134,28 +135,29 @@ export {
|
|
|
134
135
|
xo as ApActionItemDropdown,
|
|
135
136
|
ao as ApActionItemModal,
|
|
136
137
|
mo as ApActionItemPopconfirm,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
rt as ApAppendix,
|
|
139
|
+
ar as ApAttachment,
|
|
140
|
+
mr as ApBatchAction,
|
|
141
|
+
xr as ApBatchActionGroup,
|
|
141
142
|
Wo as ApButton,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
ur as ApButtonGroup,
|
|
144
|
+
Ar as ApCard,
|
|
145
|
+
jo as ApConfirmButton,
|
|
146
|
+
gt as ApDescriptions,
|
|
145
147
|
Lo as ApDownLoadNeedNameKeyDefault,
|
|
146
148
|
yo as ApDownload,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
Jo as ApDrawer,
|
|
150
|
+
ir as ApExpandAlert,
|
|
151
|
+
br as ApExportGroup,
|
|
152
|
+
Fr as ApExportGroupActionType,
|
|
153
|
+
pt as ApExtensionSelect,
|
|
152
154
|
Ge as ApField,
|
|
153
155
|
Ee as ApFieldCheckbox,
|
|
154
156
|
Ne as ApFieldDate,
|
|
155
157
|
Ve as ApFieldDateRange,
|
|
156
158
|
we as ApFieldNumber,
|
|
157
159
|
$e as ApFieldPassword,
|
|
158
|
-
|
|
160
|
+
Be as ApFieldRadio,
|
|
159
161
|
Ye as ApFieldRate,
|
|
160
162
|
Qe as ApFieldSegmented,
|
|
161
163
|
_e as ApFieldSelect,
|
|
@@ -168,7 +170,7 @@ export {
|
|
|
168
170
|
ne as ApFormDependency,
|
|
169
171
|
Ie as ApFormDrawerForm,
|
|
170
172
|
pe as ApFormItem,
|
|
171
|
-
|
|
173
|
+
st as ApFormItemBatchInput,
|
|
172
174
|
Y as ApFormItemCheckbox,
|
|
173
175
|
V as ApFormItemDate,
|
|
174
176
|
_ as ApFormItemDateRange,
|
|
@@ -178,7 +180,7 @@ export {
|
|
|
178
180
|
Ce as ApFormItemRender,
|
|
179
181
|
q as ApFormItemSelect,
|
|
180
182
|
Q as ApFormItemSwitch,
|
|
181
|
-
|
|
183
|
+
B as ApFormItemText,
|
|
182
184
|
K as ApFormItemTextArea,
|
|
183
185
|
ee as ApFormItemTextPassword,
|
|
184
186
|
le as ApFormList,
|
|
@@ -186,85 +188,85 @@ export {
|
|
|
186
188
|
ge as ApFormProvider,
|
|
187
189
|
de as ApFormSearchForm,
|
|
188
190
|
ce as ApFormSet,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
at as ApGroupSearch,
|
|
192
|
+
hr as ApImage,
|
|
191
193
|
ho as ApInfoLayout,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
Pr as ApInputRadio,
|
|
195
|
+
Mr as ApLabel,
|
|
196
|
+
Er as ApLabelGroup,
|
|
197
|
+
wr as ApLadder,
|
|
196
198
|
zo as ApList,
|
|
197
199
|
Oo as ApModal,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
et as ApNeedNameKeyDefault,
|
|
201
|
+
ft as ApPopoverSelect,
|
|
202
|
+
Br as ApSelectLayout,
|
|
203
|
+
nt as ApSizeInput,
|
|
204
|
+
Kr as ApStatus,
|
|
205
|
+
Or as ApStatusGroup,
|
|
206
|
+
Yr as ApSummary,
|
|
207
|
+
It as ApTable,
|
|
208
|
+
Zo as ApTableModal,
|
|
207
209
|
So as ApTag,
|
|
208
210
|
Do as ApTagGroup,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
zr as ApTitle,
|
|
212
|
+
Xo as ApTransformDataHelper,
|
|
211
213
|
Mo as ApUpload,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
lt as ApUploadSingle,
|
|
215
|
+
dt as BatchInputGroup,
|
|
214
216
|
vo as CheckCard,
|
|
215
|
-
|
|
217
|
+
ko as CheckCardGroup,
|
|
216
218
|
L as ConfigProvider,
|
|
217
219
|
s as DEFAULT_NAMESPACE,
|
|
218
220
|
A as DEFAULT_UIMODE,
|
|
219
221
|
no as DictCode,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
Tt as EditableTable,
|
|
223
|
+
Ct as EditableTableFormItem,
|
|
224
|
+
Bt as FullScreen,
|
|
225
|
+
Et as InternalScrollBar,
|
|
224
226
|
Po as NeedNameKeyDefault,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
wt as Portal,
|
|
228
|
+
Kt as ResizeObserver,
|
|
229
|
+
Rt as ScrollBar,
|
|
230
|
+
Nt as ScrollView,
|
|
229
231
|
bo as WorkOrderModal,
|
|
230
232
|
eo as adminToken,
|
|
231
233
|
oo as aplusToken,
|
|
232
234
|
T as buildLocaleContext,
|
|
233
235
|
S as buildTranslator,
|
|
234
|
-
|
|
236
|
+
jr as computedRecords,
|
|
235
237
|
n as configProviderContextKey,
|
|
236
238
|
d as configProviderProps,
|
|
237
|
-
|
|
239
|
+
Dr as convertExportField,
|
|
238
240
|
Fo as createWorkOrderModal,
|
|
239
241
|
a as default,
|
|
240
242
|
G as defaultNamespace,
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
Gt as ensureRangeValue,
|
|
244
|
+
qr as flattenColumns,
|
|
245
|
+
Jr as formatDataIndex,
|
|
246
|
+
Qr as formatNumber,
|
|
245
247
|
N as globalConfigCached,
|
|
246
|
-
|
|
248
|
+
Sr as handleExportDownload,
|
|
247
249
|
c as keysOf,
|
|
248
250
|
io as langMap,
|
|
249
251
|
C as localeContextKey,
|
|
250
|
-
|
|
252
|
+
Nr as locales,
|
|
251
253
|
P as namespaceContextKey,
|
|
252
254
|
l as pathMap,
|
|
253
255
|
F as provideGlobalConfig,
|
|
254
256
|
D as translate,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
Vt as useControllableValue,
|
|
258
|
+
qt as useFullScreen,
|
|
257
259
|
R as useGetDerivedNamespace,
|
|
258
260
|
I as useGlobalConfig,
|
|
259
261
|
g as useLocale,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
+
_t as useManualRef,
|
|
263
|
+
Ut as useMessage,
|
|
262
264
|
M as useNamespace,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
Wr as usePageListApTable,
|
|
266
|
+
Qt as useResize,
|
|
267
|
+
or as useTableModal,
|
|
268
|
+
ct as useTablePaging,
|
|
269
|
+
Hr as useTableRefresh,
|
|
270
|
+
tr as useTableSelectModal,
|
|
271
|
+
$t as useThrottleRef
|
|
270
272
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApButtonSlots, ApConfirButtonProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { ModalFuncProps } from '@aplus-frontend/antdv';
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: Readonly<ApButtonSlots> & ApButtonSlots;
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: any;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: DefineComponent<ApConfirButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApConfirButtonProps> & Readonly<{}>, {
|
|
12
|
+
confirmProps: ModalFuncProps;
|
|
13
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent as f, useSlots as d, createBlock as u, openBlock as k, mergeProps as y, unref as P, createSlots as B, renderList as C, withCtx as _, renderSlot as g, normalizeProps as b, guardReactiveProps as h } from "vue";
|
|
2
|
+
import { confirmHandle as O } from "./utils/index.mjs";
|
|
3
|
+
import { omit as l } from "lodash-unified";
|
|
4
|
+
import "./ap-button.vue2.mjs";
|
|
5
|
+
import S from "./ap-button.vue.mjs";
|
|
6
|
+
const N = /* @__PURE__ */ f({
|
|
7
|
+
__name: "ap-confirm-button",
|
|
8
|
+
props: {
|
|
9
|
+
prefixCls: {},
|
|
10
|
+
htmlType: {},
|
|
11
|
+
shape: {},
|
|
12
|
+
size: {},
|
|
13
|
+
loading: { type: [Boolean, Object] },
|
|
14
|
+
disabled: { type: Boolean },
|
|
15
|
+
ghost: { type: Boolean },
|
|
16
|
+
block: { type: Boolean },
|
|
17
|
+
danger: { type: Boolean },
|
|
18
|
+
icon: {},
|
|
19
|
+
href: {},
|
|
20
|
+
target: {},
|
|
21
|
+
title: {},
|
|
22
|
+
onMousedown: {},
|
|
23
|
+
type: {},
|
|
24
|
+
borderLinkColor: {},
|
|
25
|
+
minWidth: { type: [Boolean, Number, String] },
|
|
26
|
+
lazy: { type: [Boolean, Number] },
|
|
27
|
+
onClick: {},
|
|
28
|
+
content: {},
|
|
29
|
+
confirmProps: { default: () => ({}) }
|
|
30
|
+
},
|
|
31
|
+
setup(p) {
|
|
32
|
+
const o = p, a = d(), m = () => {
|
|
33
|
+
var t, i, s;
|
|
34
|
+
const n = ((t = o.confirmProps) == null ? void 0 : t.onOk) || o.onClick, r = ((i = o.confirmProps) == null ? void 0 : i.title) || o.title, c = ((s = o.confirmProps) == null ? void 0 : s.content) || o.content, e = {
|
|
35
|
+
centered: !0,
|
|
36
|
+
// 默认居中
|
|
37
|
+
onOk: n,
|
|
38
|
+
title: r,
|
|
39
|
+
content: c,
|
|
40
|
+
...l(o.confirmProps, ["onOk", "title", "content"])
|
|
41
|
+
};
|
|
42
|
+
O(e);
|
|
43
|
+
};
|
|
44
|
+
return (n, r) => (k(), u(S, y(P(l)(o, ["confirmProps", "onClick"]), { onClick: m }), B({ _: 2 }, [
|
|
45
|
+
C(a, (c, e) => ({
|
|
46
|
+
name: e,
|
|
47
|
+
fn: _((t) => [
|
|
48
|
+
g(n.$slots, e, b(h(t || {})))
|
|
49
|
+
])
|
|
50
|
+
}))
|
|
51
|
+
]), 1040));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
N as default
|
|
56
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as ApButton } from './ap-button.vue';
|
|
2
2
|
import { default as ApActionButton } from './ap-action-button.vue';
|
|
3
|
+
import { default as ApConfirmButton } from './ap-confirm-button.vue';
|
|
3
4
|
export * from './interface';
|
|
4
|
-
export { ApButton, ApActionButton };
|
|
5
|
+
export { ApButton, ApActionButton, ApConfirmButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonProps } from '@aplus-frontend/antdv';
|
|
1
|
+
import { ModalFuncProps, ButtonProps } from '@aplus-frontend/antdv';
|
|
2
2
|
export type ApButtonProps = Omit<ButtonProps, 'type' | 'onClick'> & {
|
|
3
3
|
type?: ButtonProps['type'] | 'borderLink';
|
|
4
4
|
borderLinkColor?: string;
|
|
@@ -11,3 +11,8 @@ export type ApButtonSlots = {
|
|
|
11
11
|
default: any;
|
|
12
12
|
icon?: any;
|
|
13
13
|
};
|
|
14
|
+
export type ApConfirButtonProps = ApButtonProps & {
|
|
15
|
+
title: ModalFuncProps['title'];
|
|
16
|
+
content: ModalFuncProps['content'];
|
|
17
|
+
confirmProps?: ModalFuncProps;
|
|
18
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ModalFuncProps } from '@aplus-frontend/antdv';
|
|
1
2
|
export declare function isPromise(fn: any): any;
|
|
2
3
|
export declare const isAsynchronous: (fn: any) => any;
|
|
3
4
|
export declare const transferOpacityColor: (thisColor?: string, thisOpacity?: string) => string | undefined;
|
|
5
|
+
export declare const confirmHandle: (ModalFuncProps: ModalFuncProps) => Promise<unknown>;
|
|
@@ -1,33 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
import { Modal as s } from "@aplus-frontend/antdv";
|
|
2
|
+
import { omit as a } from "lodash-unified";
|
|
3
|
+
function f(t) {
|
|
2
4
|
return typeof t == "object" && typeof t.then == "function" ? t : !1;
|
|
3
5
|
}
|
|
4
|
-
const
|
|
5
|
-
var
|
|
6
|
+
const p = (t) => typeof t == "function" && f(t == null ? void 0 : t()), y = (t, c = "0.7") => {
|
|
7
|
+
var i;
|
|
6
8
|
try {
|
|
7
9
|
let e = t == null ? void 0 : t.toLowerCase();
|
|
8
10
|
if (e && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)) {
|
|
9
11
|
if (e.length === 4) {
|
|
10
|
-
let
|
|
11
|
-
for (let
|
|
12
|
-
|
|
13
|
-
e =
|
|
12
|
+
let r = "#";
|
|
13
|
+
for (let n = 1; n < 4; n += 1)
|
|
14
|
+
r += e.slice(n, n + 1).concat(e.slice(n, n + 1));
|
|
15
|
+
e = r;
|
|
14
16
|
}
|
|
15
|
-
const
|
|
16
|
-
for (let
|
|
17
|
-
|
|
18
|
-
return "rgba(" +
|
|
17
|
+
const o = [];
|
|
18
|
+
for (let r = 1; r < 7; r += 2)
|
|
19
|
+
o.push(parseInt("0x" + e.slice(r, r + 2)));
|
|
20
|
+
return "rgba(" + o.join(",") + "," + c + ")";
|
|
19
21
|
}
|
|
20
22
|
if (e && e.startsWith("rgb")) {
|
|
21
|
-
let
|
|
22
|
-
return
|
|
23
|
+
let o = e.match(/(\d(\.\d+)?)+/g);
|
|
24
|
+
return o = (i = o == null ? void 0 : o.slice(0, 3)) == null ? void 0 : i.concat(c), "rgba(" + o.join(",") + ")";
|
|
23
25
|
}
|
|
24
26
|
return e;
|
|
25
27
|
} catch {
|
|
26
28
|
return;
|
|
27
29
|
}
|
|
30
|
+
}, g = (t) => {
|
|
31
|
+
const { onOk: c = () => ({}) } = t;
|
|
32
|
+
return new Promise((i, e) => {
|
|
33
|
+
s.confirm({
|
|
34
|
+
onOk: async () => {
|
|
35
|
+
try {
|
|
36
|
+
await c(), i(!0);
|
|
37
|
+
} catch {
|
|
38
|
+
e();
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
onCancel: () => {
|
|
42
|
+
e();
|
|
43
|
+
},
|
|
44
|
+
...a(t, ["onOk"])
|
|
45
|
+
});
|
|
46
|
+
});
|
|
28
47
|
};
|
|
29
48
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
f as
|
|
49
|
+
g as confirmHandle,
|
|
50
|
+
p as isAsynchronous,
|
|
51
|
+
f as isPromise,
|
|
52
|
+
y as transferOpacityColor
|
|
33
53
|
};
|