@aplus-frontend/ui 0.5.29 → 0.5.31
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 +50 -48
- package/es/src/ap-field/interface.d.ts +3 -0
- package/es/src/ap-grid/editable/form-item.vue.mjs +45 -36
- package/es/src/ap-grid/editable/index.vue.mjs +21 -12
- package/es/src/ap-grid/index.vue.mjs +106 -102
- package/es/src/ap-grid/interface.d.ts +5 -0
- package/es/src/ap-grid/utils/col.mjs +88 -77
- package/es/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
- package/es/src/business/ap-product-info/ApProductInfo.mjs +59 -0
- package/es/src/business/ap-product-info/constans.d.ts +11 -14
- package/es/src/business/ap-product-info/constans.mjs +21 -0
- package/es/src/business/ap-product-info/index.d.ts +86 -0
- package/es/src/business/ap-product-info/index.mjs +7 -0
- package/es/src/business/ap-product-info/interface.d.ts +9 -7
- package/es/src/business/ap-product-info/interface.mjs +1 -0
- package/es/src/business/ap-product-info/style/css.d.ts +0 -0
- package/es/src/business/ap-product-info/style/css.js +1 -0
- package/es/src/business/ap-product-info/style/index.d.ts +0 -0
- package/es/src/business/ap-product-info/style/index.js +1 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +21 -19
- package/es/src/components.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +15 -7
- package/es/src/editable-table/index.vue.mjs +36 -28
- package/es/src/index.mjs +36 -34
- package/es/src/path-map.mjs +1 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +3 -0
- 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 -0
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -0
- package/lib/src/business/ap-product-info/constans.d.ts +11 -14
- package/lib/src/business/ap-product-info/constans.js +1 -0
- package/lib/src/business/ap-product-info/index.d.ts +86 -0
- package/lib/src/business/ap-product-info/index.js +1 -0
- package/lib/src/business/ap-product-info/interface.d.ts +9 -7
- package/lib/src/business/ap-product-info/interface.js +1 -0
- package/lib/src/business/ap-product-info/style/css.cjs +1 -0
- package/lib/src/business/ap-product-info/style/css.d.ts +0 -0
- package/lib/src/business/ap-product-info/style/index.cjs +1 -0
- package/lib/src/business/ap-product-info/style/index.d.ts +0 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +1 -1
- package/theme/ap-product-info/ap-product-info.css +87 -0
- package/theme/ap-product-info/ap-product-info.less +100 -0
- package/theme/index.css +87 -0
- package/theme/index.less +1 -0
package/es/index.mjs
CHANGED
|
@@ -105,30 +105,31 @@ import { default as ct } from "./src/business/ap-upload-file/ap-upload-single/ap
|
|
|
105
105
|
import { default as It } from "./src/business/batch-input-group/index.vue.mjs";
|
|
106
106
|
import { default as bt } from "./src/business/batch-input-group/form-item.vue.mjs";
|
|
107
107
|
import { ApSizeInput as Ct } from "./src/business/ap-size-input/index.mjs";
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import { default as Mt } from "./src/editable-table/
|
|
112
|
-
import { default as Nt } from "./src/
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import { default as Kt } from "./src/scroll-bar/
|
|
116
|
-
import { default as Ut } from "./src/scroll-
|
|
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/
|
|
121
|
-
import { default as Qt } from "./src/ap-grid/
|
|
122
|
-
import { default as Yt } from "./src/ap-grid/editable/
|
|
123
|
-
import { default as ep } from "./src/
|
|
124
|
-
import { default as rp } from "./src/text/
|
|
125
|
-
import { default as pp } from "./src/
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
108
|
+
import { ApProductInfo as Dt } from "./src/business/ap-product-info/index.mjs";
|
|
109
|
+
import { useTablePaging as ht } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
110
|
+
import { ApTable as Rt } from "./src/ap-table/index.mjs";
|
|
111
|
+
import { default as Mt } from "./src/editable-table/index.vue.mjs";
|
|
112
|
+
import { default as Nt } from "./src/editable-table/form-item.vue.mjs";
|
|
113
|
+
import { default as wt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
114
|
+
import { ensureRangeValue as vt } from "./src/scroll-bar/utils/index.mjs";
|
|
115
|
+
import { default as Kt } from "./src/scroll-bar/index.vue.mjs";
|
|
116
|
+
import { default as Ut } from "./src/scroll-bar/internal.vue.mjs";
|
|
117
|
+
import { default as Vt } from "./src/scroll-view/index.vue.mjs";
|
|
118
|
+
import { default as _t } from "./src/portal/index.vue.mjs";
|
|
119
|
+
import { default as $t } from "./src/full-screen/index.vue.mjs";
|
|
120
|
+
import { default as qt } from "./src/resize-observer/index.vue.mjs";
|
|
121
|
+
import { default as Qt } from "./src/ap-grid/index.vue.mjs";
|
|
122
|
+
import { default as Yt } from "./src/ap-grid/editable/index.vue.mjs";
|
|
123
|
+
import { default as ep } from "./src/ap-grid/editable/form-item.vue.mjs";
|
|
124
|
+
import { default as rp } from "./src/text/index.vue.mjs";
|
|
125
|
+
import { default as pp } from "./src/text/group.vue.mjs";
|
|
126
|
+
import { default as fp } from "./src/mask/index.vue.mjs";
|
|
127
|
+
import { useMessage as lp } from "./src/hooks/useMessage.mjs";
|
|
128
|
+
import { useControllableValue as dp } from "./src/hooks/useControllableValue.mjs";
|
|
129
|
+
import { useManualRef as sp } from "./src/hooks/useManualRef.mjs";
|
|
130
|
+
import { useThrottleRef as ip } from "./src/hooks/useThrottleRef.mjs";
|
|
131
|
+
import { useFullScreen as cp } from "./src/hooks/useFullScreen.mjs";
|
|
132
|
+
import { useResize as Ip } from "./src/hooks/useResize.mjs";
|
|
132
133
|
const a = {
|
|
133
134
|
install: (r) => {
|
|
134
135
|
for (const t in o) {
|
|
@@ -153,7 +154,7 @@ export {
|
|
|
153
154
|
nr as ApButtonGroup,
|
|
154
155
|
Fr as ApCard,
|
|
155
156
|
Xo as ApConfirmButton,
|
|
156
|
-
|
|
157
|
+
wt as ApDescriptions,
|
|
157
158
|
ko as ApDownLoadNeedNameKeyDefault,
|
|
158
159
|
Bo as ApDownload,
|
|
159
160
|
Zo as ApDrawer,
|
|
@@ -200,7 +201,7 @@ export {
|
|
|
200
201
|
he as ApFormProvider,
|
|
201
202
|
se as ApFormSearchForm,
|
|
202
203
|
Ie as ApFormSet,
|
|
203
|
-
|
|
204
|
+
Qt as ApGrid,
|
|
204
205
|
At as ApGroupSearch,
|
|
205
206
|
Er as ApImage,
|
|
206
207
|
Eo as ApInfoLayout,
|
|
@@ -212,17 +213,18 @@ export {
|
|
|
212
213
|
Wo as ApModal,
|
|
213
214
|
lt as ApNeedNameKeyDefault,
|
|
214
215
|
it as ApPopoverSelect,
|
|
216
|
+
Dt as ApProductInfo,
|
|
215
217
|
Ur as ApSelectLayout,
|
|
216
218
|
Ct as ApSizeInput,
|
|
217
219
|
Vr as ApStatus,
|
|
218
220
|
Wr as ApStatusGroup,
|
|
219
221
|
ft as ApSummary,
|
|
220
|
-
|
|
222
|
+
Rt as ApTable,
|
|
221
223
|
tr as ApTableModal,
|
|
222
224
|
Go as ApTag,
|
|
223
225
|
Po as ApTagGroup,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
rp as ApText,
|
|
227
|
+
pp as ApTextGroup,
|
|
226
228
|
Hr as ApTitle,
|
|
227
229
|
or as ApTransformDataHelper,
|
|
228
230
|
yo as ApUpload,
|
|
@@ -234,18 +236,18 @@ export {
|
|
|
234
236
|
s as DEFAULT_NAMESPACE,
|
|
235
237
|
A as DEFAULT_UIMODE,
|
|
236
238
|
Io as DictCode,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
239
|
+
Yt as EditableGrid,
|
|
240
|
+
ep as EditableGridFormItem,
|
|
241
|
+
Mt as EditableTable,
|
|
242
|
+
Nt as EditableTableFormItem,
|
|
243
|
+
$t as FullScreen,
|
|
244
|
+
Ut as InternalScrollBar,
|
|
245
|
+
fp as Mask,
|
|
244
246
|
Lo as NeedNameKeyDefault,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
_t as Portal,
|
|
248
|
+
qt as ResizeObserver,
|
|
249
|
+
Kt as ScrollBar,
|
|
250
|
+
Vt as ScrollView,
|
|
249
251
|
go as WorkOrderModal,
|
|
250
252
|
po as adminToken,
|
|
251
253
|
ao as aplusToken,
|
|
@@ -258,7 +260,7 @@ export {
|
|
|
258
260
|
So as createWorkOrderModal,
|
|
259
261
|
a as default,
|
|
260
262
|
h as defaultNamespace,
|
|
261
|
-
|
|
263
|
+
vt as ensureRangeValue,
|
|
262
264
|
rt as flattenColumns,
|
|
263
265
|
tt as formatDataIndex,
|
|
264
266
|
pt as formatNumber,
|
|
@@ -272,21 +274,21 @@ export {
|
|
|
272
274
|
l as pathMap,
|
|
273
275
|
F as provideGlobalConfig,
|
|
274
276
|
g as translate,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
+
dp as useControllableValue,
|
|
278
|
+
cp as useFullScreen,
|
|
277
279
|
R as useGetDerivedNamespace,
|
|
278
280
|
I as useGlobalConfig,
|
|
279
281
|
Zr as useGridRefresh,
|
|
280
282
|
D as useLocale,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
+
sp as useManualRef,
|
|
284
|
+
lp as useMessage,
|
|
283
285
|
E as useNamespace,
|
|
284
286
|
Xr as usePageListApGrid,
|
|
285
287
|
jr as usePageListApTable,
|
|
286
|
-
|
|
288
|
+
Ip as useResize,
|
|
287
289
|
ar as useTableModal,
|
|
288
|
-
|
|
290
|
+
ht as useTablePaging,
|
|
289
291
|
Jr as useTableRefresh,
|
|
290
292
|
mr as useTableSelectModal,
|
|
291
|
-
|
|
293
|
+
ip as useThrottleRef
|
|
292
294
|
};
|
|
@@ -7,6 +7,8 @@ import { LiteralUnion, Recordable } from '../type';
|
|
|
7
7
|
import { InputPasswordProps } from './text/input-password-props';
|
|
8
8
|
import { ZoneAlias } from '@aplus-frontend/utils';
|
|
9
9
|
import { LegacyDataNode } from '@aplus-frontend/antdv/es/vc-tree-select/interface';
|
|
10
|
+
import { SharedTimeProps } from '@aplus-frontend/antdv/es/vc-picker/panels/TimePanel';
|
|
11
|
+
import { Dayjs } from 'dayjs';
|
|
10
12
|
export type FieldMode = 'read' | 'edit';
|
|
11
13
|
export type BasicApFieldProps<FieldPropsType = any> = {
|
|
12
14
|
mode?: FieldMode;
|
|
@@ -64,6 +66,7 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
|
|
|
64
66
|
label?: string;
|
|
65
67
|
value: ZoneAlias;
|
|
66
68
|
}[];
|
|
69
|
+
disabledTime?: SharedTimeProps<Dayjs>['disabledTime'];
|
|
67
70
|
};
|
|
68
71
|
export type ApFieldNumberProps = BasicApFieldProps<InputNumberProps> & {
|
|
69
72
|
emptyText?: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as
|
|
1
|
+
import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as f, watch as W, nextTick as G, createBlock as K, openBlock as U, mergeProps as C, withCtx as g, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
|
|
2
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";
|
|
6
6
|
import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
|
|
7
7
|
import "../index.vue2.mjs";
|
|
8
|
-
import { useInjectForm as
|
|
9
|
-
import { useNamespace as
|
|
8
|
+
import { useInjectForm as te } from "../../ap-form/context.mjs";
|
|
9
|
+
import { useNamespace as ae } 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 ge = /* @__PURE__ */ P({
|
|
13
13
|
name: "EditableGrid",
|
|
14
14
|
__name: "form-item",
|
|
15
15
|
props: {
|
|
@@ -113,6 +113,7 @@ const Ce = /* @__PURE__ */ P({
|
|
|
113
113
|
default: void 0
|
|
114
114
|
},
|
|
115
115
|
onLoadingChange: {},
|
|
116
|
+
onShownColumnsChange: {},
|
|
116
117
|
pagination: {
|
|
117
118
|
type: [Boolean, Object],
|
|
118
119
|
default: !1
|
|
@@ -158,14 +159,14 @@ const Ce = /* @__PURE__ */ P({
|
|
|
158
159
|
}) {
|
|
159
160
|
const R = A(), l = x, {
|
|
160
161
|
b: B
|
|
161
|
-
} =
|
|
162
|
+
} = ae("editable-grid");
|
|
162
163
|
function S(e, o) {
|
|
163
|
-
return Z(o) ? o.reduce((n,
|
|
164
|
+
return Z(o) ? o.reduce((n, a) => n == null ? void 0 : n[a], e) : e == null ? void 0 : e[o];
|
|
164
165
|
}
|
|
165
166
|
const {
|
|
166
|
-
internalInstance:
|
|
167
|
+
internalInstance: t,
|
|
167
168
|
model: F
|
|
168
|
-
} =
|
|
169
|
+
} = te(), p = H(l.name), d = h(S(f(F), p.value) || []), N = y.useWatch(p);
|
|
169
170
|
W(() => N.value, async (e) => {
|
|
170
171
|
var o;
|
|
171
172
|
await G(), d.value = e, (o = l.onChange) == null || o.call(l, e);
|
|
@@ -174,50 +175,58 @@ const Ce = /* @__PURE__ */ P({
|
|
|
174
175
|
});
|
|
175
176
|
const c = h(), v = le("valueTypeMap"), D = oe(l, v);
|
|
176
177
|
function L(e, o) {
|
|
177
|
-
var
|
|
178
|
-
const n = ((
|
|
178
|
+
var r;
|
|
179
|
+
const n = ((r = f(d)) == null ? void 0 : r.length) || 0;
|
|
179
180
|
if (w(l.maxLength) && n >= l.maxLength)
|
|
180
181
|
return;
|
|
181
|
-
const
|
|
182
|
+
const a = {
|
|
182
183
|
...e || {}
|
|
183
184
|
};
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
t == null || t.setFieldValue(l.name, a, !0, (u, s) => {
|
|
186
|
+
if (!u[s]) {
|
|
187
|
+
u[s] = [a];
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
I(o) ? u[s].push(a) : u[s].splice(o, 0, a);
|
|
186
191
|
});
|
|
187
192
|
}
|
|
188
193
|
function V(e, o = "suffix") {
|
|
189
|
-
var
|
|
190
|
-
const n = ((
|
|
191
|
-
if (w(l.maxLength) && n +
|
|
194
|
+
var u;
|
|
195
|
+
const n = ((u = f(d)) == null ? void 0 : u.length) || 0, a = m(e) ? e : e.length;
|
|
196
|
+
if (w(l.maxLength) && n + a > l.maxLength)
|
|
192
197
|
return;
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
const r = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
|
|
199
|
+
t == null || t.setFieldValue(l.name, r, !0, (s, i) => {
|
|
200
|
+
if (!s[i]) {
|
|
201
|
+
s[i] = [...r];
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
o === "suffix" ? s[i].push(...r) : s[i].unshift(...r);
|
|
196
205
|
});
|
|
197
206
|
}
|
|
198
207
|
function T(e) {
|
|
199
208
|
const o = new Set(m(e) ? [e] : e);
|
|
200
|
-
|
|
201
|
-
n[
|
|
209
|
+
t == null || t.setFieldValue(l.name, void 0, !0, (n, a) => {
|
|
210
|
+
n[a] = n[a].filter((r, u) => !o.has(u));
|
|
202
211
|
});
|
|
203
212
|
}
|
|
204
213
|
function _() {
|
|
205
|
-
return
|
|
214
|
+
return f(d);
|
|
206
215
|
}
|
|
207
216
|
function E(e) {
|
|
208
217
|
var o;
|
|
209
|
-
return (o =
|
|
218
|
+
return (o = f(d)) == null ? void 0 : o[e];
|
|
210
219
|
}
|
|
211
220
|
function k(e, o, n = !0) {
|
|
212
|
-
|
|
213
|
-
!
|
|
214
|
-
...n ?
|
|
221
|
+
t == null || t.setFieldValue(l.name, void 0, !0, (a, r) => {
|
|
222
|
+
!a[r] || !a[r][e] || (a[r][e] = {
|
|
223
|
+
...n ? a[r][e] : {},
|
|
215
224
|
...o
|
|
216
225
|
});
|
|
217
226
|
});
|
|
218
227
|
}
|
|
219
228
|
function j(e) {
|
|
220
|
-
|
|
229
|
+
t == null || t.setFieldValue(l.name, e);
|
|
221
230
|
}
|
|
222
231
|
function z(e) {
|
|
223
232
|
var n;
|
|
@@ -226,7 +235,7 @@ const Ce = /* @__PURE__ */ P({
|
|
|
226
235
|
}
|
|
227
236
|
function O() {
|
|
228
237
|
var e;
|
|
229
|
-
(e =
|
|
238
|
+
(e = t == null ? void 0 : t.setFieldValue) == null || e.call(t, l.name, []);
|
|
230
239
|
}
|
|
231
240
|
return b({
|
|
232
241
|
add: L,
|
|
@@ -238,27 +247,27 @@ const Ce = /* @__PURE__ */ P({
|
|
|
238
247
|
scrollTo: z,
|
|
239
248
|
setTableData: j,
|
|
240
249
|
clear: O
|
|
241
|
-
}), (e, o) => (U(), K(
|
|
250
|
+
}), (e, o) => (U(), K(f(y).FormItem, C(e.formItem, {
|
|
242
251
|
name: e.name,
|
|
243
252
|
label: e.label
|
|
244
253
|
}), {
|
|
245
|
-
default:
|
|
254
|
+
default: g(() => [$(ne, C(f(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
246
255
|
ref_key: "tableRef",
|
|
247
256
|
ref: c,
|
|
248
|
-
class:
|
|
249
|
-
columns:
|
|
257
|
+
class: f(B)(),
|
|
258
|
+
columns: f(D),
|
|
250
259
|
"data-source": d.value,
|
|
251
260
|
"search-form": !1
|
|
252
261
|
}), q({
|
|
253
262
|
_: 2
|
|
254
|
-
}, [J(R, (n,
|
|
255
|
-
name:
|
|
256
|
-
fn:
|
|
263
|
+
}, [J(R, (n, a) => ({
|
|
264
|
+
name: a,
|
|
265
|
+
fn: g((r) => [Q(e.$slots, a, X(Y(r || {})))])
|
|
257
266
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
258
267
|
_: 3
|
|
259
268
|
}, 16, ["name", "label"]));
|
|
260
269
|
}
|
|
261
270
|
});
|
|
262
271
|
export {
|
|
263
|
-
|
|
272
|
+
ge as default
|
|
264
273
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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
2
|
import { ApForm as g } from "../../ap-form/index.mjs";
|
|
3
|
-
import { isEqual as ae, isArray as R, isUndefined as te, isNumber as
|
|
3
|
+
import { isEqual as ae, isArray as R, isUndefined as te, isNumber as C, 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";
|
|
@@ -114,6 +114,7 @@ const Re = /* @__PURE__ */ U({
|
|
|
114
114
|
default: void 0
|
|
115
115
|
},
|
|
116
116
|
onLoadingChange: {},
|
|
117
|
+
onShownColumnsChange: {},
|
|
117
118
|
pagination: {
|
|
118
119
|
type: [Boolean, Object],
|
|
119
120
|
default: !1
|
|
@@ -154,12 +155,12 @@ const Re = /* @__PURE__ */ U({
|
|
|
154
155
|
},
|
|
155
156
|
emits: ["update:value"],
|
|
156
157
|
setup(B, {
|
|
157
|
-
expose:
|
|
158
|
-
emit:
|
|
158
|
+
expose: S,
|
|
159
|
+
emit: F
|
|
159
160
|
}) {
|
|
160
161
|
const N = $(), t = B, {
|
|
161
162
|
b: V
|
|
162
|
-
} = re("editable-grid"), _ =
|
|
163
|
+
} = re("editable-grid"), _ = F, y = w(), {
|
|
163
164
|
value: m,
|
|
164
165
|
updateValue: L
|
|
165
166
|
} = se(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
|
|
@@ -197,22 +198,30 @@ const Re = /* @__PURE__ */ U({
|
|
|
197
198
|
...e || {}
|
|
198
199
|
};
|
|
199
200
|
(s = (r = i.value) == null ? void 0 : r.setFieldValue) == null || s.call(r, t.name, o, !0, (d, f) => {
|
|
200
|
-
|
|
201
|
+
if (!d[f]) {
|
|
202
|
+
d[f] = [o];
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
|
|
201
206
|
});
|
|
202
207
|
}
|
|
203
208
|
function z(e, a = "suffix") {
|
|
204
209
|
var r, s, d;
|
|
205
|
-
const l = ((r = u(m)) == null ? void 0 : r.length) || 0, o =
|
|
210
|
+
const l = ((r = u(m)) == null ? void 0 : r.length) || 0, o = C(e) ? e : e.length;
|
|
206
211
|
if (b(t.maxLength) && l + o > t.maxLength)
|
|
207
212
|
return;
|
|
208
|
-
const n =
|
|
213
|
+
const n = C(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
|
|
209
214
|
(d = (s = i.value) == null ? void 0 : s.setFieldValue) == null || d.call(s, t.name, n, !0, (f, p) => {
|
|
210
|
-
|
|
215
|
+
if (!f[p]) {
|
|
216
|
+
f[p] = [...n];
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
|
|
211
220
|
});
|
|
212
221
|
}
|
|
213
222
|
function I(e) {
|
|
214
223
|
var l, o;
|
|
215
|
-
const a = new Set(
|
|
224
|
+
const a = new Set(C(e) ? [e] : e);
|
|
216
225
|
(o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, r) => {
|
|
217
226
|
n[r] = n[r].filter((s, d) => !a.has(d));
|
|
218
227
|
});
|
|
@@ -240,13 +249,13 @@ const Re = /* @__PURE__ */ U({
|
|
|
240
249
|
function G(e) {
|
|
241
250
|
var l;
|
|
242
251
|
const a = e === "end" ? m.value.length - 1 : e;
|
|
243
|
-
(l =
|
|
252
|
+
(l = y.value) == null || l.scrollToRow(a);
|
|
244
253
|
}
|
|
245
254
|
function K() {
|
|
246
255
|
var e, a;
|
|
247
256
|
(a = (e = i.value) == null ? void 0 : e.setFieldValue) == null || a.call(e, t.name, []);
|
|
248
257
|
}
|
|
249
|
-
return
|
|
258
|
+
return S({
|
|
250
259
|
resetFields: T,
|
|
251
260
|
validateFields: A,
|
|
252
261
|
add: j,
|
|
@@ -274,7 +283,7 @@ const Re = /* @__PURE__ */ U({
|
|
|
274
283
|
}, {
|
|
275
284
|
default: h(() => [v(ie, Q(u(oe)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
|
|
276
285
|
ref_key: "tableRef",
|
|
277
|
-
ref:
|
|
286
|
+
ref: y,
|
|
278
287
|
class: u(V)(),
|
|
279
288
|
columns: u(D),
|
|
280
289
|
"data-source": u(m),
|