@aplus-frontend/ui 6.13.3 → 6.14.0
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/src/ap-form/ap-form.vue2.mjs +123 -120
- package/es/src/ap-form/dependency/index.vue.mjs +26 -28
- package/es/src/ap-form/hooks/use-watch.mjs +28 -31
- package/es/src/ap-form/interface.d.ts +5 -0
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +22 -24
- package/es/src/ap-form/utils/get.d.ts +2 -0
- package/es/src/ap-form/utils/get.mjs +12 -7
- package/es/src/ap-grid/editable/form-item.vue.mjs +84 -87
- package/es/src/ap-grid/hooks/use-row-selection.d.ts +6 -5
- package/es/src/ap-grid/hooks/use-row-selection.mjs +71 -56
- package/es/src/ap-grid/index.vue.mjs +7 -10
- package/es/src/business/ap-export-group/convertExportField.d.ts +3 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +34 -28
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +9 -7
- package/es/src/editable-table/form-item.vue.mjs +78 -81
- package/es/src/locale/lang/en.mjs +1 -1
- package/es/src/locale/lang/zh-cn.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/dependency/index.vue.js +1 -1
- package/lib/src/ap-form/hooks/use-watch.js +1 -1
- package/lib/src/ap-form/interface.d.ts +5 -0
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
- package/lib/src/ap-form/utils/get.d.ts +2 -0
- package/lib/src/ap-form/utils/get.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/hooks/use-row-selection.d.ts +6 -5
- package/lib/src/ap-grid/hooks/use-row-selection.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/business/ap-export-group/convertExportField.d.ts +3 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/antdv-override.css +0 -24
- package/theme/antdv-override.less +0 -33
- package/theme/css-var.css +2 -0
- package/theme/css-var.less +4 -0
- package/theme/index.css +2 -24
- package/theme/reset.css +18 -0
- package/theme/reset.less +26 -2
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as K, useSlots as H, toRef as P, ref as h, unref as u, watch as A, nextTick as W, createBlock as G, openBlock as U, mergeProps as y, 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 C } from "../../ap-form/index.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { isUndefined as Z, isNumber as m, cloneDeep as I, isArray as M, omit as ee } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { isDef as
|
|
6
|
-
import { useGetEditableColumns as
|
|
5
|
+
import { isDef as w } from "../../utils/index.mjs";
|
|
6
|
+
import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
|
|
7
7
|
import "../index.vue2.mjs";
|
|
8
|
-
import { useInjectForm as
|
|
8
|
+
import { useInjectForm as te } from "../../ap-form/context.mjs";
|
|
9
|
+
import { getModelValue as ae } from "../../ap-form/utils/get.mjs";
|
|
9
10
|
import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
11
|
import { useGlobalConfig as ne } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
12
|
+
import re from "../index.vue.mjs";
|
|
13
|
+
const we = /* @__PURE__ */ K({
|
|
13
14
|
name: "EditableGridFormItem",
|
|
14
15
|
__name: "form-item",
|
|
15
16
|
props: {
|
|
@@ -161,134 +162,130 @@ const Ce = /* @__PURE__ */ P({
|
|
|
161
162
|
default: () => ({})
|
|
162
163
|
}
|
|
163
164
|
},
|
|
164
|
-
setup(
|
|
165
|
-
expose:
|
|
165
|
+
setup(b, {
|
|
166
|
+
expose: x
|
|
166
167
|
}) {
|
|
167
|
-
const
|
|
168
|
-
b:
|
|
169
|
-
} = le("editable-grid")
|
|
170
|
-
function F(e, t) {
|
|
171
|
-
return w(t) ? t.reduce((n, a) => n == null ? void 0 : n[a], e) : e == null ? void 0 : e[t];
|
|
172
|
-
}
|
|
173
|
-
const {
|
|
168
|
+
const R = H(), l = b, {
|
|
169
|
+
b: B
|
|
170
|
+
} = le("editable-grid"), {
|
|
174
171
|
internalInstance: o,
|
|
175
|
-
model:
|
|
176
|
-
} =
|
|
177
|
-
|
|
178
|
-
var
|
|
179
|
-
await
|
|
172
|
+
model: S
|
|
173
|
+
} = te(), p = P(l.name), d = h(ae(u(S), p.value) || []), v = C.useWatch(p);
|
|
174
|
+
A(() => v.value, async (e) => {
|
|
175
|
+
var a;
|
|
176
|
+
await W(), d.value = e, (a = l.onChange) == null || a.call(l, e);
|
|
180
177
|
}, {
|
|
181
178
|
deep: !0
|
|
182
179
|
});
|
|
183
|
-
const c = h(),
|
|
184
|
-
function
|
|
185
|
-
var
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
180
|
+
const c = h(), F = ne("valueTypeMap"), N = oe(l, F);
|
|
181
|
+
function D(e, a) {
|
|
182
|
+
var n;
|
|
183
|
+
const r = ((n = u(d)) == null ? void 0 : n.length) || 0;
|
|
184
|
+
if (w(l.maxLength) && r >= l.maxLength)
|
|
188
185
|
return;
|
|
189
|
-
const
|
|
186
|
+
const t = {
|
|
190
187
|
...e || {}
|
|
191
188
|
};
|
|
192
|
-
o == null || o.setFieldValue(l.name,
|
|
193
|
-
if (!
|
|
194
|
-
|
|
189
|
+
o == null || o.setFieldValue(l.name, t, !0, (f, s) => {
|
|
190
|
+
if (!f[s]) {
|
|
191
|
+
f[s] = [t];
|
|
195
192
|
return;
|
|
196
193
|
}
|
|
197
|
-
|
|
194
|
+
Z(a) ? f[s].push(t) : f[s].splice(a, 0, t);
|
|
198
195
|
});
|
|
199
196
|
}
|
|
200
|
-
function
|
|
201
|
-
var
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
197
|
+
function V(e, a = "suffix") {
|
|
198
|
+
var f;
|
|
199
|
+
const r = ((f = u(d)) == null ? void 0 : f.length) || 0, t = m(e) ? e : e.length;
|
|
200
|
+
if (w(l.maxLength) && r + t > l.maxLength)
|
|
204
201
|
return;
|
|
205
|
-
const
|
|
206
|
-
o == null || o.setFieldValue(l.name,
|
|
202
|
+
const n = m(e) ? new Array(e).fill(0).map(() => ({})) : I(e);
|
|
203
|
+
o == null || o.setFieldValue(l.name, n, !0, (s, i) => {
|
|
207
204
|
if (!s[i]) {
|
|
208
|
-
s[i] = [...
|
|
205
|
+
s[i] = [...n];
|
|
209
206
|
return;
|
|
210
207
|
}
|
|
211
|
-
|
|
208
|
+
a === "suffix" ? s[i].push(...n) : s[i].unshift(...n);
|
|
212
209
|
});
|
|
213
210
|
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
o == null || o.setFieldValue(l.name, void 0, !0, (
|
|
217
|
-
|
|
211
|
+
function L(e) {
|
|
212
|
+
const a = new Set(m(e) ? [e] : e);
|
|
213
|
+
o == null || o.setFieldValue(l.name, void 0, !0, (r, t) => {
|
|
214
|
+
r[t] = r[t].filter((n, f) => !a.has(f));
|
|
218
215
|
});
|
|
219
216
|
}
|
|
220
|
-
function
|
|
221
|
-
var
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
|
|
217
|
+
function T(e) {
|
|
218
|
+
var r;
|
|
219
|
+
const a = new Set(M(e) ? e : [e]);
|
|
220
|
+
a.size !== 0 && ((r = o == null ? void 0 : o.setFieldValue) == null || r.call(o, l.name, void 0, !0, (t, n) => {
|
|
221
|
+
t[n] = t[n].filter((f) => !a.has(f[l.rowKey]));
|
|
225
222
|
}));
|
|
226
223
|
}
|
|
227
|
-
function
|
|
224
|
+
function k() {
|
|
228
225
|
return u(d);
|
|
229
226
|
}
|
|
230
|
-
function
|
|
231
|
-
var
|
|
232
|
-
return (
|
|
227
|
+
function _(e) {
|
|
228
|
+
var a;
|
|
229
|
+
return (a = u(d)) == null ? void 0 : a[e];
|
|
233
230
|
}
|
|
234
|
-
function
|
|
235
|
-
o == null || o.setFieldValue(l.name, void 0, !0, (
|
|
236
|
-
if (!(!
|
|
237
|
-
if (!
|
|
238
|
-
const
|
|
239
|
-
for (const s of
|
|
240
|
-
s !== l.rowKey && delete
|
|
231
|
+
function j(e, a, r = !0) {
|
|
232
|
+
o == null || o.setFieldValue(l.name, void 0, !0, (t, n) => {
|
|
233
|
+
if (!(!t[n] || !t[n][e])) {
|
|
234
|
+
if (!r) {
|
|
235
|
+
const f = Object.keys(t[n][e]);
|
|
236
|
+
for (const s of f)
|
|
237
|
+
s !== l.rowKey && delete t[n][e][s];
|
|
241
238
|
}
|
|
242
|
-
Object.assign(
|
|
243
|
-
...
|
|
239
|
+
Object.assign(t[n][e], {
|
|
240
|
+
...a
|
|
244
241
|
});
|
|
245
242
|
}
|
|
246
243
|
});
|
|
247
244
|
}
|
|
248
|
-
function
|
|
245
|
+
function E(e) {
|
|
249
246
|
o == null || o.setFieldValue(l.name, e);
|
|
250
247
|
}
|
|
251
|
-
function
|
|
252
|
-
var
|
|
253
|
-
const
|
|
254
|
-
(
|
|
248
|
+
function O(e) {
|
|
249
|
+
var r;
|
|
250
|
+
const a = e === "end" ? d.value.length - 1 : e;
|
|
251
|
+
(r = c.value) == null || r.scrollToRow(a);
|
|
255
252
|
}
|
|
256
|
-
function
|
|
253
|
+
function z() {
|
|
257
254
|
var e;
|
|
258
255
|
(e = o == null ? void 0 : o.setFieldValue) == null || e.call(o, l.name, []);
|
|
259
256
|
}
|
|
260
|
-
return
|
|
261
|
-
add:
|
|
262
|
-
remove:
|
|
263
|
-
getRowData:
|
|
264
|
-
getRowsData:
|
|
265
|
-
setRowData:
|
|
266
|
-
addMultiple:
|
|
267
|
-
scrollTo:
|
|
268
|
-
setTableData:
|
|
269
|
-
clear:
|
|
270
|
-
removeByKey:
|
|
271
|
-
}), (e,
|
|
257
|
+
return x({
|
|
258
|
+
add: D,
|
|
259
|
+
remove: L,
|
|
260
|
+
getRowData: _,
|
|
261
|
+
getRowsData: k,
|
|
262
|
+
setRowData: j,
|
|
263
|
+
addMultiple: V,
|
|
264
|
+
scrollTo: O,
|
|
265
|
+
setTableData: E,
|
|
266
|
+
clear: z,
|
|
267
|
+
removeByKey: T
|
|
268
|
+
}), (e, a) => (U(), G(u(C).FormItem, y(e.formItem, {
|
|
272
269
|
name: e.name,
|
|
273
270
|
label: e.label
|
|
274
271
|
}), {
|
|
275
|
-
default: g(() => [
|
|
272
|
+
default: g(() => [$(re, y(u(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
276
273
|
ref_key: "tableRef",
|
|
277
274
|
ref: c,
|
|
278
|
-
class: u(
|
|
279
|
-
columns: u(
|
|
275
|
+
class: u(B)(),
|
|
276
|
+
columns: u(N),
|
|
280
277
|
"data-source": d.value,
|
|
281
278
|
"search-form": !1
|
|
282
|
-
}),
|
|
279
|
+
}), q({
|
|
283
280
|
_: 2
|
|
284
|
-
}, [
|
|
285
|
-
name:
|
|
286
|
-
fn: g((
|
|
281
|
+
}, [J(R, (r, t) => ({
|
|
282
|
+
name: t,
|
|
283
|
+
fn: g((n) => [Q(e.$slots, t, X(Y(n || {})))])
|
|
287
284
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
288
285
|
_: 3
|
|
289
286
|
}, 16, ["name", "label"]));
|
|
290
287
|
}
|
|
291
288
|
});
|
|
292
289
|
export {
|
|
293
|
-
|
|
290
|
+
we as default
|
|
294
291
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TableRowSelection } from '@aplus-frontend/antdv/lib/table/interface';
|
|
2
2
|
import { ComputedRef, Ref } from 'vue';
|
|
3
|
-
import { ApTableProps
|
|
3
|
+
import { ApTableProps } from '../../ap-table';
|
|
4
4
|
import { Recordable } from '../../type';
|
|
5
|
+
import { ApGridRowSelection } from '../interface';
|
|
5
6
|
export interface RowSelectionReturnType<RecordType = any> {
|
|
6
7
|
rowSelection: ComputedRef<TableRowSelection<RecordType>>;
|
|
7
8
|
selectedRows: Ref<Partial<RecordType>[]>;
|
|
@@ -58,12 +59,12 @@ export interface RowSelectionReturnType<RecordType = any> {
|
|
|
58
59
|
unSelectMulti: (items: RecordType[]) => void;
|
|
59
60
|
/**
|
|
60
61
|
* VxeTable 表格checkbox-change事件
|
|
61
|
-
* @param item
|
|
62
62
|
* @param select
|
|
63
|
-
* @param
|
|
63
|
+
* @param selectedRows
|
|
64
|
+
* @param reserveSelectedRows
|
|
64
65
|
* @returns
|
|
65
66
|
*/
|
|
66
|
-
selectChange: (
|
|
67
|
+
selectChange: (select: boolean, selectedRows: RecordType[], reserveSelectedRows: RecordType[]) => void;
|
|
67
68
|
/**
|
|
68
69
|
* VxeTable 表格checkbox-all事件
|
|
69
70
|
* @param item
|
|
@@ -86,7 +87,7 @@ export interface RowSelectionReturnType<RecordType = any> {
|
|
|
86
87
|
*/
|
|
87
88
|
selectMultiByKeys: (keys: (string | number)[]) => void;
|
|
88
89
|
}
|
|
89
|
-
type RowSelectionParams<T> =
|
|
90
|
+
type RowSelectionParams<T> = ApGridRowSelection<T> & {
|
|
90
91
|
/**
|
|
91
92
|
* 数据源(如果是后端分页,则表示当页数据,否则是全量数据)
|
|
92
93
|
*/
|
|
@@ -1,117 +1,132 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { isFunction as
|
|
3
|
-
function
|
|
4
|
-
return !(c != null && c.length) ||
|
|
1
|
+
import { ref as F, computed as M, unref as o } from "vue";
|
|
2
|
+
import { isFunction as v, cloneDeep as h } from "lodash-unified";
|
|
3
|
+
function T(a, c) {
|
|
4
|
+
return !(c != null && c.length) || v(a) ? [] : c.map((d) => ({ [a]: d }));
|
|
5
5
|
}
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
b(a.rowKey, a.defaultSelectedRowKeys)
|
|
6
|
+
const m = (a) => {
|
|
7
|
+
const c = F(
|
|
8
|
+
T(a.rowKey, a.defaultSelectedRowKeys)
|
|
10
9
|
);
|
|
11
|
-
function
|
|
10
|
+
function d(e, t) {
|
|
12
11
|
c.value = t;
|
|
13
12
|
}
|
|
14
|
-
const
|
|
13
|
+
const u = (e) => v(a.rowKey) ? a.rowKey(e) : e[a.rowKey], s = M(() => {
|
|
15
14
|
const e = /* @__PURE__ */ new Map();
|
|
16
15
|
return o(c).forEach((t) => {
|
|
17
|
-
e.set(
|
|
16
|
+
e.set(u(t), t);
|
|
18
17
|
}), e;
|
|
19
18
|
});
|
|
20
|
-
function
|
|
21
|
-
return o(s).has(
|
|
19
|
+
function w(e) {
|
|
20
|
+
return o(s).has(u(e));
|
|
22
21
|
}
|
|
23
22
|
function g(e) {
|
|
23
|
+
if (!f(e))
|
|
24
|
+
return;
|
|
24
25
|
const t = o(s);
|
|
25
|
-
t.set(
|
|
26
|
+
t.set(u(e), e), c.value = [...t.values()];
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function x(e) {
|
|
28
29
|
const t = o(s);
|
|
29
30
|
for (const n of e)
|
|
30
|
-
t.set(
|
|
31
|
+
f(n) && t.set(u(n), n);
|
|
31
32
|
c.value = [...t.values()];
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
if (
|
|
34
|
+
function y(e) {
|
|
35
|
+
if (v(a.rowKey))
|
|
35
36
|
return;
|
|
36
37
|
const t = o(s);
|
|
37
38
|
for (const n of e) {
|
|
38
|
-
const
|
|
39
|
-
(
|
|
40
|
-
),
|
|
41
|
-
t.set(
|
|
39
|
+
const l = o(a.dataSource).find(
|
|
40
|
+
(i) => u(i) === n
|
|
41
|
+
), r = { [a.rowKey]: n };
|
|
42
|
+
f(l || r) && t.set(n, l || r);
|
|
42
43
|
}
|
|
43
44
|
c.value = [...t.values()];
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function E(e) {
|
|
47
|
+
if (!f(e))
|
|
48
|
+
return;
|
|
46
49
|
const t = o(s);
|
|
47
|
-
t.delete(
|
|
50
|
+
t.delete(u(e)), c.value = [...t.values()];
|
|
48
51
|
}
|
|
49
|
-
function
|
|
52
|
+
function K(e) {
|
|
50
53
|
const t = o(s);
|
|
51
54
|
for (const n of e)
|
|
52
|
-
t.delete(
|
|
55
|
+
f(n) && t.delete(u(n));
|
|
53
56
|
c.value = [...t.values()];
|
|
54
57
|
}
|
|
55
|
-
function
|
|
58
|
+
function S(e, t) {
|
|
56
59
|
const n = e;
|
|
57
|
-
for (const
|
|
58
|
-
n.set(l
|
|
60
|
+
for (const l of t)
|
|
61
|
+
n.set(u(l), l);
|
|
59
62
|
return n;
|
|
60
63
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
+
function b(e, t, n) {
|
|
65
|
+
const l = o(s);
|
|
66
|
+
e ? S(l, [...n, ...t]) : o(a.dataSource).forEach((r) => {
|
|
67
|
+
const i = u(r);
|
|
68
|
+
t.some((B) => u(B) === i) ? l.set(i, r) : l.delete(i);
|
|
69
|
+
}), c.value = [...l.values()];
|
|
64
70
|
}
|
|
65
71
|
function A(e, t) {
|
|
66
|
-
|
|
72
|
+
const n = h(o(s));
|
|
73
|
+
e ? S(n, t) : o(a.dataSource).forEach((l) => {
|
|
74
|
+
f(l) && n.delete(u(l));
|
|
75
|
+
}), c.value = [...n.values()];
|
|
76
|
+
}
|
|
77
|
+
function f(e) {
|
|
78
|
+
const t = a.shown, n = a.disabled, l = t ? t(e) : !0, r = n ? n(e) : !1;
|
|
79
|
+
return l && !r;
|
|
67
80
|
}
|
|
68
81
|
function C(e, t) {
|
|
69
|
-
const n =
|
|
70
|
-
o(a.dataSource).forEach((
|
|
71
|
-
e.find((
|
|
72
|
-
}),
|
|
82
|
+
const n = h(o(s));
|
|
83
|
+
o(a.dataSource).forEach((l) => {
|
|
84
|
+
e.find((i) => u(i) === u(l)) ? n.set(u(l), l) : n.delete(u(l));
|
|
85
|
+
}), S(n, t), c.value = [...n.values()];
|
|
73
86
|
}
|
|
74
|
-
function
|
|
87
|
+
function D() {
|
|
75
88
|
const e = o(s);
|
|
76
89
|
o(a.dataSource).forEach((t) => {
|
|
77
|
-
e.set(
|
|
90
|
+
f(t) && e.set(u(t), t);
|
|
78
91
|
}), c.value = [...e.values()];
|
|
79
92
|
}
|
|
80
93
|
function R(e) {
|
|
81
|
-
|
|
94
|
+
if (!f(e))
|
|
95
|
+
return;
|
|
96
|
+
const t = o(s), n = u(e);
|
|
82
97
|
t.has(n) ? t.delete(n) : t.set(n, e), c.value = [...t.values()];
|
|
83
98
|
}
|
|
84
|
-
function
|
|
99
|
+
function I() {
|
|
85
100
|
const e = o(s);
|
|
86
101
|
o(a.dataSource).forEach((t) => {
|
|
87
|
-
e.delete(
|
|
102
|
+
f(t) && e.delete(u(t));
|
|
88
103
|
}), c.value = [...e.values()];
|
|
89
104
|
}
|
|
90
|
-
function
|
|
105
|
+
function k() {
|
|
91
106
|
c.value = [];
|
|
92
107
|
}
|
|
93
108
|
return {
|
|
94
109
|
select: g,
|
|
95
|
-
unSelect:
|
|
96
|
-
isSelected:
|
|
97
|
-
selectAll:
|
|
98
|
-
unSelectAll:
|
|
99
|
-
clearAll:
|
|
110
|
+
unSelect: E,
|
|
111
|
+
isSelected: w,
|
|
112
|
+
selectAll: D,
|
|
113
|
+
unSelectAll: I,
|
|
114
|
+
clearAll: k,
|
|
100
115
|
toggleSelect: R,
|
|
101
116
|
selectedRows: c,
|
|
102
|
-
selectMulti:
|
|
103
|
-
unSelectMulti:
|
|
104
|
-
rowSelection:
|
|
117
|
+
selectMulti: x,
|
|
118
|
+
unSelectMulti: K,
|
|
119
|
+
rowSelection: M(() => ({
|
|
105
120
|
...a,
|
|
106
|
-
onChange:
|
|
107
|
-
selectedRowKeys: o(c).map((e) =>
|
|
121
|
+
onChange: d,
|
|
122
|
+
selectedRowKeys: o(c).map((e) => u(e))
|
|
108
123
|
})),
|
|
109
|
-
selectChange:
|
|
124
|
+
selectChange: b,
|
|
110
125
|
selectAllChange: A,
|
|
111
126
|
selectRangeChange: C,
|
|
112
|
-
selectMultiByKeys:
|
|
127
|
+
selectMultiByKeys: y
|
|
113
128
|
};
|
|
114
129
|
};
|
|
115
130
|
export {
|
|
116
|
-
|
|
131
|
+
m as default
|
|
117
132
|
};
|
|
@@ -252,17 +252,14 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
252
252
|
dataSource: Pe,
|
|
253
253
|
rowKey: o.rowKey
|
|
254
254
|
}), Te = ({
|
|
255
|
-
checked: e
|
|
256
|
-
row: t
|
|
255
|
+
checked: e
|
|
257
256
|
}) => {
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
y.selectChange(t, e, r);
|
|
265
|
-
}
|
|
257
|
+
const t = s.value;
|
|
258
|
+
t && t && y.selectChange(
|
|
259
|
+
e,
|
|
260
|
+
t.getCheckboxRecords(),
|
|
261
|
+
t.getCheckboxReserveRecords()
|
|
262
|
+
);
|
|
266
263
|
}, Ne = ({
|
|
267
264
|
checked: e
|
|
268
265
|
}) => {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ApColumnType } from '../../ap-table/interface';
|
|
2
|
+
import { ApGridColumnType } from './../../ap-grid/interface';
|
|
1
3
|
import { ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
2
|
-
export declare const convertExportField: (columns: ColumnType[], convertField?: {
|
|
4
|
+
export declare const convertExportField: (columns: ColumnType[] | ApGridColumnType[] | ApColumnType[], convertField?: {
|
|
3
5
|
[key: string]: string[];
|
|
4
6
|
}) => any[];
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, computed as n, createBlock as g, openBlock as V, mergeProps as m, unref as s, withCtx as _, createVNode as x } from "vue";
|
|
2
2
|
import "./index.vue2.mjs";
|
|
3
3
|
import "../../ap-form/item/index.vue2.mjs";
|
|
4
|
-
import { isValid as
|
|
5
|
-
import { omit as
|
|
6
|
-
import
|
|
7
|
-
import k from "
|
|
8
|
-
|
|
4
|
+
import { isValid as p } from "@aplus-frontend/utils";
|
|
5
|
+
import { omit as c } from "lodash-unified";
|
|
6
|
+
import { useInjectForm as F } from "../../ap-form/context.mjs";
|
|
7
|
+
import { getModelValue as k } from "../../ap-form/utils/get.mjs";
|
|
8
|
+
import C from "../../ap-form/item/index.vue.mjs";
|
|
9
|
+
import S from "./index.vue.mjs";
|
|
10
|
+
const L = /* @__PURE__ */ B({
|
|
9
11
|
name: "ApFormItemBatchInputGroup",
|
|
10
12
|
__name: "form-item",
|
|
11
13
|
props: {
|
|
@@ -56,30 +58,34 @@ const $ = /* @__PURE__ */ b({
|
|
|
56
58
|
trim: { type: Boolean, default: !0 },
|
|
57
59
|
defaultSelectedAllKey: { type: Boolean }
|
|
58
60
|
},
|
|
59
|
-
setup(
|
|
60
|
-
const l =
|
|
61
|
+
setup(v) {
|
|
62
|
+
const l = v, { internalInstance: r } = F(), y = n(() => (l == null ? void 0 : l.transform) || {
|
|
61
63
|
flat: !1,
|
|
62
64
|
transformer: (e) => {
|
|
63
|
-
var
|
|
65
|
+
var i, o, a, d, u, f;
|
|
64
66
|
if (e)
|
|
65
|
-
return !(e != null && e.value) || ((
|
|
67
|
+
return !(e != null && e.value) || ((i = e == null ? void 0 : e.value) == null ? void 0 : i.length) < 1 ? void 0 : (o = l == null ? void 0 : l.field) != null && o.options ? {
|
|
66
68
|
...e,
|
|
67
|
-
value: (
|
|
68
|
-
} : (
|
|
69
|
+
value: (d = (a = e == null ? void 0 : e.value) == null ? void 0 : a.filter((t) => p(t == null ? void 0 : t.trim()))) == null ? void 0 : d.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
|
|
70
|
+
} : (f = (u = e == null ? void 0 : e.value) == null ? void 0 : u.filter((t) => p(t == null ? void 0 : t.trim()))) == null ? void 0 : f.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
|
|
69
71
|
}
|
|
70
|
-
}),
|
|
72
|
+
}), h = n(() => {
|
|
71
73
|
var e;
|
|
72
74
|
return ((e = l.field) == null ? void 0 : e.style) || "width:auto";
|
|
73
|
-
}),
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
}), b = n(() => {
|
|
76
|
+
var i, o;
|
|
77
|
+
if (l.initialValue)
|
|
78
|
+
return l.initialValue;
|
|
79
|
+
const e = r == null ? void 0 : r.getInitialValues();
|
|
80
|
+
if (!k(e, l.name))
|
|
81
|
+
return {
|
|
82
|
+
key: (o = (i = l == null ? void 0 : l.field) == null ? void 0 : i.options) == null ? void 0 : o.map((a) => a.value)
|
|
83
|
+
};
|
|
78
84
|
});
|
|
79
|
-
return (e,
|
|
80
|
-
var o,
|
|
81
|
-
return
|
|
82
|
-
|
|
85
|
+
return (e, i) => {
|
|
86
|
+
var o, a;
|
|
87
|
+
return V(), g(C, m(
|
|
88
|
+
s(c)(l, [
|
|
83
89
|
"field",
|
|
84
90
|
"initialValue",
|
|
85
91
|
"transform",
|
|
@@ -87,14 +93,14 @@ const $ = /* @__PURE__ */ b({
|
|
|
87
93
|
"disabled"
|
|
88
94
|
]),
|
|
89
95
|
{
|
|
90
|
-
"initial-value":
|
|
91
|
-
transform:
|
|
92
|
-
bordered: (
|
|
96
|
+
"initial-value": b.value,
|
|
97
|
+
transform: y.value,
|
|
98
|
+
bordered: (a = (o = e.field) == null ? void 0 : o.options) != null && a.length ? !1 : e.bordered
|
|
93
99
|
}
|
|
94
100
|
), {
|
|
95
101
|
default: _(() => [
|
|
96
|
-
|
|
97
|
-
style:
|
|
102
|
+
x(S, m(s(c)(l.field, ["style"]), {
|
|
103
|
+
style: h.value,
|
|
98
104
|
disabled: e.disabled,
|
|
99
105
|
placeholer: e.placeholer
|
|
100
106
|
}), null, 16, ["style", "disabled", "placeholer"])
|
|
@@ -105,5 +111,5 @@ const $ = /* @__PURE__ */ b({
|
|
|
105
111
|
}
|
|
106
112
|
});
|
|
107
113
|
export {
|
|
108
|
-
|
|
114
|
+
L as default
|
|
109
115
|
};
|
|
@@ -32,30 +32,32 @@ const J = /* @__PURE__ */ k({
|
|
|
32
32
|
}
|
|
33
33
|
h(r);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function N(t) {
|
|
36
36
|
var a;
|
|
37
37
|
o.disabled ? n.value = !1 : n.value = t, !t && ((a = o.onClose) == null || a.call(o));
|
|
38
38
|
}
|
|
39
|
-
const { b: s, e:
|
|
39
|
+
const { b: s, e: V, em: y, bm: I } = R("batch-input-group-popover-input");
|
|
40
40
|
return (t, a) => (w(), A("div", {
|
|
41
41
|
class: p(e(s)())
|
|
42
42
|
}, [
|
|
43
43
|
u(e(L), {
|
|
44
|
-
"overlay-class-name": e(
|
|
44
|
+
"overlay-class-name": e(V)("popover"),
|
|
45
45
|
"get-popup-container": x,
|
|
46
46
|
trigger: "click",
|
|
47
47
|
placement: "bottomLeft",
|
|
48
48
|
open: n.value,
|
|
49
|
-
onOpenChange:
|
|
49
|
+
onOpenChange: N
|
|
50
50
|
}, {
|
|
51
51
|
content: f(() => [
|
|
52
52
|
B("div", {
|
|
53
|
-
class: p(e(
|
|
53
|
+
class: p(e(y)("popover", "content"))
|
|
54
54
|
}, [
|
|
55
55
|
u(e(P), {
|
|
56
56
|
ref_key: "textAreaRef",
|
|
57
57
|
ref: l,
|
|
58
|
-
placeholder: e(C)("ap.batchInputGroup.popoverInputPlaceholder"
|
|
58
|
+
placeholder: e(C)("ap.batchInputGroup.popoverInputPlaceholder", {
|
|
59
|
+
maxNum: t.maxNum + ""
|
|
60
|
+
}),
|
|
59
61
|
bordered: !1,
|
|
60
62
|
rows: 10,
|
|
61
63
|
value: e(b),
|
|
@@ -69,7 +71,7 @@ const J = /* @__PURE__ */ k({
|
|
|
69
71
|
u(e(z), {
|
|
70
72
|
class: p([
|
|
71
73
|
e(s)("trigger-icon"),
|
|
72
|
-
t.disabled ? e(
|
|
74
|
+
t.disabled ? e(I)("trigger-icon", "disabled") : null
|
|
73
75
|
])
|
|
74
76
|
}, null, 8, ["class"])
|
|
75
77
|
]),
|