@aplus-frontend/ui 0.5.27 → 0.5.29
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 +84 -82
- package/es/src/ap-grid/editable/form-item.vue.mjs +20 -18
- package/es/src/ap-grid/editable/index.vue.mjs +22 -20
- package/es/src/ap-grid/index.vue.mjs +78 -69
- package/es/src/ap-grid/interface.d.ts +5 -1
- package/es/src/ap-grid/utils/col.mjs +48 -48
- package/es/src/ap-grid/utils/table.mjs +2 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +52 -52
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +6 -4
- package/es/src/business/hooks/useGridRefresh.d.ts +17 -0
- package/es/src/business/hooks/useGridRefresh.mjs +17 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +11 -11
- package/es/src/full-screen/index.vue.mjs +17 -16
- package/es/src/full-screen/interface.d.ts +2 -1
- package/es/src/index.mjs +73 -71
- 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/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +5 -1
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.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/useGridRefresh.d.ts +17 -0
- package/lib/src/business/hooks/useGridRefresh.js +1 -0
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/full-screen/interface.d.ts +2 -1
- package/lib/src/index.js +1 -1
- package/package.json +1 -1
package/es/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { configProviderProps as d } from "./src/config-provider/config-provider-
|
|
|
5
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
7
|
import { buildLocaleContext as b, 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
|
|
8
|
+
import { defaultNamespace as h, namespaceContextKey as P, useGetDerivedNamespace as R, useNamespace as E } 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
11
|
import { ApFormItemText as v } from "./src/ap-form/items/text/index.mjs";
|
|
@@ -31,8 +31,8 @@ import { default as be } from "./src/ap-form/drawer-form/index.vue.mjs";
|
|
|
31
31
|
import { default as Ce } from "./src/ap-form/render/control.vue.mjs";
|
|
32
32
|
import { default as De } from "./src/ap-form/render/item.vue.mjs";
|
|
33
33
|
import { default as he } from "./src/ap-form/provider/index.vue.mjs";
|
|
34
|
-
import { ApField as
|
|
35
|
-
import { ApFieldText as
|
|
34
|
+
import { ApField as Re } from "./src/ap-field/index.mjs";
|
|
35
|
+
import { ApFieldText as Me } from "./src/ap-field/text/index.mjs";
|
|
36
36
|
import { default as Ne } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
37
37
|
import { default as we } from "./src/ap-field/date/index.vue.mjs";
|
|
38
38
|
import { default as ve } from "./src/ap-field/number/index.vue.mjs";
|
|
@@ -57,7 +57,7 @@ import { createWorkOrderModal as So } from "./src/work-order-modal/createWorkOrd
|
|
|
57
57
|
import { default as go } from "./src/work-order-modal/work-order-modal.vue.mjs";
|
|
58
58
|
import { default as Go } from "./src/ap-tag/ap-tag.vue.mjs";
|
|
59
59
|
import { default as Po } from "./src/ap-tag/ap-tag-group.vue.mjs";
|
|
60
|
-
import { default as
|
|
60
|
+
import { default as Eo } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
|
|
61
61
|
import { NeedNameKeyDefault as Lo } from "./src/ap-upload/apUploadTypes.mjs";
|
|
62
62
|
import { default as yo } from "./src/ap-upload/apUpload.vue.mjs";
|
|
63
63
|
import { ApDownLoadNeedNameKeyDefault as ko } from "./src/ap-download/interface.mjs";
|
|
@@ -84,7 +84,7 @@ import { ApExportGroupActionType as Sr } from "./src/business/ap-export-group/in
|
|
|
84
84
|
import { ApExportGroup as gr } from "./src/business/ap-export-group/index.mjs";
|
|
85
85
|
import { handleExportDownload as Gr } from "./src/business/ap-export-group/handleExportDownload.mjs";
|
|
86
86
|
import { convertExportField as Pr } from "./src/business/ap-export-group/convertExportField.mjs";
|
|
87
|
-
import { ApImage as
|
|
87
|
+
import { ApImage as Er } from "./src/business/ap-image/index.mjs";
|
|
88
88
|
import { ApInputRadio as Lr } from "./src/business/ap-input-radio/index.mjs";
|
|
89
89
|
import { ApLabel as yr, ApLabelGroup as wr } from "./src/business/ap-label/index.mjs";
|
|
90
90
|
import { locales as vr } from "./src/business/ap-ladder/interface.mjs";
|
|
@@ -95,39 +95,40 @@ import { ApTitle as Hr } from "./src/business/ap-title/index.mjs";
|
|
|
95
95
|
import { usePageListApTable as jr } from "./src/business/hooks/usePageListApTable.mjs";
|
|
96
96
|
import { useTableRefresh as Jr } from "./src/business/hooks/useTableRefresh.mjs";
|
|
97
97
|
import { usePageListApGrid as Xr } from "./src/business/hooks/usePageListApGrid.mjs";
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import { default as ct } from "./src/business/
|
|
105
|
-
import { default as It } from "./src/business/batch-input-group/
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import { default as
|
|
111
|
-
import { default as
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import { default as vt } from "./src/scroll-bar/
|
|
115
|
-
import { default as Kt } from "./src/scroll-
|
|
116
|
-
import { default as Ut } from "./src/
|
|
117
|
-
import { default as Vt } from "./src/
|
|
118
|
-
import { default as _t } from "./src/
|
|
119
|
-
import { default as $t } from "./src/
|
|
120
|
-
import { default as qt } from "./src/ap-grid/
|
|
121
|
-
import { default as Qt } from "./src/ap-grid/editable/
|
|
122
|
-
import { default as Yt } from "./src/
|
|
123
|
-
import { default as ep } from "./src/text/
|
|
124
|
-
import { default as rp } from "./src/
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
98
|
+
import { useGridRefresh as Zr } from "./src/business/hooks/useGridRefresh.mjs";
|
|
99
|
+
import { computedRecords as ot, flattenColumns as rt, formatDataIndex as tt, formatNumber as pt } from "./src/business/ap-summary/utils.mjs";
|
|
100
|
+
import { ApSummary as ft } from "./src/business/ap-summary/index.mjs";
|
|
101
|
+
import { ApNeedNameKeyDefault as lt } from "./src/business/ap-appendix/interface.mjs";
|
|
102
|
+
import { ApAppendix as dt } from "./src/business/ap-appendix/index.mjs";
|
|
103
|
+
import { ApExtensionSelect as st, ApGroupSearch as At, ApPopoverSelect as it } from "./src/business/ap-group-search/index.mjs";
|
|
104
|
+
import { default as ct } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
|
|
105
|
+
import { default as It } from "./src/business/batch-input-group/index.vue.mjs";
|
|
106
|
+
import { default as bt } from "./src/business/batch-input-group/form-item.vue.mjs";
|
|
107
|
+
import { ApSizeInput as Ct } from "./src/business/ap-size-input/index.mjs";
|
|
108
|
+
import { useTablePaging as Dt } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
109
|
+
import { ApTable as ht } from "./src/ap-table/index.mjs";
|
|
110
|
+
import { default as Rt } from "./src/editable-table/index.vue.mjs";
|
|
111
|
+
import { default as Mt } from "./src/editable-table/form-item.vue.mjs";
|
|
112
|
+
import { default as Nt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
113
|
+
import { ensureRangeValue as wt } from "./src/scroll-bar/utils/index.mjs";
|
|
114
|
+
import { default as vt } from "./src/scroll-bar/index.vue.mjs";
|
|
115
|
+
import { default as Kt } from "./src/scroll-bar/internal.vue.mjs";
|
|
116
|
+
import { default as Ut } from "./src/scroll-view/index.vue.mjs";
|
|
117
|
+
import { default as Vt } from "./src/portal/index.vue.mjs";
|
|
118
|
+
import { default as _t } from "./src/full-screen/index.vue.mjs";
|
|
119
|
+
import { default as $t } from "./src/resize-observer/index.vue.mjs";
|
|
120
|
+
import { default as qt } from "./src/ap-grid/index.vue.mjs";
|
|
121
|
+
import { default as Qt } from "./src/ap-grid/editable/index.vue.mjs";
|
|
122
|
+
import { default as Yt } from "./src/ap-grid/editable/form-item.vue.mjs";
|
|
123
|
+
import { default as ep } from "./src/text/index.vue.mjs";
|
|
124
|
+
import { default as rp } from "./src/text/group.vue.mjs";
|
|
125
|
+
import { default as pp } from "./src/mask/index.vue.mjs";
|
|
126
|
+
import { useMessage as fp } from "./src/hooks/useMessage.mjs";
|
|
127
|
+
import { useControllableValue as lp } from "./src/hooks/useControllableValue.mjs";
|
|
128
|
+
import { useManualRef as dp } from "./src/hooks/useManualRef.mjs";
|
|
129
|
+
import { useThrottleRef as sp } from "./src/hooks/useThrottleRef.mjs";
|
|
130
|
+
import { useFullScreen as ip } from "./src/hooks/useFullScreen.mjs";
|
|
131
|
+
import { useResize as cp } from "./src/hooks/useResize.mjs";
|
|
131
132
|
const a = {
|
|
132
133
|
install: (r) => {
|
|
133
134
|
for (const t in o) {
|
|
@@ -144,7 +145,7 @@ export {
|
|
|
144
145
|
io as ApActionItemDropdown,
|
|
145
146
|
xo as ApActionItemModal,
|
|
146
147
|
so as ApActionItemPopconfirm,
|
|
147
|
-
|
|
148
|
+
dt as ApAppendix,
|
|
148
149
|
xr as ApAttachment,
|
|
149
150
|
ur as ApBatchAction,
|
|
150
151
|
Ar as ApBatchActionGroup,
|
|
@@ -152,15 +153,15 @@ export {
|
|
|
152
153
|
nr as ApButtonGroup,
|
|
153
154
|
Fr as ApCard,
|
|
154
155
|
Xo as ApConfirmButton,
|
|
155
|
-
|
|
156
|
+
Nt as ApDescriptions,
|
|
156
157
|
ko as ApDownLoadNeedNameKeyDefault,
|
|
157
158
|
Bo as ApDownload,
|
|
158
159
|
Zo as ApDrawer,
|
|
159
160
|
Tr as ApExpandAlert,
|
|
160
161
|
gr as ApExportGroup,
|
|
161
162
|
Sr as ApExportGroupActionType,
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
st as ApExtensionSelect,
|
|
164
|
+
Re as ApField,
|
|
164
165
|
Ne as ApFieldCheckbox,
|
|
165
166
|
we as ApFieldDate,
|
|
166
167
|
_e as ApFieldDateRange,
|
|
@@ -172,7 +173,7 @@ export {
|
|
|
172
173
|
$e as ApFieldSelect,
|
|
173
174
|
Qe as ApFieldSlider,
|
|
174
175
|
Ue as ApFieldSwitch,
|
|
175
|
-
|
|
176
|
+
Me as ApFieldText,
|
|
176
177
|
Ve as ApFieldTextArea,
|
|
177
178
|
ro as ApFieldTreeSelect,
|
|
178
179
|
pe as ApForm,
|
|
@@ -180,7 +181,7 @@ export {
|
|
|
180
181
|
ce as ApFormDependency,
|
|
181
182
|
be as ApFormDrawerForm,
|
|
182
183
|
fe as ApFormItem,
|
|
183
|
-
|
|
184
|
+
bt as ApFormItemBatchInput,
|
|
184
185
|
Y as ApFormItemCheckbox,
|
|
185
186
|
V as ApFormItemDate,
|
|
186
187
|
_ as ApFormItemDateRange,
|
|
@@ -199,68 +200,68 @@ export {
|
|
|
199
200
|
he as ApFormProvider,
|
|
200
201
|
se as ApFormSearchForm,
|
|
201
202
|
Ie as ApFormSet,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
qt as ApGrid,
|
|
204
|
+
At as ApGroupSearch,
|
|
205
|
+
Er as ApImage,
|
|
206
|
+
Eo as ApInfoLayout,
|
|
206
207
|
Lr as ApInputRadio,
|
|
207
208
|
yr as ApLabel,
|
|
208
209
|
wr as ApLabelGroup,
|
|
209
210
|
Kr as ApLadder,
|
|
210
211
|
Ho as ApList,
|
|
211
212
|
Wo as ApModal,
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
lt as ApNeedNameKeyDefault,
|
|
214
|
+
it as ApPopoverSelect,
|
|
214
215
|
Ur as ApSelectLayout,
|
|
215
|
-
|
|
216
|
+
Ct as ApSizeInput,
|
|
216
217
|
Vr as ApStatus,
|
|
217
218
|
Wr as ApStatusGroup,
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
ft as ApSummary,
|
|
220
|
+
ht as ApTable,
|
|
220
221
|
tr as ApTableModal,
|
|
221
222
|
Go as ApTag,
|
|
222
223
|
Po as ApTagGroup,
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
ep as ApText,
|
|
225
|
+
rp as ApTextGroup,
|
|
225
226
|
Hr as ApTitle,
|
|
226
227
|
or as ApTransformDataHelper,
|
|
227
228
|
yo as ApUpload,
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
ct as ApUploadSingle,
|
|
230
|
+
It as BatchInputGroup,
|
|
230
231
|
Oo as CheckCard,
|
|
231
232
|
zo as CheckCardGroup,
|
|
232
233
|
L as ConfigProvider,
|
|
233
234
|
s as DEFAULT_NAMESPACE,
|
|
234
235
|
A as DEFAULT_UIMODE,
|
|
235
236
|
Io as DictCode,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
Qt as EditableGrid,
|
|
238
|
+
Yt as EditableGridFormItem,
|
|
239
|
+
Rt as EditableTable,
|
|
240
|
+
Mt as EditableTableFormItem,
|
|
241
|
+
_t as FullScreen,
|
|
242
|
+
Kt as InternalScrollBar,
|
|
243
|
+
pp as Mask,
|
|
243
244
|
Lo as NeedNameKeyDefault,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
Vt as Portal,
|
|
246
|
+
$t as ResizeObserver,
|
|
247
|
+
vt as ScrollBar,
|
|
248
|
+
Ut as ScrollView,
|
|
248
249
|
go as WorkOrderModal,
|
|
249
250
|
po as adminToken,
|
|
250
251
|
ao as aplusToken,
|
|
251
252
|
b as buildLocaleContext,
|
|
252
253
|
S as buildTranslator,
|
|
253
|
-
|
|
254
|
+
ot as computedRecords,
|
|
254
255
|
i as configProviderContextKey,
|
|
255
256
|
d as configProviderProps,
|
|
256
257
|
Pr as convertExportField,
|
|
257
258
|
So as createWorkOrderModal,
|
|
258
259
|
a as default,
|
|
259
260
|
h as defaultNamespace,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
wt as ensureRangeValue,
|
|
262
|
+
rt as flattenColumns,
|
|
263
|
+
tt as formatDataIndex,
|
|
264
|
+
pt as formatNumber,
|
|
264
265
|
N as globalConfigCached,
|
|
265
266
|
Gr as handleExportDownload,
|
|
266
267
|
c as keysOf,
|
|
@@ -271,20 +272,21 @@ export {
|
|
|
271
272
|
l as pathMap,
|
|
272
273
|
F as provideGlobalConfig,
|
|
273
274
|
g as translate,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
lp as useControllableValue,
|
|
276
|
+
ip as useFullScreen,
|
|
277
|
+
R as useGetDerivedNamespace,
|
|
277
278
|
I as useGlobalConfig,
|
|
279
|
+
Zr as useGridRefresh,
|
|
278
280
|
D as useLocale,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
281
|
+
dp as useManualRef,
|
|
282
|
+
fp as useMessage,
|
|
283
|
+
E as useNamespace,
|
|
282
284
|
Xr as usePageListApGrid,
|
|
283
285
|
jr as usePageListApTable,
|
|
284
|
-
|
|
286
|
+
cp as useResize,
|
|
285
287
|
ar as useTableModal,
|
|
286
|
-
|
|
288
|
+
Dt as useTablePaging,
|
|
287
289
|
Jr as useTableRefresh,
|
|
288
290
|
mr as useTableSelectModal,
|
|
289
|
-
|
|
291
|
+
sp as useThrottleRef
|
|
290
292
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as
|
|
2
|
-
import { ApForm as
|
|
1
|
+
import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as s, watch as W, nextTick as G, createBlock as K, openBlock as U, mergeProps as g, withCtx as C, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
|
|
2
|
+
import { ApForm as y } from "../../ap-form/index.mjs";
|
|
3
3
|
import { isArray as Z, isUndefined as I, isNumber as m, cloneDeep as M, omit as ee } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import { isDef as w } from "../../utils/index.mjs";
|
|
@@ -9,7 +9,7 @@ import { useInjectForm as ae } from "../../ap-form/context.mjs";
|
|
|
9
9
|
import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
11
|
import ne from "../index.vue.mjs";
|
|
12
|
-
const
|
|
12
|
+
const Ce = /* @__PURE__ */ P({
|
|
13
13
|
name: "EditableGrid",
|
|
14
14
|
__name: "form-item",
|
|
15
15
|
props: {
|
|
@@ -106,6 +106,8 @@ const ye = /* @__PURE__ */ P({
|
|
|
106
106
|
default: void 0
|
|
107
107
|
},
|
|
108
108
|
loadingConfig: {},
|
|
109
|
+
headerCellConfig: {},
|
|
110
|
+
footerCellConfig: {},
|
|
109
111
|
rowSelection: {
|
|
110
112
|
type: Boolean,
|
|
111
113
|
default: void 0
|
|
@@ -163,7 +165,7 @@ const ye = /* @__PURE__ */ P({
|
|
|
163
165
|
const {
|
|
164
166
|
internalInstance: a,
|
|
165
167
|
model: F
|
|
166
|
-
} = ae(), p = H(l.name), d = h(S(
|
|
168
|
+
} = ae(), p = H(l.name), d = h(S(s(F), p.value) || []), N = y.useWatch(p);
|
|
167
169
|
W(() => N.value, async (e) => {
|
|
168
170
|
var o;
|
|
169
171
|
await G(), d.value = e, (o = l.onChange) == null || o.call(l, e);
|
|
@@ -173,19 +175,19 @@ const ye = /* @__PURE__ */ P({
|
|
|
173
175
|
const c = h(), v = le("valueTypeMap"), D = oe(l, v);
|
|
174
176
|
function L(e, o) {
|
|
175
177
|
var u;
|
|
176
|
-
const n = ((u =
|
|
178
|
+
const n = ((u = s(d)) == null ? void 0 : u.length) || 0;
|
|
177
179
|
if (w(l.maxLength) && n >= l.maxLength)
|
|
178
180
|
return;
|
|
179
181
|
const t = {
|
|
180
182
|
...e || {}
|
|
181
183
|
};
|
|
182
|
-
a == null || a.setFieldValue(l.name, t, !0, (
|
|
183
|
-
|
|
184
|
+
a == null || a.setFieldValue(l.name, t, !0, (f, r) => {
|
|
185
|
+
f[r] || (f[r] = [t]), I(o) ? f[r].push(t) : f[r].splice(o, 0, t);
|
|
184
186
|
});
|
|
185
187
|
}
|
|
186
188
|
function V(e, o = "suffix") {
|
|
187
|
-
var
|
|
188
|
-
const n = ((
|
|
189
|
+
var f;
|
|
190
|
+
const n = ((f = s(d)) == null ? void 0 : f.length) || 0, t = m(e) ? e : e.length;
|
|
189
191
|
if (w(l.maxLength) && n + t > l.maxLength)
|
|
190
192
|
return;
|
|
191
193
|
const u = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
|
|
@@ -196,15 +198,15 @@ const ye = /* @__PURE__ */ P({
|
|
|
196
198
|
function T(e) {
|
|
197
199
|
const o = new Set(m(e) ? [e] : e);
|
|
198
200
|
a == null || a.setFieldValue(l.name, void 0, !0, (n, t) => {
|
|
199
|
-
n[t] = n[t].filter((u,
|
|
201
|
+
n[t] = n[t].filter((u, f) => !o.has(f));
|
|
200
202
|
});
|
|
201
203
|
}
|
|
202
204
|
function _() {
|
|
203
|
-
return
|
|
205
|
+
return s(d);
|
|
204
206
|
}
|
|
205
207
|
function E(e) {
|
|
206
208
|
var o;
|
|
207
|
-
return (o =
|
|
209
|
+
return (o = s(d)) == null ? void 0 : o[e];
|
|
208
210
|
}
|
|
209
211
|
function k(e, o, n = !0) {
|
|
210
212
|
a == null || a.setFieldValue(l.name, void 0, !0, (t, u) => {
|
|
@@ -236,27 +238,27 @@ const ye = /* @__PURE__ */ P({
|
|
|
236
238
|
scrollTo: z,
|
|
237
239
|
setTableData: j,
|
|
238
240
|
clear: O
|
|
239
|
-
}), (e, o) => (U(), K(
|
|
241
|
+
}), (e, o) => (U(), K(s(y).FormItem, g(e.formItem, {
|
|
240
242
|
name: e.name,
|
|
241
243
|
label: e.label
|
|
242
244
|
}), {
|
|
243
|
-
default:
|
|
245
|
+
default: C(() => [$(ne, g(s(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
244
246
|
ref_key: "tableRef",
|
|
245
247
|
ref: c,
|
|
246
|
-
class:
|
|
247
|
-
columns:
|
|
248
|
+
class: s(B)(),
|
|
249
|
+
columns: s(D),
|
|
248
250
|
"data-source": d.value,
|
|
249
251
|
"search-form": !1
|
|
250
252
|
}), q({
|
|
251
253
|
_: 2
|
|
252
254
|
}, [J(R, (n, t) => ({
|
|
253
255
|
name: t,
|
|
254
|
-
fn:
|
|
256
|
+
fn: C((u) => [Q(e.$slots, t, X(Y(u || {})))])
|
|
255
257
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
256
258
|
_: 3
|
|
257
259
|
}, 16, ["name", "label"]));
|
|
258
260
|
}
|
|
259
261
|
});
|
|
260
262
|
export {
|
|
261
|
-
|
|
263
|
+
Ce as default
|
|
262
264
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as U, useSlots as $, ref as w, watch as x, unref as u, createBlock as q, openBlock as J, withCtx as h, createVNode as v, mergeProps as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as M, guardReactiveProps as ee } from "vue";
|
|
2
|
-
import { ApForm as
|
|
3
|
-
import { isEqual as ae, isArray as R, isUndefined as te, isNumber as
|
|
2
|
+
import { ApForm as g } from "../../ap-form/index.mjs";
|
|
3
|
+
import { isEqual as ae, isArray as R, isUndefined as te, isNumber as y, cloneDeep as le, omit as oe } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
6
|
import { isDef as b } from "../../utils/index.mjs";
|
|
7
7
|
import { useGetEditableColumns as ne } from "../hooks/use-editable-columns.mjs";
|
|
8
8
|
import "../index.vue2.mjs";
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import { useControllableValue as
|
|
9
|
+
import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useControllableValue as se } from "../../hooks/useControllableValue.mjs";
|
|
11
11
|
import { useGlobalConfig as ue } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
12
|
import ie from "../index.vue.mjs";
|
|
13
13
|
const Re = /* @__PURE__ */ U({
|
|
@@ -107,6 +107,8 @@ const Re = /* @__PURE__ */ U({
|
|
|
107
107
|
default: void 0
|
|
108
108
|
},
|
|
109
109
|
loadingConfig: {},
|
|
110
|
+
headerCellConfig: {},
|
|
111
|
+
footerCellConfig: {},
|
|
110
112
|
rowSelection: {
|
|
111
113
|
type: Boolean,
|
|
112
114
|
default: void 0
|
|
@@ -157,10 +159,10 @@ const Re = /* @__PURE__ */ U({
|
|
|
157
159
|
}) {
|
|
158
160
|
const N = $(), t = B, {
|
|
159
161
|
b: V
|
|
160
|
-
} =
|
|
162
|
+
} = re("editable-grid"), _ = S, C = w(), {
|
|
161
163
|
value: m,
|
|
162
164
|
updateValue: L
|
|
163
|
-
} =
|
|
165
|
+
} = se(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
|
|
164
166
|
x(() => c.value, (e) => {
|
|
165
167
|
var a;
|
|
166
168
|
L(e), (a = t.onChange) == null || a.call(t, e);
|
|
@@ -187,32 +189,32 @@ const Re = /* @__PURE__ */ U({
|
|
|
187
189
|
return l == null ? void 0 : l[t.name];
|
|
188
190
|
}
|
|
189
191
|
function j(e, a) {
|
|
190
|
-
var n,
|
|
192
|
+
var n, r, s;
|
|
191
193
|
const l = ((n = u(m)) == null ? void 0 : n.length) || 0;
|
|
192
194
|
if (b(t.maxLength) && l >= t.maxLength)
|
|
193
195
|
return;
|
|
194
196
|
const o = {
|
|
195
197
|
...e || {}
|
|
196
198
|
};
|
|
197
|
-
(
|
|
199
|
+
(s = (r = i.value) == null ? void 0 : r.setFieldValue) == null || s.call(r, t.name, o, !0, (d, f) => {
|
|
198
200
|
d[f] || (d[f] = [o]), te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
|
|
199
201
|
});
|
|
200
202
|
}
|
|
201
203
|
function z(e, a = "suffix") {
|
|
202
|
-
var
|
|
203
|
-
const l = ((
|
|
204
|
+
var r, s, d;
|
|
205
|
+
const l = ((r = u(m)) == null ? void 0 : r.length) || 0, o = y(e) ? e : e.length;
|
|
204
206
|
if (b(t.maxLength) && l + o > t.maxLength)
|
|
205
207
|
return;
|
|
206
|
-
const n =
|
|
207
|
-
(d = (
|
|
208
|
+
const n = y(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
|
|
209
|
+
(d = (s = i.value) == null ? void 0 : s.setFieldValue) == null || d.call(s, t.name, n, !0, (f, p) => {
|
|
208
210
|
f[p] || (f[p] = [...n]), a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
|
|
209
211
|
});
|
|
210
212
|
}
|
|
211
213
|
function I(e) {
|
|
212
214
|
var l, o;
|
|
213
|
-
const a = new Set(
|
|
214
|
-
(o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n,
|
|
215
|
-
n[
|
|
215
|
+
const a = new Set(y(e) ? [e] : e);
|
|
216
|
+
(o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, r) => {
|
|
217
|
+
n[r] = n[r].filter((s, d) => !a.has(d));
|
|
216
218
|
});
|
|
217
219
|
}
|
|
218
220
|
function O() {
|
|
@@ -228,9 +230,9 @@ const Re = /* @__PURE__ */ U({
|
|
|
228
230
|
}
|
|
229
231
|
function W(e, a, l = !0) {
|
|
230
232
|
var o, n;
|
|
231
|
-
(n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, void 0, !0, (
|
|
232
|
-
!s
|
|
233
|
-
...l ? s
|
|
233
|
+
(n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, void 0, !0, (r, s) => {
|
|
234
|
+
!r[s] || !r[s][e] || (r[s][e] = {
|
|
235
|
+
...l ? r[s][e] : {},
|
|
234
236
|
...a
|
|
235
237
|
});
|
|
236
238
|
});
|
|
@@ -256,7 +258,7 @@ const Re = /* @__PURE__ */ U({
|
|
|
256
258
|
scrollTo: G,
|
|
257
259
|
clear: K,
|
|
258
260
|
setTableData: P
|
|
259
|
-
}), (e, a) => (J(), q(u(
|
|
261
|
+
}), (e, a) => (J(), q(u(g), {
|
|
260
262
|
ref_key: "formRef",
|
|
261
263
|
ref: i,
|
|
262
264
|
"initial-values": {
|
|
@@ -266,7 +268,7 @@ const Re = /* @__PURE__ */ U({
|
|
|
266
268
|
height: "100%"
|
|
267
269
|
}
|
|
268
270
|
}, {
|
|
269
|
-
default: h(() => [v(u(
|
|
271
|
+
default: h(() => [v(u(g).FormItem, {
|
|
270
272
|
name: e.name,
|
|
271
273
|
"no-style": ""
|
|
272
274
|
}, {
|