@aplus-frontend/ui 0.5.7 → 0.5.9
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 +109 -107
- package/es/src/ap-grid/editable/form-item.vue.mjs +7 -7
- package/es/src/ap-grid/editable/index.vue.mjs +16 -16
- package/es/src/ap-grid/utils/col.mjs +13 -13
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +4 -2
- package/es/src/business/hooks/usePageListApGrid.d.ts +34 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +91 -0
- package/es/src/index.mjs +61 -59
- package/lib/index.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/business/hooks/index.d.ts +1 -0
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/usePageListApGrid.d.ts +34 -0
- package/lib/src/business/hooks/usePageListApGrid.js +1 -0
- package/lib/src/index.js +1 -1
- package/package.json +3 -3
- package/theme/ap-grid/index.css +1 -0
- package/theme/ap-grid/index.less +1 -0
- package/theme/index.css +1 -0
package/es/index.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import * as o from "./src/index.mjs";
|
|
|
2
2
|
import { default as l } from "./src/path-map.mjs";
|
|
3
3
|
import "./src/hooks/index.mjs";
|
|
4
4
|
import { configProviderProps as d } from "./src/config-provider/config-provider-props.mjs";
|
|
5
|
-
import { DEFAULT_NAMESPACE as s, DEFAULT_UIMODE as A, configProviderContextKey as
|
|
5
|
+
import { DEFAULT_NAMESPACE as s, DEFAULT_UIMODE as A, configProviderContextKey as i } from "./src/config-provider/constants.mjs";
|
|
6
6
|
import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as I } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
|
-
import { buildLocaleContext as T, buildTranslator as S, localeContextKey as C, translate as
|
|
8
|
-
import { defaultNamespace as
|
|
9
|
-
import { ConfigProvider as
|
|
7
|
+
import { buildLocaleContext as T, buildTranslator as S, localeContextKey as C, translate as g, useLocale as D } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { defaultNamespace as h, namespaceContextKey as P, useGetDerivedNamespace as E, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { ConfigProvider as M, globalConfigCached as N } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as w } from "./src/config-provider/index.mjs";
|
|
11
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";
|
|
@@ -24,15 +24,15 @@ import { default as fe } from "./src/ap-form/item-group/index.vue.mjs";
|
|
|
24
24
|
import { default as le } from "./src/ap-form/list/index.vue.mjs";
|
|
25
25
|
import { default as de } from "./src/ap-form/search-form/index.vue.mjs";
|
|
26
26
|
import { default as se } from "./src/ap-form/modal-form/index.vue.mjs";
|
|
27
|
-
import { default as
|
|
27
|
+
import { default as ie } from "./src/ap-form/dependency/index.vue.mjs";
|
|
28
28
|
import { default as ce } from "./src/ap-form/set/index.vue.mjs";
|
|
29
29
|
import { default as Ie } from "./src/ap-form/drawer-form/index.vue.mjs";
|
|
30
30
|
import { default as Te } from "./src/ap-form/render/control.vue.mjs";
|
|
31
31
|
import { default as Ce } from "./src/ap-form/render/item.vue.mjs";
|
|
32
|
-
import { default as
|
|
33
|
-
import { ApField as
|
|
34
|
-
import { ApFieldText as
|
|
35
|
-
import { default as
|
|
32
|
+
import { default as De } from "./src/ap-form/provider/index.vue.mjs";
|
|
33
|
+
import { ApField as he } from "./src/ap-field/index.mjs";
|
|
34
|
+
import { ApFieldText as Ee } from "./src/ap-field/text/index.mjs";
|
|
35
|
+
import { default as Le } 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
38
|
import { default as Be } from "./src/ap-field/radio/index.vue.mjs";
|
|
@@ -50,15 +50,15 @@ import { default as ao } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
|
50
50
|
import { default as mo } from "./src/ap-action/item-popconfirm/index.vue.mjs";
|
|
51
51
|
import { default as xo } from "./src/ap-action/item-dropdown/index.vue.mjs";
|
|
52
52
|
import { default as so } from "./src/ap-action/group/index.vue.mjs";
|
|
53
|
-
import { DictCode as
|
|
53
|
+
import { DictCode as io, langMap as no } from "./src/work-order-modal/interfaces.mjs";
|
|
54
54
|
import { createWorkOrderModal as Fo } from "./src/work-order-modal/createWorkOrder.mjs";
|
|
55
55
|
import { default as bo } from "./src/work-order-modal/work-order-modal.vue.mjs";
|
|
56
56
|
import { default as So } from "./src/ap-tag/ap-tag.vue.mjs";
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { NeedNameKeyDefault as
|
|
57
|
+
import { default as go } from "./src/ap-tag/ap-tag-group.vue.mjs";
|
|
58
|
+
import { default as Go } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
|
|
59
|
+
import { NeedNameKeyDefault as Po } from "./src/ap-upload/apUploadTypes.mjs";
|
|
60
60
|
import { default as Ro } from "./src/ap-upload/apUpload.vue.mjs";
|
|
61
|
-
import { ApDownLoadNeedNameKeyDefault as
|
|
61
|
+
import { ApDownLoadNeedNameKeyDefault as Mo } 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
64
|
import { default as ko } from "./src/check-card/group.vue.mjs";
|
|
@@ -77,14 +77,14 @@ import { ApBatchAction as mr } from "./src/business/ap-batch-action/index.mjs";
|
|
|
77
77
|
import { ApBatchActionGroup as xr } from "./src/business/ap-batch-action-group/index.mjs";
|
|
78
78
|
import { ApButtonGroup as ur } from "./src/business/ap-button-group/index.mjs";
|
|
79
79
|
import { ApCard as Ar } from "./src/business/ap-card/index.mjs";
|
|
80
|
-
import { ApExpandAlert as
|
|
80
|
+
import { ApExpandAlert as nr } from "./src/business/ap-expand-alert/index.mjs";
|
|
81
81
|
import { ApExportGroupActionType as Fr } from "./src/business/ap-export-group/interface.mjs";
|
|
82
82
|
import { ApExportGroup as br } from "./src/business/ap-export-group/index.mjs";
|
|
83
83
|
import { handleExportDownload as Sr } from "./src/business/ap-export-group/handleExportDownload.mjs";
|
|
84
|
-
import { convertExportField as
|
|
85
|
-
import { ApImage as
|
|
86
|
-
import { ApInputRadio as
|
|
87
|
-
import { ApLabel as Rr, ApLabelGroup as
|
|
84
|
+
import { convertExportField as gr } from "./src/business/ap-export-group/convertExportField.mjs";
|
|
85
|
+
import { ApImage as Gr } from "./src/business/ap-image/index.mjs";
|
|
86
|
+
import { ApInputRadio as Pr } from "./src/business/ap-input-radio/index.mjs";
|
|
87
|
+
import { ApLabel as Rr, ApLabelGroup as Lr } from "./src/business/ap-label/index.mjs";
|
|
88
88
|
import { locales as Nr } from "./src/business/ap-ladder/interface.mjs";
|
|
89
89
|
import { ApLadder as wr } from "./src/business/ap-ladder/index.mjs";
|
|
90
90
|
import { ApSelectLayout as Br } from "./src/business/ap-select-layout/index.mjs";
|
|
@@ -92,36 +92,37 @@ import { ApStatus as Kr, ApStatusGroup as Or } from "./src/business/ap-status/in
|
|
|
92
92
|
import { ApTitle as zr } from "./src/business/ap-title/index.mjs";
|
|
93
93
|
import { usePageListApTable as Wr } from "./src/business/hooks/usePageListApTable.mjs";
|
|
94
94
|
import { useTableRefresh as Hr } from "./src/business/hooks/useTableRefresh.mjs";
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import { default as dt } from "./src/business/
|
|
102
|
-
import { default as st } from "./src/business/batch-input-group/
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import { default as Ct } from "./src/editable-table/
|
|
108
|
-
import { default as
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import { default as
|
|
112
|
-
import { default as Nt } from "./src/scroll-
|
|
113
|
-
import { default as wt } from "./src/
|
|
114
|
-
import { default as Bt } from "./src/
|
|
115
|
-
import { default as Kt } from "./src/
|
|
116
|
-
import { default as Ut } from "./src/
|
|
117
|
-
import { default as Vt } from "./src/ap-grid/
|
|
118
|
-
import { default as _t } from "./src/ap-grid/editable/
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
95
|
+
import { usePageListApGrid as jr } from "./src/business/hooks/usePageListApGrid.mjs";
|
|
96
|
+
import { computedRecords as Jr, flattenColumns as Qr, formatDataIndex as Xr, formatNumber as Yr } from "./src/business/ap-summary/utils.mjs";
|
|
97
|
+
import { ApSummary as et } from "./src/business/ap-summary/index.mjs";
|
|
98
|
+
import { ApNeedNameKeyDefault as rt } from "./src/business/ap-appendix/interface.mjs";
|
|
99
|
+
import { ApAppendix as pt } from "./src/business/ap-appendix/index.mjs";
|
|
100
|
+
import { ApExtensionSelect as ft, ApGroupSearch as mt, ApPopoverSelect as lt } from "./src/business/ap-group-search/index.mjs";
|
|
101
|
+
import { default as dt } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
|
|
102
|
+
import { default as st } from "./src/business/batch-input-group/index.vue.mjs";
|
|
103
|
+
import { default as it } from "./src/business/batch-input-group/form-item.vue.mjs";
|
|
104
|
+
import { ApSizeInput as ct } from "./src/business/ap-size-input/index.mjs";
|
|
105
|
+
import { useTablePaging as It } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
106
|
+
import { ApTable as Tt } from "./src/ap-table/index.mjs";
|
|
107
|
+
import { default as Ct } from "./src/editable-table/index.vue.mjs";
|
|
108
|
+
import { default as Dt } from "./src/editable-table/form-item.vue.mjs";
|
|
109
|
+
import { default as ht } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
110
|
+
import { ensureRangeValue as Et } from "./src/scroll-bar/utils/index.mjs";
|
|
111
|
+
import { default as Lt } from "./src/scroll-bar/index.vue.mjs";
|
|
112
|
+
import { default as Nt } from "./src/scroll-bar/internal.vue.mjs";
|
|
113
|
+
import { default as wt } from "./src/scroll-view/index.vue.mjs";
|
|
114
|
+
import { default as Bt } from "./src/portal/index.vue.mjs";
|
|
115
|
+
import { default as Kt } from "./src/full-screen/index.vue.mjs";
|
|
116
|
+
import { default as Ut } from "./src/resize-observer/index.vue.mjs";
|
|
117
|
+
import { default as Vt } from "./src/ap-grid/index.vue.mjs";
|
|
118
|
+
import { default as _t } from "./src/ap-grid/editable/index.vue.mjs";
|
|
119
|
+
import { default as $t } from "./src/ap-grid/editable/form-item.vue.mjs";
|
|
120
|
+
import { useMessage as qt } from "./src/hooks/useMessage.mjs";
|
|
121
|
+
import { useControllableValue as Qt } from "./src/hooks/useControllableValue.mjs";
|
|
122
|
+
import { useManualRef as Yt } from "./src/hooks/useManualRef.mjs";
|
|
123
|
+
import { useThrottleRef as ep } from "./src/hooks/useThrottleRef.mjs";
|
|
124
|
+
import { useFullScreen as rp } from "./src/hooks/useFullScreen.mjs";
|
|
125
|
+
import { useResize as pp } from "./src/hooks/useResize.mjs";
|
|
125
126
|
const a = {
|
|
126
127
|
install: (r) => {
|
|
127
128
|
for (const t in o) {
|
|
@@ -138,7 +139,7 @@ export {
|
|
|
138
139
|
xo as ApActionItemDropdown,
|
|
139
140
|
ao as ApActionItemModal,
|
|
140
141
|
mo as ApActionItemPopconfirm,
|
|
141
|
-
|
|
142
|
+
pt as ApAppendix,
|
|
142
143
|
ar as ApAttachment,
|
|
143
144
|
mr as ApBatchAction,
|
|
144
145
|
xr as ApBatchActionGroup,
|
|
@@ -146,16 +147,16 @@ export {
|
|
|
146
147
|
ur as ApButtonGroup,
|
|
147
148
|
Ar as ApCard,
|
|
148
149
|
jo as ApConfirmButton,
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
ht as ApDescriptions,
|
|
151
|
+
Mo as ApDownLoadNeedNameKeyDefault,
|
|
151
152
|
yo as ApDownload,
|
|
152
153
|
Jo as ApDrawer,
|
|
153
|
-
|
|
154
|
+
nr as ApExpandAlert,
|
|
154
155
|
br as ApExportGroup,
|
|
155
156
|
Fr as ApExportGroupActionType,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
ft as ApExtensionSelect,
|
|
158
|
+
he as ApField,
|
|
159
|
+
Le as ApFieldCheckbox,
|
|
159
160
|
Ne as ApFieldDate,
|
|
160
161
|
Ve as ApFieldDateRange,
|
|
161
162
|
we as ApFieldNumber,
|
|
@@ -166,14 +167,14 @@ export {
|
|
|
166
167
|
_e as ApFieldSelect,
|
|
167
168
|
qe as ApFieldSlider,
|
|
168
169
|
Ke as ApFieldSwitch,
|
|
169
|
-
|
|
170
|
+
Ee as ApFieldText,
|
|
170
171
|
Ue as ApFieldTextArea,
|
|
171
172
|
re as ApForm,
|
|
172
173
|
Te as ApFormControlRender,
|
|
173
|
-
|
|
174
|
+
ie as ApFormDependency,
|
|
174
175
|
Ie as ApFormDrawerForm,
|
|
175
176
|
pe as ApFormItem,
|
|
176
|
-
|
|
177
|
+
it as ApFormItemBatchInput,
|
|
177
178
|
Y as ApFormItemCheckbox,
|
|
178
179
|
V as ApFormItemDate,
|
|
179
180
|
_ as ApFormItemDateRange,
|
|
@@ -188,91 +189,92 @@ export {
|
|
|
188
189
|
ee as ApFormItemTextPassword,
|
|
189
190
|
le as ApFormList,
|
|
190
191
|
se as ApFormModalForm,
|
|
191
|
-
|
|
192
|
+
De as ApFormProvider,
|
|
192
193
|
de as ApFormSearchForm,
|
|
193
194
|
ce as ApFormSet,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
Vt as ApGrid,
|
|
196
|
+
mt as ApGroupSearch,
|
|
197
|
+
Gr as ApImage,
|
|
198
|
+
Go as ApInfoLayout,
|
|
199
|
+
Pr as ApInputRadio,
|
|
199
200
|
Rr as ApLabel,
|
|
200
|
-
|
|
201
|
+
Lr as ApLabelGroup,
|
|
201
202
|
wr as ApLadder,
|
|
202
203
|
zo as ApList,
|
|
203
204
|
Oo as ApModal,
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
rt as ApNeedNameKeyDefault,
|
|
206
|
+
lt as ApPopoverSelect,
|
|
206
207
|
Br as ApSelectLayout,
|
|
207
|
-
|
|
208
|
+
ct as ApSizeInput,
|
|
208
209
|
Kr as ApStatus,
|
|
209
210
|
Or as ApStatusGroup,
|
|
210
|
-
|
|
211
|
-
|
|
211
|
+
et as ApSummary,
|
|
212
|
+
Tt as ApTable,
|
|
212
213
|
Zo as ApTableModal,
|
|
213
214
|
So as ApTag,
|
|
214
|
-
|
|
215
|
+
go as ApTagGroup,
|
|
215
216
|
zr as ApTitle,
|
|
216
217
|
Xo as ApTransformDataHelper,
|
|
217
218
|
Ro as ApUpload,
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
dt as ApUploadSingle,
|
|
220
|
+
st as BatchInputGroup,
|
|
220
221
|
vo as CheckCard,
|
|
221
222
|
ko as CheckCardGroup,
|
|
222
|
-
|
|
223
|
+
M as ConfigProvider,
|
|
223
224
|
s as DEFAULT_NAMESPACE,
|
|
224
225
|
A as DEFAULT_UIMODE,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
226
|
+
io as DictCode,
|
|
227
|
+
_t as EditableGrid,
|
|
228
|
+
$t as EditableGridFormItem,
|
|
229
|
+
Ct as EditableTable,
|
|
230
|
+
Dt as EditableTableFormItem,
|
|
231
|
+
Kt as FullScreen,
|
|
232
|
+
Nt as InternalScrollBar,
|
|
233
|
+
Po as NeedNameKeyDefault,
|
|
234
|
+
Bt as Portal,
|
|
235
|
+
Ut as ResizeObserver,
|
|
236
|
+
Lt as ScrollBar,
|
|
237
|
+
wt as ScrollView,
|
|
237
238
|
bo as WorkOrderModal,
|
|
238
239
|
eo as adminToken,
|
|
239
240
|
oo as aplusToken,
|
|
240
241
|
T as buildLocaleContext,
|
|
241
242
|
S as buildTranslator,
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
Jr as computedRecords,
|
|
244
|
+
i as configProviderContextKey,
|
|
244
245
|
d as configProviderProps,
|
|
245
|
-
|
|
246
|
+
gr as convertExportField,
|
|
246
247
|
Fo as createWorkOrderModal,
|
|
247
248
|
a as default,
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
h as defaultNamespace,
|
|
250
|
+
Et as ensureRangeValue,
|
|
251
|
+
Qr as flattenColumns,
|
|
252
|
+
Xr as formatDataIndex,
|
|
253
|
+
Yr as formatNumber,
|
|
253
254
|
N as globalConfigCached,
|
|
254
255
|
Sr as handleExportDownload,
|
|
255
256
|
c as keysOf,
|
|
256
|
-
|
|
257
|
+
no as langMap,
|
|
257
258
|
C as localeContextKey,
|
|
258
259
|
Nr as locales,
|
|
259
|
-
|
|
260
|
+
P as namespaceContextKey,
|
|
260
261
|
l as pathMap,
|
|
261
262
|
F as provideGlobalConfig,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
263
|
+
g as translate,
|
|
264
|
+
Qt as useControllableValue,
|
|
265
|
+
rp as useFullScreen,
|
|
266
|
+
E as useGetDerivedNamespace,
|
|
266
267
|
I as useGlobalConfig,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
D as useLocale,
|
|
269
|
+
Yt as useManualRef,
|
|
270
|
+
qt as useMessage,
|
|
270
271
|
R as useNamespace,
|
|
272
|
+
jr as usePageListApGrid,
|
|
271
273
|
Wr as usePageListApTable,
|
|
272
|
-
|
|
274
|
+
pp as useResize,
|
|
273
275
|
or as useTableModal,
|
|
274
|
-
|
|
276
|
+
It as useTablePaging,
|
|
275
277
|
Hr as useTableRefresh,
|
|
276
278
|
tr as useTableSelectModal,
|
|
277
|
-
|
|
279
|
+
ep as useThrottleRef
|
|
278
280
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as A, useSlots as P, toRef as H, ref as y, unref as r, watch as W, nextTick as G, createBlock as K, openBlock as M, mergeProps as g, withCtx as C, createVNode as U, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
|
|
2
2
|
import { ApForm as w } from "../../ap-form/index.mjs";
|
|
3
|
-
import { isArray as Y, isNumber as
|
|
3
|
+
import { isArray as Y, isNumber as d, cloneDeep as f, omit as Z } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import { isDef as m } from "../../utils/index.mjs";
|
|
6
6
|
import { useGetEditableColumns as I } from "../hooks/use-editable-columns.mjs";
|
|
@@ -184,15 +184,15 @@ const he = /* @__PURE__ */ A({
|
|
|
184
184
|
}
|
|
185
185
|
function V(e, o = "suffix") {
|
|
186
186
|
var h;
|
|
187
|
-
const n = ((h = r(u)) == null ? void 0 : h.length) || 0, l =
|
|
187
|
+
const n = ((h = r(u)) == null ? void 0 : h.length) || 0, l = d(e) ? e : e.length;
|
|
188
188
|
if (m(a.maxLength) && n + l > a.maxLength)
|
|
189
189
|
return;
|
|
190
|
-
const s = [...r(u) || []], c =
|
|
190
|
+
const s = [...r(u) || []], c = d(e) ? new Array(e).fill(0).map(() => ({})) : f(e);
|
|
191
191
|
o === "suffix" ? s.push(...c) : s.unshift(...c), t == null || t.setFieldValue(a.name, s);
|
|
192
192
|
}
|
|
193
193
|
function _(e) {
|
|
194
|
-
let o =
|
|
195
|
-
const n =
|
|
194
|
+
let o = f(r(u) || []);
|
|
195
|
+
const n = d(e) ? [e] : e;
|
|
196
196
|
o = o.filter((l, s) => !n.includes(s)), t == null || t.setFieldValue(a.name, o);
|
|
197
197
|
}
|
|
198
198
|
function E() {
|
|
@@ -203,7 +203,7 @@ const he = /* @__PURE__ */ A({
|
|
|
203
203
|
return (o = r(u)) == null ? void 0 : o[e];
|
|
204
204
|
}
|
|
205
205
|
function j(e, o, n = !0) {
|
|
206
|
-
const l =
|
|
206
|
+
const l = f(r(u));
|
|
207
207
|
l[e] && (l[e] = {
|
|
208
208
|
...n ? l[e] : {},
|
|
209
209
|
...o
|
|
@@ -240,7 +240,7 @@ const he = /* @__PURE__ */ A({
|
|
|
240
240
|
ref: p,
|
|
241
241
|
class: r(B)(),
|
|
242
242
|
columns: r(D),
|
|
243
|
-
"data-source":
|
|
243
|
+
"data-source": u.value,
|
|
244
244
|
"search-form": !1
|
|
245
245
|
}), $({
|
|
246
246
|
_: 2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as M, useSlots as U, ref as w, watch as v, unref as n, createBlock as $, openBlock as q, withCtx as
|
|
2
|
-
import { ApForm as
|
|
3
|
-
import { isEqual as ae, isArray as b, isNumber as
|
|
1
|
+
import { defineComponent as M, useSlots as U, ref as w, watch as v, unref as n, createBlock as $, openBlock as q, withCtx as c, createVNode as R, mergeProps as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as ee } from "vue";
|
|
2
|
+
import { ApForm as p } from "../../ap-form/index.mjs";
|
|
3
|
+
import { isEqual as ae, isArray as b, isNumber as h, cloneDeep as y, omit as te } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
6
|
import { isDef as g } from "../../utils/index.mjs";
|
|
@@ -159,15 +159,15 @@ const we = /* @__PURE__ */ M({
|
|
|
159
159
|
} = oe("editable-grid"), _ = S, C = w(), {
|
|
160
160
|
value: s,
|
|
161
161
|
updateValue: L
|
|
162
|
-
} = ne(t, _), u = w(), D = re("valueTypeMap"),
|
|
163
|
-
v(() =>
|
|
162
|
+
} = ne(t, _), u = w(), D = re("valueTypeMap"), m = p.useWatch(t.name, u);
|
|
163
|
+
v(() => m.value, (e) => {
|
|
164
164
|
var a;
|
|
165
165
|
L(e), (a = t.onChange) == null || a.call(t, e);
|
|
166
166
|
}, {
|
|
167
167
|
deep: !0
|
|
168
168
|
}), v(s, (e) => {
|
|
169
169
|
var a;
|
|
170
|
-
e !== n(
|
|
170
|
+
e !== n(m) && (ae(e, n(m)) || (a = u.value) == null || a.setFieldValue(t.name, e));
|
|
171
171
|
}, {
|
|
172
172
|
deep: !0
|
|
173
173
|
});
|
|
@@ -198,16 +198,16 @@ const we = /* @__PURE__ */ M({
|
|
|
198
198
|
}
|
|
199
199
|
function O(e, a = "suffix") {
|
|
200
200
|
var i, f, x;
|
|
201
|
-
const o = ((i = n(s)) == null ? void 0 : i.length) || 0, l =
|
|
201
|
+
const o = ((i = n(s)) == null ? void 0 : i.length) || 0, l = h(e) ? e : e.length;
|
|
202
202
|
if (g(t.maxLength) && o + l > t.maxLength)
|
|
203
203
|
return;
|
|
204
|
-
const r = [...n(s) || []], d =
|
|
204
|
+
const r = [...n(s) || []], d = h(e) ? new Array(e).fill(0).map(() => ({})) : y(e);
|
|
205
205
|
a === "suffix" ? r.push(...d) : r.unshift(...d), (x = (f = u.value) == null ? void 0 : f.setFieldValue) == null || x.call(f, t.name, r);
|
|
206
206
|
}
|
|
207
207
|
function z(e) {
|
|
208
208
|
var l, r;
|
|
209
|
-
let a =
|
|
210
|
-
const o =
|
|
209
|
+
let a = y(n(s) || []);
|
|
210
|
+
const o = h(e) ? [e] : e;
|
|
211
211
|
a = a.filter((d, i) => !o.includes(i)), (r = (l = u.value) == null ? void 0 : l.setFieldValue) == null || r.call(l, t.name, a);
|
|
212
212
|
}
|
|
213
213
|
function P() {
|
|
@@ -223,7 +223,7 @@ const we = /* @__PURE__ */ M({
|
|
|
223
223
|
}
|
|
224
224
|
function W(e, a, o = !0) {
|
|
225
225
|
var r, d;
|
|
226
|
-
const l =
|
|
226
|
+
const l = y(n(s));
|
|
227
227
|
l[e] && (l[e] = {
|
|
228
228
|
...o ? l[e] : {},
|
|
229
229
|
...a
|
|
@@ -250,7 +250,7 @@ const we = /* @__PURE__ */ M({
|
|
|
250
250
|
scrollTo: G,
|
|
251
251
|
clear: K,
|
|
252
252
|
setTableData: H
|
|
253
|
-
}), (e, a) => (q(), $(n(
|
|
253
|
+
}), (e, a) => (q(), $(n(p), {
|
|
254
254
|
ref_key: "formRef",
|
|
255
255
|
ref: u,
|
|
256
256
|
"initial-values": {
|
|
@@ -260,22 +260,22 @@ const we = /* @__PURE__ */ M({
|
|
|
260
260
|
height: "100%"
|
|
261
261
|
}
|
|
262
262
|
}, {
|
|
263
|
-
default:
|
|
263
|
+
default: c(() => [R(n(p).FormItem, {
|
|
264
264
|
name: e.name,
|
|
265
265
|
"no-style": ""
|
|
266
266
|
}, {
|
|
267
|
-
default:
|
|
267
|
+
default: c(() => [R(se, J(n(te)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
|
|
268
268
|
ref_key: "tableRef",
|
|
269
269
|
ref: C,
|
|
270
270
|
class: n(V)(),
|
|
271
271
|
columns: n(E),
|
|
272
|
-
"data-source": n(
|
|
272
|
+
"data-source": n(s),
|
|
273
273
|
"search-form": !1
|
|
274
274
|
}), Q({
|
|
275
275
|
_: 2
|
|
276
276
|
}, [X(N, (o, l) => ({
|
|
277
277
|
name: l,
|
|
278
|
-
fn:
|
|
278
|
+
fn: c((r) => [Y(e.$slots, l, Z(ee(r || {})))])
|
|
279
279
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
280
280
|
_: 3
|
|
281
281
|
}, 8, ["name"])]),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createVNode as F, Fragment as w } from "vue";
|
|
2
2
|
import { isUndefined as M, isArray as S, isString as v, isBoolean as A, isNumber as B, pick as R } from "lodash-unified";
|
|
3
|
-
import { valueEnumToArray as N, getTableTitle as
|
|
3
|
+
import { valueEnumToArray as N, getTableTitle as c, getTableRenderType as W, getTableRenderProps as _, getTableCellRenderNode as j } from "../../ap-table/utils.mjs";
|
|
4
4
|
import { noRenderAsFormItemValueList as k } from "../../ap-table/constants.mjs";
|
|
5
5
|
import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
|
|
6
6
|
import z from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
|
|
7
|
-
function
|
|
7
|
+
function E(e) {
|
|
8
8
|
if (!M(e))
|
|
9
9
|
return S(e) ? e.reduce((r, t) => v(t) ? `${r}.${t}` : `${r}[${t}]`, "") : String(e);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function O(e) {
|
|
12
12
|
if (e)
|
|
13
13
|
return e === !0 ? "left" : e;
|
|
14
14
|
}
|
|
@@ -34,12 +34,12 @@ function L(e) {
|
|
|
34
34
|
if (e)
|
|
35
35
|
return (r) => e(r.value, r.row);
|
|
36
36
|
}
|
|
37
|
-
function U(e, r
|
|
37
|
+
function U(e, r) {
|
|
38
38
|
return e ? B(e) ? {
|
|
39
|
-
tooltip:
|
|
39
|
+
tooltip: r,
|
|
40
40
|
rows: e
|
|
41
41
|
} : e === !0 || e === "tooltip" ? {
|
|
42
|
-
tooltip:
|
|
42
|
+
tooltip: r,
|
|
43
43
|
rows: 1
|
|
44
44
|
} : {
|
|
45
45
|
tooltip: null,
|
|
@@ -51,7 +51,7 @@ function V(e, r, t) {
|
|
|
51
51
|
if (k.includes(e.valueType))
|
|
52
52
|
return t;
|
|
53
53
|
if (e.copyable || e.ellipsis) {
|
|
54
|
-
const n = U(e.ellipsis, r
|
|
54
|
+
const n = U(e.ellipsis, r);
|
|
55
55
|
return F(z, {
|
|
56
56
|
copyable: e.copyable,
|
|
57
57
|
ellipsis: n,
|
|
@@ -62,13 +62,13 @@ function V(e, r, t) {
|
|
|
62
62
|
}
|
|
63
63
|
function y(e, r, t) {
|
|
64
64
|
const n = R(e, ["width", "minWidth", "align"]);
|
|
65
|
-
return n.field =
|
|
66
|
-
header: () =>
|
|
65
|
+
return n.field = E(e.dataIndex), n.fixed = O(e.fixed), n.slots = {
|
|
66
|
+
header: () => c(e, t, void 0, r)
|
|
67
67
|
}, n.headerAlign = e.align, n.showOverflow = !1, n.showFooterOverflow = !1, n;
|
|
68
68
|
}
|
|
69
69
|
function x(e, r, t, n) {
|
|
70
70
|
const i = R(e, ["width", "minWidth", "align", "resizable"]);
|
|
71
|
-
i.field =
|
|
71
|
+
i.field = E(e.dataIndex), i.fixed = O(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, G(e.sorter)), i.filters = I(e), i.filterMultiple = e.filterMultiple, i.filterMethod = L(e.onFilter);
|
|
72
72
|
const a = ({
|
|
73
73
|
value: d,
|
|
74
74
|
...l
|
|
@@ -80,13 +80,13 @@ function x(e, r, t, n) {
|
|
|
80
80
|
}, {
|
|
81
81
|
value: d,
|
|
82
82
|
...l
|
|
83
|
-
}),
|
|
83
|
+
}), b = j(f, u, l.record, n), h = ((T = e.renderText) == null ? void 0 : T.call(e, {
|
|
84
84
|
value: d,
|
|
85
85
|
...l
|
|
86
86
|
})) || d, $ = e.renderText ? F(w, null, [(o = e.renderText) == null ? void 0 : o.call(e, {
|
|
87
87
|
value: d,
|
|
88
88
|
...l
|
|
89
|
-
})]) :
|
|
89
|
+
})]) : b;
|
|
90
90
|
let p = V(e, h, $);
|
|
91
91
|
return e.customRender && (p = e.customRender({
|
|
92
92
|
value: d,
|
|
@@ -107,7 +107,7 @@ function x(e, r, t, n) {
|
|
|
107
107
|
column: e
|
|
108
108
|
});
|
|
109
109
|
return i.slots = {
|
|
110
|
-
header: () =>
|
|
110
|
+
header: () => c(e, t, void 0, r),
|
|
111
111
|
default: s,
|
|
112
112
|
footer: s
|
|
113
113
|
}, i;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { usePageListApTable as o } from "./usePageListApTable.mjs";
|
|
2
|
-
import { useTableRefresh as
|
|
2
|
+
import { useTableRefresh as p } from "./useTableRefresh.mjs";
|
|
3
|
+
import { usePageListApGrid as a } from "./usePageListApGrid.mjs";
|
|
3
4
|
export {
|
|
5
|
+
a as usePageListApGrid,
|
|
4
6
|
o as usePageListApTable,
|
|
5
|
-
|
|
7
|
+
p as useTableRefresh
|
|
6
8
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UseTableRefreshOption } from '..';
|
|
2
|
+
import { ApGridExpose, ApGridProps } from '../../ap-grid';
|
|
3
|
+
export interface UsePageListApGrid extends ApGridProps {
|
|
4
|
+
/** 是否显示默认的行选择配置
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
isShowRowSelection?: boolean;
|
|
8
|
+
/** 转化ApGrid查询参数 */
|
|
9
|
+
transformSearchFormValues?: (values: any) => any;
|
|
10
|
+
/** ApGrid数据接口 */
|
|
11
|
+
api?(record: any): Promise<any>;
|
|
12
|
+
/** 发起请求的时候情况行选中
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
clearSelectionOnRequest?: boolean;
|
|
16
|
+
/** 用于覆盖默认的class */
|
|
17
|
+
class?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 表格刷新相关
|
|
20
|
+
*/
|
|
21
|
+
tableRefresh?: boolean | Omit<UseTableRefreshOption, 'apTableRef'>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 集成了列表页面的ApGrid的默认配置
|
|
25
|
+
* 表格分页器吸底效果,表格可拖动,表格行选择等
|
|
26
|
+
*/
|
|
27
|
+
export declare function usePageListApGrid(props?: UsePageListApGrid): [ApGridProps, {
|
|
28
|
+
reload: () => void;
|
|
29
|
+
reset: () => void;
|
|
30
|
+
getSearchFormValues: (transform?: boolean) => any;
|
|
31
|
+
getApGridInstance: () => ApGridExpose | undefined;
|
|
32
|
+
getSearchFormValuesAndSorted: (transform?: boolean) => any;
|
|
33
|
+
clearSelection: () => void;
|
|
34
|
+
}];
|