@aplus-frontend/ui 0.1.35 → 0.1.36
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 +128 -126
- package/es/src/ap-button/ap-action-button.vue.d.ts +5 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +8 -8
- package/es/src/ap-form/ap-form.vue2.mjs +93 -93
- package/es/src/ap-form/index.d.ts +3 -1
- package/es/src/ap-form/index.mjs +5 -1
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/set/index.vue.d.ts +43 -0
- package/es/src/ap-form/set/index.vue.mjs +35 -0
- package/es/src/ap-form/set/index.vue2.mjs +4 -0
- package/es/src/ap-table/ap-table.vue.d.ts +1 -0
- package/es/src/ap-table/ap-table.vue.mjs +109 -107
- package/es/src/ap-table/components/setting/utils.d.ts +1 -1
- package/es/src/ap-table/components/setting/utils.mjs +12 -21
- package/es/src/ap-table/components/style/setting/modal.css +15 -3
- package/es/src/ap-table/interface.d.ts +5 -0
- package/es/src/ap-table/utils.mjs +6 -5
- package/es/src/ap-upload/apUpload.vue.mjs +40 -39
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +11 -11
- package/es/src/business/hooks/usePageListApTable.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +76 -97
- package/es/src/editable-table/hooks/use-get-columns.mjs +41 -35
- package/es/src/editable-table/index.vue.mjs +79 -100
- package/es/src/editable-table/style/index.css +12 -0
- package/es/src/editable-table/utils.d.ts +8 -1
- package/es/src/editable-table/utils.mjs +103 -69
- package/es/src/index.mjs +105 -103
- package/es/src/theme/ap-table/setting/modal.css +15 -3
- package/es/src/theme/editable-table/index.css +12 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +5 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/index.d.ts +3 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/set/index.vue.d.ts +43 -0
- package/lib/src/ap-form/set/index.vue.js +1 -0
- package/lib/src/ap-form/set/index.vue2.js +1 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +1 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +1 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/components/style/setting/modal.css +15 -3
- package/lib/src/ap-table/interface.d.ts +5 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +1 -0
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/style/index.css +12 -0
- package/lib/src/editable-table/utils.d.ts +8 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-table/setting/modal.css +15 -3
- package/lib/src/theme/editable-table/index.css +12 -0
- package/package.json +3 -3
package/es/index.mjs
CHANGED
|
@@ -65,61 +65,62 @@ import { default as er } from "./src/ap-form/ap-form-list.vue.mjs";
|
|
|
65
65
|
import { default as rr } from "./src/ap-form/search-form/index.vue.mjs";
|
|
66
66
|
import { default as ar } from "./src/ap-form/modal-form/index.vue.mjs";
|
|
67
67
|
import { default as fr } from "./src/ap-form/dependency/index.vue.mjs";
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import { default as ir } from "./src/ap-field/
|
|
72
|
-
import { default as cr } from "./src/ap-field/
|
|
73
|
-
import { default as Fr } from "./src/ap-field/
|
|
74
|
-
import { default as br } from "./src/ap-field/
|
|
75
|
-
import { default as Ir } from "./src/ap-field/
|
|
76
|
-
import { default as Dr } from "./src/ap-field/
|
|
77
|
-
import { default as Pr } from "./src/ap-field/
|
|
78
|
-
import { default as Rr } from "./src/ap-field/
|
|
79
|
-
import { default as Gr } from "./src/ap-field/
|
|
80
|
-
import { default as wr } from "./src/ap-field/
|
|
81
|
-
import { default as kr } from "./src/ap-field/
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import { default as Wr } from "./src/ap-action/item-
|
|
86
|
-
import { default as Ur } from "./src/ap-action/item-
|
|
87
|
-
import { default as $r } from "./src/ap-action/
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import { default as ot } from "./src/ap-custom-column/column
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import { default as dt } from "./src/
|
|
96
|
-
import { default as ut } from "./src/ap-tag/ap-tag
|
|
97
|
-
import { default as it } from "./src/ap-
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import { default as wt } from "./src/ap-
|
|
107
|
-
import { default as kt } from "./src/ap-button/ap-
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import { default as ca } from "./src/
|
|
119
|
-
import { default as Fa } from "./src/editable-table/
|
|
120
|
-
import { default as ba } from "./src/
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
68
|
+
import { default as lr } from "./src/ap-form/set/index.vue.mjs";
|
|
69
|
+
import { ApField as dr } from "./src/ap-field/index.mjs";
|
|
70
|
+
import { ApFieldText as ur } from "./src/ap-field/text/index.mjs";
|
|
71
|
+
import { default as ir } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
72
|
+
import { default as cr } from "./src/ap-field/date/index.vue.mjs";
|
|
73
|
+
import { default as Fr } from "./src/ap-field/number/index.vue.mjs";
|
|
74
|
+
import { default as br } from "./src/ap-field/radio/index.vue.mjs";
|
|
75
|
+
import { default as Ir } from "./src/ap-field/switch/index.vue.mjs";
|
|
76
|
+
import { default as Dr } from "./src/ap-field/text-area/index.vue.mjs";
|
|
77
|
+
import { default as Pr } from "./src/ap-field/date-range/index.vue.mjs";
|
|
78
|
+
import { default as Rr } from "./src/ap-field/select/index.vue.mjs";
|
|
79
|
+
import { default as Gr } from "./src/ap-field/text/password.vue.mjs";
|
|
80
|
+
import { default as wr } from "./src/ap-field/slider/index.vue.mjs";
|
|
81
|
+
import { default as kr } from "./src/ap-field/segmented/index.vue.mjs";
|
|
82
|
+
import { default as Nr } from "./src/ap-field/rate/index.vue.mjs";
|
|
83
|
+
import { adminToken as Kr, aplusToken as Xr } from "./src/design-token/index.mjs";
|
|
84
|
+
import { ApActionItem as Hr } from "./src/ap-action/index.mjs";
|
|
85
|
+
import { default as Wr } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
86
|
+
import { default as Ur } from "./src/ap-action/item-popconfirm/index.vue.mjs";
|
|
87
|
+
import { default as $r } from "./src/ap-action/item-dropdown/index.vue.mjs";
|
|
88
|
+
import { default as qr } from "./src/ap-action/group/index.vue.mjs";
|
|
89
|
+
import { generateTableList as Qr } from "./src/ap-custom-column/utils.mjs";
|
|
90
|
+
import { useCacheColumnSetting as _r } from "./src/ap-custom-column/useCacheColumnSetting.mjs";
|
|
91
|
+
import { default as ot } from "./src/ap-custom-column/custom-column.vue.mjs";
|
|
92
|
+
import { default as tt } from "./src/ap-custom-column/column-select.vue.mjs";
|
|
93
|
+
import { DictCode as pt, langMap as ft } from "./src/work-order-modal/interfaces.mjs";
|
|
94
|
+
import { createWorkOrderModal as lt } from "./src/work-order-modal/createWorkOrder.mjs";
|
|
95
|
+
import { default as dt } from "./src/work-order-modal/work-order-modal.vue.mjs";
|
|
96
|
+
import { default as ut } from "./src/ap-tag/ap-tag.vue.mjs";
|
|
97
|
+
import { default as it } from "./src/ap-tag/ap-tag-group.vue.mjs";
|
|
98
|
+
import { default as ct } from "./src/ap-layout/ApInfoLayout.vue.mjs";
|
|
99
|
+
import { NeedNameKeyDefault as Ft } from "./src/ap-upload/apUploadTypes.mjs";
|
|
100
|
+
import { default as bt } from "./src/ap-upload/apUpload.vue.mjs";
|
|
101
|
+
import { ApDownLoadNeedNameKeyDefault as It } from "./src/ap-download/interface.mjs";
|
|
102
|
+
import { default as Dt } from "./src/ap-download/ap-download.vue.mjs";
|
|
103
|
+
import { CheckCard as Pt } from "./src/check-card/index.mjs";
|
|
104
|
+
import { default as Rt } from "./src/check-card/group.vue.mjs";
|
|
105
|
+
import { ApModal as Gt } from "./src/ap-modal/index.mjs";
|
|
106
|
+
import { default as wt } from "./src/ap-list/index.vue.mjs";
|
|
107
|
+
import { default as kt } from "./src/ap-button/ap-button.vue.mjs";
|
|
108
|
+
import { default as Nt } from "./src/ap-button/ap-action-button.vue.mjs";
|
|
109
|
+
import { usePageListApTable as Kt } from "./src/business/hooks/usePageListApTable.mjs";
|
|
110
|
+
import { useTableRefresh as Yt } from "./src/business/hooks/useTableRefresh.mjs";
|
|
111
|
+
import { handleExportDownload as Ot } from "./src/business/ap-export-group/handleExportDownload.mjs";
|
|
112
|
+
import { default as zt } from "./src/business/ap-table-modal/index.mjs";
|
|
113
|
+
import { useTableModal as Vt } from "./src/business/ap-table-modal/hooks/use-table-modal.mjs";
|
|
114
|
+
import { useTableSelectModal as jt } from "./src/business/ap-table-modal/hooks/use-table-select-modal.mjs";
|
|
115
|
+
import { ApAttachment as Jt, ApBatchAction as Qt, ApBatchActionGroup as Zt, ApCard as _t, ApExpandAlert as ea, ApExportGroup as oa, ApImage as ra, ApInputRadio as ta, ApLabel as aa, ApLabelGroup as pa, ApLadder as fa, ApSelectLayout as ma, ApStatus as la, ApStatusGroup as sa, ApTitle as da } from "./src/business/index.mjs";
|
|
116
|
+
import { ApTransformDataHelper as ua } from "./src/utils/ap-trans-data/index.mjs";
|
|
117
|
+
import { useTablePaging as ia } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
118
|
+
import { default as ca } from "./src/ap-table/ap-table.vue.mjs";
|
|
119
|
+
import { default as Fa } from "./src/editable-table/index.vue.mjs";
|
|
120
|
+
import { default as ba } from "./src/editable-table/form-item.vue.mjs";
|
|
121
|
+
import { default as Ia } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
122
|
+
import { useMessage as Da } from "./src/hooks/useMessage.mjs";
|
|
123
|
+
import { useControllableValue as Pa } from "./src/hooks/useControllableValue.mjs";
|
|
123
124
|
const p = {
|
|
124
125
|
install: (r) => {
|
|
125
126
|
for (const t in o) {
|
|
@@ -130,38 +131,38 @@ const p = {
|
|
|
130
131
|
};
|
|
131
132
|
export {
|
|
132
133
|
k as APConfigProvider,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
134
|
+
Nt as ApActionButton,
|
|
135
|
+
qr as ApActionGroup,
|
|
136
|
+
Hr as ApActionItem,
|
|
137
|
+
$r as ApActionItemDropdown,
|
|
138
|
+
Wr as ApActionItemModal,
|
|
139
|
+
Ur as ApActionItemPopconfirm,
|
|
140
|
+
Jt as ApAttachment,
|
|
141
|
+
Qt as ApBatchAction,
|
|
142
|
+
Zt as ApBatchActionGroup,
|
|
143
|
+
kt as ApButton,
|
|
144
|
+
_t as ApCard,
|
|
145
|
+
ot as ApCustomColumn,
|
|
146
|
+
tt as ApCustomSelect,
|
|
147
|
+
Ia as ApDescriptions,
|
|
148
|
+
It as ApDownLoadNeedNameKeyDefault,
|
|
149
|
+
Dt as ApDownload,
|
|
150
|
+
ea as ApExpandAlert,
|
|
151
|
+
oa as ApExportGroup,
|
|
152
|
+
dr as ApField,
|
|
153
|
+
ir as ApFieldCheckbox,
|
|
154
|
+
cr as ApFieldDate,
|
|
155
|
+
Pr as ApFieldDateRange,
|
|
156
|
+
Fr as ApFieldNumber,
|
|
157
|
+
Gr as ApFieldPassword,
|
|
158
|
+
br as ApFieldRadio,
|
|
159
|
+
Nr as ApFieldRate,
|
|
160
|
+
kr as ApFieldSegmented,
|
|
161
|
+
Rr as ApFieldSelect,
|
|
162
|
+
wr as ApFieldSlider,
|
|
163
|
+
Ir as ApFieldSwitch,
|
|
164
|
+
ur as ApFieldText,
|
|
165
|
+
Dr as ApFieldTextArea,
|
|
165
166
|
jo as ApForm,
|
|
166
167
|
fr as ApFormDependency,
|
|
167
168
|
Jo as ApFormItem,
|
|
@@ -179,24 +180,25 @@ export {
|
|
|
179
180
|
er as ApFormList,
|
|
180
181
|
ar as ApFormModalForm,
|
|
181
182
|
rr as ApFormSearchForm,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
ut as
|
|
197
|
-
|
|
198
|
-
da as
|
|
199
|
-
|
|
183
|
+
lr as ApFormSet,
|
|
184
|
+
ra as ApImage,
|
|
185
|
+
ct as ApInfoLayout,
|
|
186
|
+
ta as ApInputRadio,
|
|
187
|
+
aa as ApLabel,
|
|
188
|
+
pa as ApLabelGroup,
|
|
189
|
+
fa as ApLadder,
|
|
190
|
+
wt as ApList,
|
|
191
|
+
Gt as ApModal,
|
|
192
|
+
ma as ApSelectLayout,
|
|
193
|
+
la as ApStatus,
|
|
194
|
+
sa as ApStatusGroup,
|
|
195
|
+
ca as ApTable,
|
|
196
|
+
zt as ApTableModal,
|
|
197
|
+
ut as ApTag,
|
|
198
|
+
it as ApTagGroup,
|
|
199
|
+
da as ApTitle,
|
|
200
|
+
ua as ApTransformDataHelper,
|
|
201
|
+
bt as ApUpload,
|
|
200
202
|
Pe as ApiCascader,
|
|
201
203
|
Re as ApiRadioGroup,
|
|
202
204
|
Ge as ApiSelect,
|
|
@@ -208,8 +210,8 @@ export {
|
|
|
208
210
|
$ as BasicArrow,
|
|
209
211
|
j as BasicHelp,
|
|
210
212
|
q as BasicTitle,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
Pt as CheckCard,
|
|
214
|
+
Rt as CheckCardGroup,
|
|
213
215
|
K as CollapseContainer,
|
|
214
216
|
Q as CollapseTransition,
|
|
215
217
|
v as ConfigProvider,
|
|
@@ -218,11 +220,11 @@ export {
|
|
|
218
220
|
mo as CropperAvatar,
|
|
219
221
|
lo as CropperImage,
|
|
220
222
|
Ae as Description,
|
|
221
|
-
|
|
223
|
+
pt as DictCode,
|
|
222
224
|
co as Dropdown,
|
|
223
225
|
Io as EditTableHeaderIcon,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
Fa as EditableTable,
|
|
227
|
+
ba as EditableTableFormItem,
|
|
226
228
|
_ as ExpandTransition,
|
|
227
229
|
ee as ExpandXTransition,
|
|
228
230
|
oe as FadeTransition,
|
|
@@ -230,7 +232,7 @@ export {
|
|
|
230
232
|
l as Icon,
|
|
231
233
|
H as IconPicker,
|
|
232
234
|
Ve as ModalButton,
|
|
233
|
-
|
|
235
|
+
Ft as NeedNameKeyDefault,
|
|
234
236
|
je as PopConfirmButton,
|
|
235
237
|
Ke as ProForm,
|
|
236
238
|
Fo as ProTable,
|
|
@@ -253,48 +255,48 @@ export {
|
|
|
253
255
|
s as SvgIcon,
|
|
254
256
|
bo as TableAction,
|
|
255
257
|
Do as TableImg,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
dt as WorkOrderModal,
|
|
259
|
+
Kr as adminToken,
|
|
260
|
+
Xr as aplusToken,
|
|
259
261
|
b as buildLocaleContext,
|
|
260
262
|
S as buildTranslator,
|
|
261
263
|
n as configProviderContextKey,
|
|
262
264
|
x as configProviderProps,
|
|
263
265
|
io as createPrompt,
|
|
264
|
-
|
|
266
|
+
lt as createWorkOrderModal,
|
|
265
267
|
p as default,
|
|
266
268
|
P as defaultNamespace,
|
|
267
269
|
U as en,
|
|
268
|
-
|
|
270
|
+
Qr as generateTableList,
|
|
269
271
|
w as globalConfigCached,
|
|
270
|
-
|
|
272
|
+
Ot as handleExportDownload,
|
|
271
273
|
Se as isComponentFormSchema,
|
|
272
274
|
Ie as isSlotFormSchema,
|
|
273
275
|
c as keysOf,
|
|
274
|
-
|
|
276
|
+
ft as langMap,
|
|
275
277
|
I as localeContextKey,
|
|
276
278
|
M as namespaceContextKey,
|
|
277
279
|
T as provideGlobalConfig,
|
|
278
280
|
i as tableDefaultConfig,
|
|
279
281
|
g as translate,
|
|
280
|
-
|
|
282
|
+
_r as useCacheColumnSetting,
|
|
281
283
|
Te as useComponentRegister,
|
|
282
|
-
|
|
284
|
+
Pa as useControllableValue,
|
|
283
285
|
ne as useDescription,
|
|
284
286
|
Ce as useForm,
|
|
285
287
|
R as useGetDerivedNamespace,
|
|
286
288
|
F as useGlobalConfig,
|
|
287
289
|
D as useLocale,
|
|
288
|
-
|
|
290
|
+
Da as useMessage,
|
|
289
291
|
ro as useModal,
|
|
290
292
|
eo as useModalContext,
|
|
291
293
|
to as useModalInner,
|
|
292
294
|
B as useNamespace,
|
|
293
|
-
|
|
295
|
+
Kt as usePageListApTable,
|
|
294
296
|
Po as useTable,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
Vt as useTableModal,
|
|
298
|
+
ia as useTablePaging,
|
|
299
|
+
Yt as useTableRefresh,
|
|
300
|
+
jt as useTableSelectModal,
|
|
299
301
|
W as zhCn
|
|
300
302
|
};
|
|
@@ -10,12 +10,17 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
10
10
|
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption< ApButtonProps>, {
|
|
11
11
|
type: string;
|
|
12
12
|
minWidth: boolean;
|
|
13
|
+
loading: undefined;
|
|
13
14
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption< ApButtonProps>, {
|
|
14
15
|
type: string;
|
|
15
16
|
minWidth: boolean;
|
|
17
|
+
loading: undefined;
|
|
16
18
|
}>>>, {
|
|
17
19
|
type: ButtonType | "borderLink";
|
|
18
20
|
minWidth: boolean | number | string;
|
|
21
|
+
loading: boolean | {
|
|
22
|
+
delay?: number;
|
|
23
|
+
};
|
|
19
24
|
}, {}>;
|
|
20
25
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
26
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, openBlock as s, createBlock as i, normalizeProps as t, guardReactiveProps as r, createSlots as d, renderList as c, withCtx as m, renderSlot as u } from "vue";
|
|
2
2
|
import "./ap-button.vue2.mjs";
|
|
3
3
|
import f from "./ap-button.vue.mjs";
|
|
4
|
-
const k = /* @__PURE__ */
|
|
4
|
+
const k = /* @__PURE__ */ p({
|
|
5
5
|
__name: "ap-action-button",
|
|
6
6
|
props: {
|
|
7
7
|
prefixCls: {},
|
|
8
8
|
htmlType: {},
|
|
9
9
|
shape: {},
|
|
10
10
|
size: {},
|
|
11
|
-
loading: { type: [Boolean, Object] },
|
|
11
|
+
loading: { type: [Boolean, Object], default: void 0 },
|
|
12
12
|
disabled: { type: Boolean },
|
|
13
13
|
ghost: { type: Boolean },
|
|
14
14
|
block: { type: Boolean },
|
|
@@ -25,14 +25,14 @@ const k = /* @__PURE__ */ s({
|
|
|
25
25
|
},
|
|
26
26
|
setup(n) {
|
|
27
27
|
const a = n;
|
|
28
|
-
return (e, y) => (
|
|
28
|
+
return (e, y) => (s(), i(f, t(r({
|
|
29
29
|
...e.$attrs,
|
|
30
30
|
...a
|
|
31
|
-
})),
|
|
32
|
-
|
|
31
|
+
})), d({ _: 2 }, [
|
|
32
|
+
c(Object.keys(e.$slots), (o) => ({
|
|
33
33
|
name: o,
|
|
34
|
-
fn: m((
|
|
35
|
-
u(e.$slots, o, t(r(
|
|
34
|
+
fn: m((l) => [
|
|
35
|
+
u(e.$slots, o, t(r(l || {})))
|
|
36
36
|
])
|
|
37
37
|
}))
|
|
38
38
|
]), 1040));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as D, ref as L, reactive as k, nextTick as K, toRaw as
|
|
1
|
+
import { defineComponent as D, ref as L, reactive as k, nextTick as K, toRaw as b, computed as $, openBlock as G, createBlock as H, unref as B, mergeProps as J, withCtx as Q, renderSlot as U } from "vue";
|
|
2
2
|
import { Form as X } from "ant-design-vue";
|
|
3
3
|
import { useProvideForm as Y } from "./context.mjs";
|
|
4
|
-
import { isArray as
|
|
4
|
+
import { isArray as f, cloneDeep as I, isFunction as m, isPlainObject as _, omit as Z } from "lodash-unified";
|
|
5
5
|
import { INTERNAL_FORM_INSTANCE_MARK as ee } from "./constant.mjs";
|
|
6
|
-
import { isDef as
|
|
6
|
+
import { isDef as y } from "../utils/index.mjs";
|
|
7
7
|
import te from "./utils/set.mjs";
|
|
8
8
|
const ue = /* @__PURE__ */ D({
|
|
9
9
|
__name: "ap-form",
|
|
@@ -33,153 +33,153 @@ const ue = /* @__PURE__ */ D({
|
|
|
33
33
|
onValidate: {},
|
|
34
34
|
initialValues: {}
|
|
35
35
|
},
|
|
36
|
-
setup(
|
|
37
|
-
const a =
|
|
38
|
-
function
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
41
|
-
let
|
|
36
|
+
setup(M, { expose: O }) {
|
|
37
|
+
const a = M;
|
|
38
|
+
function g(e, t, l = !0) {
|
|
39
|
+
var s;
|
|
40
|
+
if (f(e)) {
|
|
41
|
+
let o = r;
|
|
42
42
|
for (let u = 0; u < e.length - 1; u++)
|
|
43
|
-
e[u] in
|
|
44
|
-
|
|
43
|
+
e[u] in o || (o[e[u]] = {}), o = o[e[u]];
|
|
44
|
+
o[e[e.length - 1]] = t;
|
|
45
45
|
} else
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
l && ((
|
|
46
|
+
r[e] = t;
|
|
47
|
+
let i = f(e) ? e[0] : e;
|
|
48
|
+
l && ((s = a.onValuesChange) == null || s.call(a, { [i]: r[i] }, r)), h();
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function w(e) {
|
|
51
51
|
var l;
|
|
52
|
-
const t =
|
|
52
|
+
const t = p(e, c);
|
|
53
53
|
(l = a.onFinish) == null || l.call(a, t);
|
|
54
54
|
}
|
|
55
55
|
const n = L();
|
|
56
|
-
let
|
|
57
|
-
const
|
|
58
|
-
let
|
|
59
|
-
const
|
|
56
|
+
let v = a.initialValues ? I(a.initialValues) : {}, c = {};
|
|
57
|
+
const r = k(a.initialValues || {});
|
|
58
|
+
let F = [];
|
|
59
|
+
const E = async () => {
|
|
60
60
|
var e;
|
|
61
61
|
(e = n.value) == null || e.resetFields(), await K(() => {
|
|
62
|
-
Object.keys(
|
|
62
|
+
Object.keys(r).forEach((t) => delete r[t]), Object.assign(r, I(v)), h();
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, j = (e) => {
|
|
65
65
|
var t;
|
|
66
66
|
(t = n.value) == null || t.clearValidate(e);
|
|
67
|
-
},
|
|
67
|
+
}, x = (e, t) => {
|
|
68
68
|
var l;
|
|
69
69
|
return (l = n.value) == null ? void 0 : l.validateFields(e, t);
|
|
70
|
-
},
|
|
71
|
-
var
|
|
72
|
-
const l = await ((
|
|
70
|
+
}, A = async (e, t) => {
|
|
71
|
+
var i;
|
|
72
|
+
const l = await ((i = n.value) == null ? void 0 : i.validateFields(
|
|
73
73
|
e,
|
|
74
74
|
t
|
|
75
75
|
));
|
|
76
|
-
return
|
|
77
|
-
},
|
|
76
|
+
return p(l, c);
|
|
77
|
+
}, N = (e) => {
|
|
78
78
|
var t;
|
|
79
79
|
return (t = n.value) == null ? void 0 : t.getFieldsValue(e);
|
|
80
|
-
},
|
|
80
|
+
}, P = (e) => {
|
|
81
81
|
var l;
|
|
82
82
|
const t = (l = n.value) == null ? void 0 : l.getFieldsValue(e);
|
|
83
|
-
return
|
|
84
|
-
},
|
|
83
|
+
return p(t, c);
|
|
84
|
+
}, S = (e, t) => {
|
|
85
85
|
var l;
|
|
86
86
|
return (l = n.value) == null ? void 0 : l.validate(e, t);
|
|
87
|
-
},
|
|
87
|
+
}, W = (e, t = {}) => {
|
|
88
88
|
var l;
|
|
89
89
|
(l = n.value) == null || l.scrollToField(e, t);
|
|
90
|
-
},
|
|
91
|
-
Object.assign(
|
|
92
|
-
},
|
|
93
|
-
|
|
90
|
+
}, q = (e) => {
|
|
91
|
+
Object.assign(r, e), h();
|
|
92
|
+
}, R = (e, t) => {
|
|
93
|
+
g(e, t), h();
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
return t || e(
|
|
97
|
-
|
|
95
|
+
function V(e, t) {
|
|
96
|
+
return t || e(b(r)), F.push(e), () => {
|
|
97
|
+
F = F.filter((l) => l !== e);
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
if (
|
|
102
|
-
if (
|
|
103
|
-
let
|
|
104
|
-
for (let
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
function T({ initialValue: e, name: t, transform: l }) {
|
|
101
|
+
if (y(e) && y(t))
|
|
102
|
+
if (g(t, e, !1), f(t)) {
|
|
103
|
+
let i = v;
|
|
104
|
+
for (let s = 0; s < t.length - 1; s++)
|
|
105
|
+
y(i[t[s]]) || (i[t[s]] = {}), i = i[t[s]];
|
|
106
|
+
i[t[t.length - 1]] = e;
|
|
107
107
|
} else
|
|
108
|
-
|
|
109
|
-
c = te(
|
|
108
|
+
v[t] = e;
|
|
109
|
+
l && (c = te(
|
|
110
110
|
c,
|
|
111
111
|
[t].flat(1),
|
|
112
112
|
l,
|
|
113
113
|
!0
|
|
114
|
-
);
|
|
114
|
+
));
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function z(e) {
|
|
117
117
|
if (e !== ee) {
|
|
118
118
|
console.warn("getInternalInstance should only used at internal");
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
return {
|
|
122
|
-
registerField:
|
|
123
|
-
registerWatch:
|
|
122
|
+
registerField: T,
|
|
123
|
+
registerWatch: V
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
if (
|
|
128
|
-
const e =
|
|
129
|
-
|
|
126
|
+
function h() {
|
|
127
|
+
if (F.length) {
|
|
128
|
+
const e = b(r);
|
|
129
|
+
F.forEach((t) => {
|
|
130
130
|
t(e);
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function p(e, t) {
|
|
135
135
|
if (e == null)
|
|
136
136
|
return;
|
|
137
|
-
let l =
|
|
138
|
-
return Object.keys(e).forEach((
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
const
|
|
142
|
-
|
|
137
|
+
let l = f(e) ? [] : {};
|
|
138
|
+
return Object.keys(e).forEach((i) => {
|
|
139
|
+
const s = e[i], o = t == null ? void 0 : t[i], u = m(o) ? o : o == null ? void 0 : o.transformer, C = m(o) ? !0 : o == null ? void 0 : o.flat;
|
|
140
|
+
if (m(u)) {
|
|
141
|
+
const d = u(s);
|
|
142
|
+
C ? f(d) && f(l) ? l = [...l, ...d] : _(d) && _(l) ? l = {
|
|
143
143
|
...l,
|
|
144
|
-
...
|
|
145
|
-
} : l[
|
|
146
|
-
} else if (
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
...d
|
|
145
|
+
} : l[i] = d : l[i] = d;
|
|
146
|
+
} else if (_(s) || f(s)) {
|
|
147
|
+
const d = p(
|
|
148
|
+
s,
|
|
149
|
+
o
|
|
150
150
|
);
|
|
151
|
-
l[
|
|
151
|
+
l[i] = d;
|
|
152
152
|
} else
|
|
153
|
-
l[
|
|
153
|
+
l[i] = s;
|
|
154
154
|
}), l;
|
|
155
155
|
}
|
|
156
156
|
return Y({
|
|
157
|
-
model: $(() =>
|
|
158
|
-
updateModel:
|
|
157
|
+
model: $(() => r),
|
|
158
|
+
updateModel: g,
|
|
159
159
|
internalInstance: {
|
|
160
|
-
registerWatch:
|
|
161
|
-
registerField:
|
|
162
|
-
setFieldValue:
|
|
160
|
+
registerWatch: V,
|
|
161
|
+
registerField: T,
|
|
162
|
+
setFieldValue: R
|
|
163
163
|
}
|
|
164
|
-
}),
|
|
165
|
-
resetFields:
|
|
166
|
-
clearValidate:
|
|
167
|
-
validateFields:
|
|
168
|
-
getFieldsValue:
|
|
169
|
-
validate:
|
|
170
|
-
scrollToField:
|
|
171
|
-
setFieldsValue:
|
|
172
|
-
setFieldValue:
|
|
173
|
-
registerWatch:
|
|
174
|
-
validateFieldsReturnTransformed:
|
|
175
|
-
getFieldsValueTransformed:
|
|
176
|
-
getInternalInstance:
|
|
177
|
-
}), (e, t) => (G(), H(
|
|
164
|
+
}), O({
|
|
165
|
+
resetFields: E,
|
|
166
|
+
clearValidate: j,
|
|
167
|
+
validateFields: x,
|
|
168
|
+
getFieldsValue: N,
|
|
169
|
+
validate: S,
|
|
170
|
+
scrollToField: W,
|
|
171
|
+
setFieldsValue: q,
|
|
172
|
+
setFieldValue: R,
|
|
173
|
+
registerWatch: V,
|
|
174
|
+
validateFieldsReturnTransformed: A,
|
|
175
|
+
getFieldsValueTransformed: P,
|
|
176
|
+
getInternalInstance: z
|
|
177
|
+
}), (e, t) => (G(), H(B(X), J({
|
|
178
178
|
ref_key: "formRef",
|
|
179
179
|
ref: n
|
|
180
|
-
},
|
|
181
|
-
onFinish:
|
|
182
|
-
model:
|
|
180
|
+
}, B(Z)(a, ["initialValues", "onValuesChange", "onFinish"]), {
|
|
181
|
+
onFinish: w,
|
|
182
|
+
model: r
|
|
183
183
|
}), {
|
|
184
184
|
default: Q(() => [
|
|
185
185
|
U(e.$slots, "default")
|