@aplus-frontend/ui 0.2.20 → 0.2.22
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 +95 -93
- package/es/src/ap-descriptions/help-message/index.vue2.mjs +18 -18
- package/es/src/ap-drawer/index.d.ts +8 -0
- package/es/src/ap-drawer/index.mjs +10 -0
- package/es/src/ap-drawer/interface.d.ts +16 -0
- package/es/src/ap-drawer/interface.mjs +1 -0
- package/es/src/ap-drawer/style/css.d.ts +1 -0
- package/es/src/ap-drawer/style/css.js +1 -0
- package/es/src/ap-drawer/style/index.d.ts +1 -0
- package/es/src/ap-drawer/style/index.js +1 -0
- package/es/src/ap-drawer/utils/createDrawer.d.ts +2 -0
- package/es/src/ap-drawer/utils/createDrawer.mjs +83 -0
- package/es/src/ap-drawer/utils/index.d.ts +1 -0
- package/es/src/ap-drawer/utils/index.mjs +4 -0
- package/es/src/ap-form/interface.d.ts +1 -1
- package/es/src/ap-form/item/index.vue.mjs +48 -51
- package/es/src/ap-form/items/number/index.vue.d.ts +10 -10
- package/es/src/ap-form/items/text/index.vue.d.ts +10 -10
- package/es/src/ap-form/items/text/password.vue.d.ts +10 -10
- package/es/src/ap-form/items/text-area/index.vue.d.ts +9 -9
- package/es/src/ap-form/render/control.vue.mjs +7 -7
- package/es/src/ap-form/render/item.vue.d.ts +6 -5
- package/es/src/ap-form/render/item.vue.mjs +20 -12
- package/es/src/ap-form/render/style/css.d.ts +1 -0
- package/es/src/ap-form/render/style/css.js +1 -0
- package/es/src/ap-form/render/style/style.d.ts +1 -0
- package/es/src/ap-list/index.vue.d.ts +10 -2
- package/es/src/ap-list/index.vue.mjs +135 -85
- package/es/src/ap-list/interface.d.ts +22 -3
- package/es/src/ap-modal/interface.d.ts +3 -0
- package/es/src/ap-modal/utils/createModal.mjs +46 -36
- package/es/src/ap-table/constants.d.ts +42 -42
- package/es/src/ap-tag/ap-tag.vue.mjs +16 -13
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +206 -204
- package/es/src/path-map.mjs +4 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/ap-drawer/index.d.ts +8 -0
- package/lib/src/ap-drawer/index.js +1 -0
- package/lib/src/ap-drawer/interface.d.ts +16 -0
- package/lib/src/ap-drawer/interface.js +1 -0
- package/lib/src/ap-drawer/style/css.d.ts +1 -0
- package/lib/src/ap-drawer/style/css.js +1 -0
- package/lib/src/ap-drawer/style/index.d.ts +1 -0
- package/lib/src/ap-drawer/style/index.js +1 -0
- package/lib/src/ap-drawer/utils/createDrawer.d.ts +2 -0
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -0
- package/lib/src/ap-drawer/utils/index.d.ts +1 -0
- package/lib/src/ap-drawer/utils/index.js +1 -0
- package/lib/src/ap-form/interface.d.ts +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +10 -10
- package/lib/src/ap-form/items/text/index.vue.d.ts +10 -10
- package/lib/src/ap-form/items/text/password.vue.d.ts +10 -10
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +9 -9
- package/lib/src/ap-form/render/control.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.d.ts +6 -5
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-form/render/style/css.d.ts +1 -0
- package/lib/src/ap-form/render/style/css.js +1 -0
- package/lib/src/ap-form/render/style/style.d.ts +1 -0
- package/lib/src/ap-list/index.vue.d.ts +10 -2
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +22 -3
- package/lib/src/ap-modal/interface.d.ts +3 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/constants.d.ts +42 -42
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +4 -3
package/es/index.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { keysOf as n, provideGlobalConfig as i, useGlobalConfig as c } from "./s
|
|
|
7
7
|
import { buildLocaleContext as b, buildTranslator as I, localeContextKey as T, translate as C, useLocale as g } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
8
|
import { defaultNamespace as S, namespaceContextKey as h, useGetDerivedNamespace as G, useNamespace as y } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
import { ConfigProvider as P, globalConfigCached as L } from "./src/config-provider/config-provider.mjs";
|
|
10
|
-
import { APConfigProvider as
|
|
11
|
-
import { ApFormItemText as
|
|
10
|
+
import { APConfigProvider as w } from "./src/config-provider/index.mjs";
|
|
11
|
+
import { ApFormItemText as k } from "./src/ap-form/items/text/index.mjs";
|
|
12
12
|
import { default as B } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
13
13
|
import { default as K } from "./src/ap-form/items/number/index.vue.mjs";
|
|
14
14
|
import { default as U } from "./src/ap-form/items/date/index.vue.mjs";
|
|
@@ -34,8 +34,8 @@ import { ApFieldText as Se } from "./src/ap-field/text/index.mjs";
|
|
|
34
34
|
import { default as Ge } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
35
35
|
import { default as Ne } from "./src/ap-field/date/index.vue.mjs";
|
|
36
36
|
import { default as Le } from "./src/ap-field/number/index.vue.mjs";
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
37
|
+
import { default as we } from "./src/ap-field/radio/index.vue.mjs";
|
|
38
|
+
import { default as ke } from "./src/ap-field/switch/index.vue.mjs";
|
|
39
39
|
import { default as Be } from "./src/ap-field/text-area/index.vue.mjs";
|
|
40
40
|
import { default as Ke } from "./src/ap-field/date-range/index.vue.mjs";
|
|
41
41
|
import { default as Ue } from "./src/ap-field/select/index.vue.mjs";
|
|
@@ -60,49 +60,50 @@ import { default as ho } from "./src/ap-upload/apUpload.vue.mjs";
|
|
|
60
60
|
import { ApDownLoadNeedNameKeyDefault as yo } from "./src/ap-download/interface.mjs";
|
|
61
61
|
import { default as Po } from "./src/ap-download/ap-download.vue.mjs";
|
|
62
62
|
import { CheckCard as Mo } from "./src/check-card/index.mjs";
|
|
63
|
-
import { default as
|
|
63
|
+
import { default as Ro } from "./src/check-card/group.vue.mjs";
|
|
64
64
|
import { ApModal as vo } from "./src/ap-modal/index.mjs";
|
|
65
65
|
import { default as Eo } from "./src/ap-list/index.vue.mjs";
|
|
66
66
|
import { default as Oo } from "./src/ap-button/ap-button.vue.mjs";
|
|
67
67
|
import { default as Wo } from "./src/ap-button/ap-action-button.vue.mjs";
|
|
68
|
-
import {
|
|
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 { default as et } from "./src/business/
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import { default as lt } from "./src/editable-table/
|
|
102
|
-
import { default as dt } from "./src/
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
68
|
+
import { ApDrawer as Vo } from "./src/ap-drawer/index.mjs";
|
|
69
|
+
import { ApTransformDataHelper as jo } from "./src/utils/ap-trans-data/index.mjs";
|
|
70
|
+
import { default as zo } from "./src/business/ap-table-modal/index.mjs";
|
|
71
|
+
import { useTableModal as Qo } from "./src/business/ap-table-modal/hooks/use-table-modal.mjs";
|
|
72
|
+
import { useTableSelectModal as Yo } from "./src/business/ap-table-modal/hooks/use-table-select-modal.mjs";
|
|
73
|
+
import { ApAttachment as _o } from "./src/business/ap-attachment/index.mjs";
|
|
74
|
+
import { ApBatchAction as or } from "./src/business/ap-batch-action/index.mjs";
|
|
75
|
+
import { ApBatchActionGroup as tr } from "./src/business/ap-batch-action-group/index.mjs";
|
|
76
|
+
import { ApButtonGroup as ar } from "./src/business/ap-button-group/index.mjs";
|
|
77
|
+
import { ApCard as mr } from "./src/business/ap-card/index.mjs";
|
|
78
|
+
import { ApExpandAlert as xr } from "./src/business/ap-expand-alert/index.mjs";
|
|
79
|
+
import { ApExportGroupActionType as ur } from "./src/business/ap-export-group/interface.mjs";
|
|
80
|
+
import { ApExportGroup as Ar } from "./src/business/ap-export-group/index.mjs";
|
|
81
|
+
import { handleExportDownload as ir } from "./src/business/ap-export-group/handleExportDownload.mjs";
|
|
82
|
+
import { ApImage as Fr } from "./src/business/ap-image/index.mjs";
|
|
83
|
+
import { ApInputRadio as Ir } from "./src/business/ap-input-radio/index.mjs";
|
|
84
|
+
import { ApLabel as Cr, ApLabelGroup as gr } from "./src/business/ap-label/index.mjs";
|
|
85
|
+
import { locales as Sr } from "./src/business/ap-ladder/interface.mjs";
|
|
86
|
+
import { ApLadder as Gr } from "./src/business/ap-ladder/index.mjs";
|
|
87
|
+
import { ApSelectLayout as Nr } from "./src/business/ap-select-layout/index.mjs";
|
|
88
|
+
import { ApStatus as Lr, ApStatusGroup as Mr } from "./src/business/ap-status/index.mjs";
|
|
89
|
+
import { ApTitle as Rr } from "./src/business/ap-title/index.mjs";
|
|
90
|
+
import { usePageListApTable as vr } from "./src/business/hooks/usePageListApTable.mjs";
|
|
91
|
+
import { useTableRefresh as Er } from "./src/business/hooks/useTableRefresh.mjs";
|
|
92
|
+
import { computedRecords as Or, flattenColumns as Ur, formatDataIndex as Wr, formatNumber as Hr } from "./src/business/ap-summary/utils.mjs";
|
|
93
|
+
import { ApSummary as $r } from "./src/business/ap-summary/index.mjs";
|
|
94
|
+
import { ApNeedNameKeyDefault as qr } from "./src/business/ap-appendix/interface.mjs";
|
|
95
|
+
import { ApAppendix as Jr } from "./src/business/ap-appendix/index.mjs";
|
|
96
|
+
import { ApExtensionSelect as Xr, ApGroupSearch as Yr, ApPopoverSelect as Zr } from "./src/business/ap-group-search/index.mjs";
|
|
97
|
+
import { default as et } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
|
|
98
|
+
import { default as rt } from "./src/business/batch-input-group/index.vue.mjs";
|
|
99
|
+
import { useTablePaging as pt } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
100
|
+
import { ApTable as ft } from "./src/ap-table/index.mjs";
|
|
101
|
+
import { default as lt } from "./src/editable-table/index.vue.mjs";
|
|
102
|
+
import { default as dt } from "./src/editable-table/form-item.vue.mjs";
|
|
103
|
+
import { default as st } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
104
|
+
import { ApScrollBar as nt } from "./src/ap-scroll-bar/index.mjs";
|
|
105
|
+
import { useMessage as ct } from "./src/hooks/useMessage.mjs";
|
|
106
|
+
import { useControllableValue as bt } from "./src/hooks/useControllableValue.mjs";
|
|
106
107
|
const a = {
|
|
107
108
|
install: (r) => {
|
|
108
109
|
for (const t in o) {
|
|
@@ -112,39 +113,40 @@ const a = {
|
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
115
|
export {
|
|
115
|
-
|
|
116
|
+
w as APConfigProvider,
|
|
116
117
|
Wo as ApActionButton,
|
|
117
118
|
mo as ApActionGroup,
|
|
118
119
|
_e as ApActionItem,
|
|
119
120
|
ao as ApActionItemDropdown,
|
|
120
121
|
oo as ApActionItemModal,
|
|
121
122
|
to as ApActionItemPopconfirm,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
Jr as ApAppendix,
|
|
124
|
+
_o as ApAttachment,
|
|
125
|
+
or as ApBatchAction,
|
|
126
|
+
tr as ApBatchActionGroup,
|
|
126
127
|
Oo as ApButton,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
ar as ApButtonGroup,
|
|
129
|
+
mr as ApCard,
|
|
130
|
+
st as ApDescriptions,
|
|
130
131
|
yo as ApDownLoadNeedNameKeyDefault,
|
|
131
132
|
Po as ApDownload,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
Vo as ApDrawer,
|
|
134
|
+
xr as ApExpandAlert,
|
|
135
|
+
Ar as ApExportGroup,
|
|
136
|
+
ur as ApExportGroupActionType,
|
|
137
|
+
Xr as ApExtensionSelect,
|
|
136
138
|
ge as ApField,
|
|
137
139
|
Ge as ApFieldCheckbox,
|
|
138
140
|
Ne as ApFieldDate,
|
|
139
141
|
Ke as ApFieldDateRange,
|
|
140
142
|
Le as ApFieldNumber,
|
|
141
143
|
He as ApFieldPassword,
|
|
142
|
-
|
|
144
|
+
we as ApFieldRadio,
|
|
143
145
|
Je as ApFieldRate,
|
|
144
146
|
qe as ApFieldSegmented,
|
|
145
147
|
Ue as ApFieldSelect,
|
|
146
148
|
$e as ApFieldSlider,
|
|
147
|
-
|
|
149
|
+
ke as ApFieldSwitch,
|
|
148
150
|
Se as ApFieldText,
|
|
149
151
|
Be as ApFieldTextArea,
|
|
150
152
|
ee as ApForm,
|
|
@@ -161,78 +163,78 @@ export {
|
|
|
161
163
|
Te as ApFormItemRender,
|
|
162
164
|
q as ApFormItemSelect,
|
|
163
165
|
J as ApFormItemSwitch,
|
|
164
|
-
|
|
166
|
+
k as ApFormItemText,
|
|
165
167
|
B as ApFormItemTextArea,
|
|
166
168
|
Z as ApFormItemTextPassword,
|
|
167
169
|
fe as ApFormList,
|
|
168
170
|
de as ApFormModalForm,
|
|
169
171
|
le as ApFormSearchForm,
|
|
170
172
|
ne as ApFormSet,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
Yr as ApGroupSearch,
|
|
174
|
+
Fr as ApImage,
|
|
173
175
|
Co as ApInfoLayout,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
Ir as ApInputRadio,
|
|
177
|
+
Cr as ApLabel,
|
|
178
|
+
gr as ApLabelGroup,
|
|
179
|
+
Gr as ApLadder,
|
|
178
180
|
Eo as ApList,
|
|
179
181
|
vo as ApModal,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
182
|
+
qr as ApNeedNameKeyDefault,
|
|
183
|
+
Zr as ApPopoverSelect,
|
|
184
|
+
nt as ApScrollBar,
|
|
185
|
+
Nr as ApSelectLayout,
|
|
186
|
+
Lr as ApStatus,
|
|
187
|
+
Mr as ApStatusGroup,
|
|
188
|
+
$r as ApSummary,
|
|
189
|
+
ft as ApTable,
|
|
190
|
+
zo as ApTableModal,
|
|
189
191
|
Fo as ApTag,
|
|
190
192
|
Io as ApTagGroup,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
Rr as ApTitle,
|
|
194
|
+
jo as ApTransformDataHelper,
|
|
193
195
|
ho as ApUpload,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
+
et as ApUploadSingle,
|
|
197
|
+
rt as BatchInputGroup,
|
|
196
198
|
Mo as CheckCard,
|
|
197
|
-
|
|
199
|
+
Ro as CheckCardGroup,
|
|
198
200
|
P as ConfigProvider,
|
|
199
201
|
xo as DictCode,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
+
lt as EditableTable,
|
|
203
|
+
dt as EditableTableFormItem,
|
|
202
204
|
Do as NeedNameKeyDefault,
|
|
203
205
|
io as WorkOrderModal,
|
|
204
206
|
Xe as adminToken,
|
|
205
207
|
Ye as aplusToken,
|
|
206
208
|
b as buildLocaleContext,
|
|
207
209
|
I as buildTranslator,
|
|
208
|
-
|
|
210
|
+
Or as computedRecords,
|
|
209
211
|
s as configProviderContextKey,
|
|
210
212
|
d as configProviderProps,
|
|
211
213
|
Ao as createWorkOrderModal,
|
|
212
214
|
a as default,
|
|
213
215
|
S as defaultNamespace,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
Ur as flattenColumns,
|
|
217
|
+
Wr as formatDataIndex,
|
|
218
|
+
Hr as formatNumber,
|
|
217
219
|
L as globalConfigCached,
|
|
218
|
-
|
|
220
|
+
ir as handleExportDownload,
|
|
219
221
|
n as keysOf,
|
|
220
222
|
uo as langMap,
|
|
221
223
|
T as localeContextKey,
|
|
222
|
-
|
|
224
|
+
Sr as locales,
|
|
223
225
|
h as namespaceContextKey,
|
|
224
226
|
l as pathMap,
|
|
225
227
|
i as provideGlobalConfig,
|
|
226
228
|
C as translate,
|
|
227
|
-
|
|
229
|
+
bt as useControllableValue,
|
|
228
230
|
G as useGetDerivedNamespace,
|
|
229
231
|
c as useGlobalConfig,
|
|
230
232
|
g as useLocale,
|
|
231
|
-
|
|
233
|
+
ct as useMessage,
|
|
232
234
|
y as useNamespace,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
vr as usePageListApTable,
|
|
236
|
+
Qo as useTableModal,
|
|
237
|
+
pt as useTablePaging,
|
|
238
|
+
Er as useTableRefresh,
|
|
239
|
+
Yo as useTableSelectModal
|
|
238
240
|
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { defineComponent as c, computed as r, createVNode as
|
|
1
|
+
import { defineComponent as c, computed as r, createVNode as t, openBlock as o, createElementBlock as m, createBlock as l, resolveDynamicComponent as d, unref as n, withCtx as u, createCommentVNode as f } from "vue";
|
|
2
2
|
import { QuestionCircleOutlined as h } from "@ant-design/icons-vue";
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
3
|
+
import { TypographyText as _, Tooltip as b } from "@aplus-frontend/antdv";
|
|
4
|
+
const y = {
|
|
5
5
|
style: {
|
|
6
|
-
display: "inline-flex"
|
|
7
|
-
alignItems: "center",
|
|
8
|
-
maxWidth: "calc(var(--ap-descriptions-item-label-width) - 30px)"
|
|
6
|
+
display: "inline-flex"
|
|
9
7
|
}
|
|
10
|
-
},
|
|
8
|
+
}, k = /* @__PURE__ */ c({
|
|
11
9
|
__name: "index",
|
|
12
10
|
props: {
|
|
13
11
|
helpMessage: {},
|
|
14
12
|
label: {}
|
|
15
13
|
},
|
|
16
14
|
setup(s) {
|
|
17
|
-
const i = s,
|
|
15
|
+
const i = s, p = r(() => {
|
|
18
16
|
const e = i.label;
|
|
19
|
-
return typeof e != "object" ?
|
|
20
|
-
title: e,
|
|
17
|
+
return typeof e != "object" ? t("div", {
|
|
21
18
|
style: {
|
|
22
|
-
|
|
23
|
-
overflow: "hidden",
|
|
24
|
-
textOverflow: "ellipsis"
|
|
19
|
+
maxWidth: "calc(var(--ap-descriptions-item-label-width))"
|
|
25
20
|
}
|
|
26
|
-
}, [
|
|
21
|
+
}, [t(_, {
|
|
22
|
+
ellipsis: {
|
|
23
|
+
tooltip: e
|
|
24
|
+
},
|
|
25
|
+
content: e
|
|
26
|
+
}, null)]) : e;
|
|
27
27
|
});
|
|
28
|
-
return (e,
|
|
28
|
+
return (e, a) => (o(), m("span", y, [(o(), l(d(p.value))), e.helpMessage ? (o(), l(n(b), {
|
|
29
29
|
key: 0,
|
|
30
30
|
placement: "topLeft",
|
|
31
31
|
title: e.helpMessage
|
|
32
32
|
}, {
|
|
33
|
-
default:
|
|
33
|
+
default: u(() => [t(n(h), {
|
|
34
34
|
class: "ap-descriptions-item-content__help"
|
|
35
35
|
})]),
|
|
36
36
|
_: 1
|
|
37
|
-
}, 8, ["title"])) :
|
|
37
|
+
}, 8, ["title"])) : f("", !0)]));
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
k as default
|
|
42
42
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Drawer as _Drawer } from '@aplus-frontend/antdv';
|
|
2
|
+
import { CreateDrawerFunc } from './interface';
|
|
3
|
+
export * from './interface';
|
|
4
|
+
type ApDrawerMixedProps = typeof _Drawer & {
|
|
5
|
+
createDrawer: CreateDrawerFunc;
|
|
6
|
+
};
|
|
7
|
+
declare const ApDrawer: ApDrawerMixedProps;
|
|
8
|
+
export { ApDrawer };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Drawer as e } from "@aplus-frontend/antdv";
|
|
2
|
+
import "./utils/index.mjs";
|
|
3
|
+
import "./interface.mjs";
|
|
4
|
+
import { createDrawer as a } from "./utils/createDrawer.mjs";
|
|
5
|
+
const r = e;
|
|
6
|
+
r.createDrawer = a;
|
|
7
|
+
r.name = "ApDrawer";
|
|
8
|
+
export {
|
|
9
|
+
r as ApDrawer
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DrawerProps } from '@aplus-frontend/antdv';
|
|
2
|
+
export type CreateDrawerFuncProps<ContentRecord = any> = Omit<DrawerProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onClose' | 'getContainer' | 'extra' | 'footer'> & Partial<{
|
|
3
|
+
onClose: (params: ContentRecord) => any | Promise<any>;
|
|
4
|
+
getContainer: HTMLElement;
|
|
5
|
+
content: any;
|
|
6
|
+
destroyOnClose: boolean;
|
|
7
|
+
extra: (params: ContentRecord, close: () => void) => any;
|
|
8
|
+
footer: (params: ContentRecord, close: () => void) => any;
|
|
9
|
+
}>;
|
|
10
|
+
export type CreateDrawerFuncReturn = {
|
|
11
|
+
destroy: () => void;
|
|
12
|
+
update: (newConfig: CreateDrawerFuncProps) => void;
|
|
13
|
+
open: () => void;
|
|
14
|
+
close: () => void;
|
|
15
|
+
};
|
|
16
|
+
export type CreateDrawerFunc = (props: CreateDrawerFuncProps) => CreateDrawerFuncReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { render as g, defineComponent as O, createVNode as v, mergeProps as b, h as E } from "vue";
|
|
2
|
+
import { Drawer as N } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ConfigProvider as T, globalConfigCached as V } from "../../config-provider/config-provider.mjs";
|
|
4
|
+
import { omit as j } from "lodash-unified";
|
|
5
|
+
const B = (c) => {
|
|
6
|
+
let o, l;
|
|
7
|
+
const {
|
|
8
|
+
destroyOnClose: m = !0
|
|
9
|
+
} = c;
|
|
10
|
+
function f() {
|
|
11
|
+
o && o(!1), setTimeout(() => {
|
|
12
|
+
var e;
|
|
13
|
+
g(null, t), (e = t.parentElement) == null || e.removeChild(t);
|
|
14
|
+
}, 500);
|
|
15
|
+
}
|
|
16
|
+
function w() {
|
|
17
|
+
o && o(!0);
|
|
18
|
+
}
|
|
19
|
+
function h() {
|
|
20
|
+
o && o(!1);
|
|
21
|
+
}
|
|
22
|
+
function y(e) {
|
|
23
|
+
l && l(e);
|
|
24
|
+
}
|
|
25
|
+
const P = /* @__PURE__ */ O({
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
open: m,
|
|
29
|
+
props: c
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
async handleClose() {
|
|
34
|
+
var e, n, r, s, p;
|
|
35
|
+
if ((e = this.props) != null && e.onClose) {
|
|
36
|
+
const i = ((s = (r = (n = this.props) == null ? void 0 : n.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
|
|
37
|
+
await ((p = this.props) == null ? void 0 : p.onClose(i));
|
|
38
|
+
}
|
|
39
|
+
m ? f() : h();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
created() {
|
|
43
|
+
o = (e) => {
|
|
44
|
+
this.open = e;
|
|
45
|
+
}, l = (e) => {
|
|
46
|
+
this.props = {
|
|
47
|
+
...this.props,
|
|
48
|
+
...e
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
render() {
|
|
53
|
+
var s, p, i;
|
|
54
|
+
const e = j(this.props, ["onClose", "extra", "footer"]), n = ((i = (p = (s = this.props) == null ? void 0 : s.content) == null ? void 0 : p.component) == null ? void 0 : i.exposed) ?? void 0, r = () => m ? f() : h();
|
|
55
|
+
return v(T, V.value, {
|
|
56
|
+
default: () => {
|
|
57
|
+
var a, u, d, C;
|
|
58
|
+
return [v(N, b({
|
|
59
|
+
open: this.open,
|
|
60
|
+
destroyOnClose: !0,
|
|
61
|
+
onClose: this.handleClose,
|
|
62
|
+
extra: (u = (a = this.props) == null ? void 0 : a.extra) == null ? void 0 : u.call(a, n, r),
|
|
63
|
+
footer: (C = (d = this.props) == null ? void 0 : d.footer) == null ? void 0 : C.call(d, n, r)
|
|
64
|
+
}, e), {
|
|
65
|
+
default: () => {
|
|
66
|
+
var x;
|
|
67
|
+
return [(x = this.props) == null ? void 0 : x.content];
|
|
68
|
+
}
|
|
69
|
+
})];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}), D = c.getContainer || document.body, t = document.createElement("div");
|
|
74
|
+
return D.appendChild(t), g(E(P), t), {
|
|
75
|
+
destroy: f,
|
|
76
|
+
update: y,
|
|
77
|
+
open: w,
|
|
78
|
+
close: h
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
B as createDrawer
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './createDrawer';
|