@aplus-frontend/ui 0.5.35 → 0.5.37
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-grid/editable/form-item.vue.mjs +62 -56
- package/es/src/ap-grid/editable/index.vue.mjs +82 -76
- package/es/src/ap-grid/editable/interface.d.ts +4 -0
- package/es/src/ap-grid/index.vue.mjs +73 -75
- package/es/src/ap-grid/interface.d.ts +5 -0
- package/es/src/ap-grid/utils/table.mjs +13 -10
- package/es/src/ap-list/index.vue.mjs +147 -140
- package/es/src/ap-list/interface.d.ts +4 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +28 -30
- package/es/src/editable-table/index.vue.mjs +1 -1
- package/es/src/editable-table/interface.d.ts +4 -0
- package/es/src/editable-table/utils.mjs +54 -52
- 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/editable/interface.d.ts +4 -0
- 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/table.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +4 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +4 -0
- package/lib/src/editable-table/utils.js +1 -1
- package/package.json +1 -1
- package/theme/ap-list/index.css +38 -4
- package/theme/ap-list/index.less +41 -3
- package/theme/index.css +38 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Empty as
|
|
3
|
-
import { useTablePaging as
|
|
1
|
+
import { defineComponent as X, ref as Y, unref as e, computed as p, watch as Z, createElementBlock as s, openBlock as i, normalizeStyle as v, normalizeClass as l, renderSlot as u, createElementVNode as _, createCommentVNode as I, createVNode as g, Fragment as E, createBlock as O, withCtx as h, renderList as x, mergeProps as ee } from "vue";
|
|
2
|
+
import { Empty as V, Spin as te, Pagination as ae } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useTablePaging as ne } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { isUndefined as
|
|
6
|
-
import { useOfflineList as
|
|
5
|
+
import { isUndefined as F, isNumber as re, omit as oe } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as ie } from "./hooks/use-offline-list.mjs";
|
|
7
7
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
8
|
-
import { RecycleScroller as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
8
|
+
import { RecycleScroller as le, DynamicScroller as se, DynamicScrollerItem as ue } from "vue-virtual-scroller";
|
|
9
|
+
import { useNamespace as ce } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const be = /* @__PURE__ */ X({
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
13
13
|
dataSource: {},
|
|
@@ -24,22 +24,23 @@ const he = /* @__PURE__ */ H({
|
|
|
24
24
|
contentStyle: { type: [Boolean, null, String, Object, Array] },
|
|
25
25
|
footerWarpperStyle: { type: [Boolean, null, String, Object, Array] },
|
|
26
26
|
virtual: { default: void 0 },
|
|
27
|
-
rowKey: {}
|
|
27
|
+
rowKey: {},
|
|
28
|
+
adaptive: { type: Boolean, default: !1 }
|
|
28
29
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
30
|
+
setup(L, { expose: N }) {
|
|
31
|
+
const R = V.PRESENTED_IMAGE_SIMPLE, n = L, { b: m, e: y, bm: T, m: $ } = ce("ap-list"), b = Y(), {
|
|
31
32
|
formRef: k,
|
|
32
|
-
submit:
|
|
33
|
-
reset:
|
|
34
|
-
handleTableChange:
|
|
35
|
-
data:
|
|
36
|
-
refresh:
|
|
37
|
-
refreshByDelete:
|
|
38
|
-
tableProps:
|
|
39
|
-
} =
|
|
40
|
-
async request(
|
|
33
|
+
submit: w,
|
|
34
|
+
reset: B,
|
|
35
|
+
handleTableChange: j,
|
|
36
|
+
data: S,
|
|
37
|
+
refresh: q,
|
|
38
|
+
refreshByDelete: A,
|
|
39
|
+
tableProps: D
|
|
40
|
+
} = ne({
|
|
41
|
+
async request(t) {
|
|
41
42
|
var r;
|
|
42
|
-
const a = await ((r = n.request) == null ? void 0 : r.call(n,
|
|
43
|
+
const a = await ((r = n.request) == null ? void 0 : r.call(n, t));
|
|
43
44
|
return {
|
|
44
45
|
data: (a == null ? void 0 : a.data) || [],
|
|
45
46
|
total: (a == null ? void 0 : a.total) || 0
|
|
@@ -50,143 +51,149 @@ const he = /* @__PURE__ */ H({
|
|
|
50
51
|
manual: n.manual,
|
|
51
52
|
pagination: n.pagination,
|
|
52
53
|
formatParams: n.beforeSearchSubmit
|
|
53
|
-
}),
|
|
54
|
-
pagination:
|
|
55
|
-
dataSource:
|
|
56
|
-
onChange:
|
|
57
|
-
} =
|
|
58
|
-
function
|
|
59
|
-
if (
|
|
60
|
-
|
|
54
|
+
}), K = { form: k }, {
|
|
55
|
+
pagination: z,
|
|
56
|
+
dataSource: M,
|
|
57
|
+
onChange: W
|
|
58
|
+
} = ie(n);
|
|
59
|
+
function G(t, a) {
|
|
60
|
+
if (e(f)) {
|
|
61
|
+
W(t, a);
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
{ current:
|
|
64
|
+
j(
|
|
65
|
+
{ current: t, pageSize: a },
|
|
65
66
|
{},
|
|
66
67
|
{},
|
|
67
68
|
{ currentDataSource: [], action: "paginate" }
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
|
-
const
|
|
71
|
-
var
|
|
72
|
-
return n.pagination === !1 || n.virtual ? !1 : ((
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
() =>
|
|
76
|
-
(
|
|
71
|
+
const c = p(() => e(f) ? e(M) : e(S).records), d = p(() => F(n.loading) ? e(S).loading : n.loading), U = p(() => {
|
|
72
|
+
var t, a;
|
|
73
|
+
return n.pagination === !1 || n.virtual ? !1 : ((t = n.pagination) == null ? void 0 : t.hideOnSinglePage) !== !0 ? !0 : e(f) ? (((a = n.dataSource) == null ? void 0 : a.length) || 0) > e(z).pageSize : e(S).total > e(D).pagination.pageSize;
|
|
74
|
+
}), f = p(() => !F(n.dataSource));
|
|
75
|
+
Z(
|
|
76
|
+
() => e(d),
|
|
77
|
+
(t) => {
|
|
77
78
|
var a;
|
|
78
|
-
(a = n.onLoadingChange) == null || a.call(n,
|
|
79
|
+
(a = n.onLoadingChange) == null || a.call(n, t);
|
|
79
80
|
}
|
|
80
81
|
);
|
|
81
|
-
function
|
|
82
|
+
function H(t) {
|
|
82
83
|
var a, r;
|
|
83
|
-
(r = (a = b.value) == null ? void 0 : a.querySelector(
|
|
84
|
+
(r = (a = b.value) == null ? void 0 : a.querySelector(t || ":first-child")) == null || r.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function J(t = !1) {
|
|
86
87
|
var o;
|
|
87
|
-
const a = (o = k.value) == null ? void 0 : o.apForm, r =
|
|
88
|
+
const a = (o = k.value) == null ? void 0 : o.apForm, r = t ? a == null ? void 0 : a.getFieldsValueTransformed : a == null ? void 0 : a.getFieldsValue;
|
|
88
89
|
return (r == null ? void 0 : r()) || {};
|
|
89
90
|
}
|
|
90
|
-
return
|
|
91
|
-
submit: () =>
|
|
92
|
-
reset: () =>
|
|
93
|
-
refresh: () =>
|
|
94
|
-
refreshByDelete: (
|
|
95
|
-
scrollToFirstRow:
|
|
96
|
-
getSearchFormValuesIfSetted:
|
|
97
|
-
}), (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
91
|
+
return N({
|
|
92
|
+
submit: () => w(),
|
|
93
|
+
reset: () => B(),
|
|
94
|
+
refresh: () => q(),
|
|
95
|
+
refreshByDelete: (t) => A(t),
|
|
96
|
+
scrollToFirstRow: H,
|
|
97
|
+
getSearchFormValuesIfSetted: J
|
|
98
|
+
}), (t, a) => (i(), s("div", {
|
|
99
|
+
class: l([e(m)(), { [e($)("adaptive")]: t.adaptive }]),
|
|
100
|
+
style: v(t.containerStyle)
|
|
101
|
+
}, [
|
|
102
|
+
u(t.$slots, "header", {
|
|
103
|
+
formIns: K,
|
|
104
|
+
submit: e(w),
|
|
105
|
+
reset: e(B)
|
|
106
|
+
}),
|
|
107
|
+
_("div", {
|
|
108
|
+
class: l([
|
|
109
|
+
e(m)("content-container"),
|
|
110
|
+
{ [e(T)("content-container", "spinning")]: d.value }
|
|
111
|
+
])
|
|
112
|
+
}, [
|
|
113
|
+
d.value ? (i(), s("div", {
|
|
114
|
+
key: 0,
|
|
115
|
+
class: l(e(y)("spin-wrapper"))
|
|
105
116
|
}, [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
_: 3
|
|
137
|
-
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), S(t(ie), {
|
|
138
|
-
key: 1,
|
|
139
|
-
items: s.value,
|
|
140
|
-
"min-item-size": e.virtual.minItemSize,
|
|
141
|
-
class: u(t(m)("scroll-wrapper"))
|
|
142
|
-
}, {
|
|
143
|
-
default: f(({ item: r, index: o, active: U }) => {
|
|
144
|
-
var C, P;
|
|
145
|
-
return [
|
|
146
|
-
v(t(le), {
|
|
147
|
-
item: r,
|
|
148
|
-
active: U,
|
|
149
|
-
"data-index": o,
|
|
150
|
-
"size-dependencies": (P = (C = e.virtual).sizeDependencies) == null ? void 0 : P.call(C, r)
|
|
151
|
-
}, {
|
|
152
|
-
default: f(() => [
|
|
153
|
-
l(e.$slots, "renderItem", {
|
|
154
|
-
item: r,
|
|
155
|
-
index: o
|
|
156
|
-
})
|
|
157
|
-
]),
|
|
158
|
-
_: 2
|
|
159
|
-
}, 1032, ["item", "active", "data-index", "size-dependencies"])
|
|
160
|
-
];
|
|
161
|
-
}),
|
|
162
|
-
_: 3
|
|
163
|
-
}, 8, ["items", "min-item-size", "class"]))
|
|
164
|
-
], 64)) : l(e.$slots, "renderContent", {
|
|
117
|
+
g(e(te), { spinning: d.value }, null, 8, ["spinning"])
|
|
118
|
+
], 2)) : I("", !0),
|
|
119
|
+
c.value.length === 0 ? u(t.$slots, "empty", {
|
|
120
|
+
key: 1,
|
|
121
|
+
loading: d.value
|
|
122
|
+
}, () => [
|
|
123
|
+
g(e(V), { image: e(R) }, null, 8, ["image"])
|
|
124
|
+
]) : (i(), s("div", {
|
|
125
|
+
key: 2,
|
|
126
|
+
ref_key: "contentRef",
|
|
127
|
+
ref: b,
|
|
128
|
+
style: v(t.contentStyle),
|
|
129
|
+
class: l(e(y)("content"))
|
|
130
|
+
}, [
|
|
131
|
+
t.virtual ? (i(), s(E, { key: 0 }, [
|
|
132
|
+
e(re)(t.virtual) ? (i(), O(e(le), {
|
|
133
|
+
key: 0,
|
|
134
|
+
class: l(e(m)("scroll-wrapper")),
|
|
135
|
+
items: c.value,
|
|
136
|
+
"item-size": t.virtual,
|
|
137
|
+
"key-field": n.rowKey || "id"
|
|
138
|
+
}, {
|
|
139
|
+
default: h(({ item: r, index: o }) => [
|
|
140
|
+
u(t.$slots, "renderItem", {
|
|
141
|
+
item: r,
|
|
142
|
+
index: o
|
|
143
|
+
})
|
|
144
|
+
]),
|
|
145
|
+
_: 3
|
|
146
|
+
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), O(e(se), {
|
|
165
147
|
key: 1,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
148
|
+
items: c.value,
|
|
149
|
+
"min-item-size": t.virtual.minItemSize,
|
|
150
|
+
class: l(e(m)("scroll-wrapper"))
|
|
151
|
+
}, {
|
|
152
|
+
default: h(({ item: r, index: o, active: Q }) => {
|
|
153
|
+
var C, P;
|
|
154
|
+
return [
|
|
155
|
+
g(e(ue), {
|
|
156
|
+
item: r,
|
|
157
|
+
active: Q,
|
|
158
|
+
"data-index": o,
|
|
159
|
+
"size-dependencies": (P = (C = t.virtual).sizeDependencies) == null ? void 0 : P.call(C, r)
|
|
160
|
+
}, {
|
|
161
|
+
default: h(() => [
|
|
162
|
+
u(t.$slots, "renderItem", {
|
|
163
|
+
item: r,
|
|
164
|
+
index: o
|
|
165
|
+
})
|
|
166
|
+
]),
|
|
167
|
+
_: 2
|
|
168
|
+
}, 1032, ["item", "active", "data-index", "size-dependencies"])
|
|
169
|
+
];
|
|
170
|
+
}),
|
|
171
|
+
_: 3
|
|
172
|
+
}, 8, ["items", "min-item-size", "class"]))
|
|
173
|
+
], 64)) : u(t.$slots, "renderContent", {
|
|
174
|
+
key: 1,
|
|
175
|
+
dataSource: c.value
|
|
176
|
+
}, () => [
|
|
177
|
+
(i(!0), s(E, null, x(c.value, (r, o) => u(t.$slots, "renderItem", {
|
|
178
|
+
item: r,
|
|
179
|
+
index: o
|
|
180
|
+
})), 256))
|
|
181
|
+
])
|
|
182
|
+
], 6))
|
|
183
|
+
], 2),
|
|
184
|
+
U.value ? (i(), s("div", {
|
|
185
|
+
key: 0,
|
|
186
|
+
class: l(e(y)("footer")),
|
|
187
|
+
style: v(t.footerWarpperStyle)
|
|
188
|
+
}, [
|
|
189
|
+
g(e(ae), ee(
|
|
190
|
+
f.value ? e(z) : e(oe)(e(D).pagination, ["showTotal"]),
|
|
191
|
+
{ onChange: G }
|
|
192
|
+
), null, 16)
|
|
193
|
+
], 6)) : I("", !0)
|
|
194
|
+
], 6));
|
|
188
195
|
}
|
|
189
196
|
});
|
|
190
197
|
export {
|
|
191
|
-
|
|
198
|
+
be as default
|
|
192
199
|
};
|
|
@@ -27,16 +27,16 @@ const Ae = ({
|
|
|
27
27
|
request: f,
|
|
28
28
|
defaultParams: L = {},
|
|
29
29
|
defaultData: v = [],
|
|
30
|
-
formatParams:
|
|
31
|
-
paramsValueTypeMap:
|
|
32
|
-
resetFieldsIgnores:
|
|
30
|
+
formatParams: O,
|
|
31
|
+
paramsValueTypeMap: R,
|
|
32
|
+
resetFieldsIgnores: y,
|
|
33
33
|
filterFields: J,
|
|
34
34
|
sortFields: K,
|
|
35
35
|
namespace: M = "ap-table",
|
|
36
36
|
pagination: S
|
|
37
37
|
}) => {
|
|
38
38
|
let b = 0, i = {};
|
|
39
|
-
const Q = Se(S), $ = (e) =>
|
|
39
|
+
const Q = Se(S), $ = (e) => O ? O(e) : e, z = ae(), c = j(ze(S)), {
|
|
40
40
|
getColumnSFConfig: G,
|
|
41
41
|
setSF: W,
|
|
42
42
|
clearAll: Z,
|
|
@@ -46,7 +46,7 @@ const Ae = ({
|
|
|
46
46
|
t: T
|
|
47
47
|
} = me(), {
|
|
48
48
|
b: P
|
|
49
|
-
} = he(M),
|
|
49
|
+
} = he(M), o = j({
|
|
50
50
|
total: v.length,
|
|
51
51
|
records: v,
|
|
52
52
|
loading: !1
|
|
@@ -56,32 +56,30 @@ const Ae = ({
|
|
|
56
56
|
}, I = async (e) => {
|
|
57
57
|
var r;
|
|
58
58
|
const t = $(e), n = Date.now();
|
|
59
|
-
b = n,
|
|
59
|
+
b = n, o.loading = !0;
|
|
60
60
|
try {
|
|
61
|
-
const
|
|
61
|
+
const a = await f({
|
|
62
62
|
...m(L),
|
|
63
63
|
...t
|
|
64
64
|
});
|
|
65
|
-
b === n && (
|
|
65
|
+
b === n && (o.total = a.total || ((r = a.data) == null ? void 0 : r.length) || 0, o.records = [...a.data || []], o.loading = !1);
|
|
66
66
|
} catch {
|
|
67
|
-
b === n && (
|
|
68
|
-
} finally {
|
|
69
|
-
a.loading = !1;
|
|
67
|
+
b === n && (o.records = [], o.total = 0, o.loading = !1);
|
|
70
68
|
}
|
|
71
69
|
}, V = (e) => {
|
|
72
70
|
const t = {};
|
|
73
71
|
return Object.entries(e).forEach(([n, r]) => {
|
|
74
|
-
if (t[n] = r,
|
|
75
|
-
const
|
|
76
|
-
|
|
72
|
+
if (t[n] = r, R && r) {
|
|
73
|
+
const a = R[n];
|
|
74
|
+
a && (t[n] = le(a, r));
|
|
77
75
|
}
|
|
78
76
|
}), t;
|
|
79
77
|
}, Y = async (e) => {
|
|
80
|
-
var r,
|
|
78
|
+
var r, a, l, g, d;
|
|
81
79
|
const t = w(), n = {};
|
|
82
80
|
Object.entries(t).forEach(([p, F]) => {
|
|
83
|
-
|
|
84
|
-
}), await ((
|
|
81
|
+
y && y.indexOf(p) > -1 && (n[p] = F);
|
|
82
|
+
}), await ((a = (r = z.value) == null ? void 0 : r.apForm) == null ? void 0 : a.resetFields()), (d = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || d.call(g, n), se(() => {
|
|
85
83
|
e == null || e();
|
|
86
84
|
});
|
|
87
85
|
}, C = (e) => {
|
|
@@ -113,7 +111,7 @@ const Ae = ({
|
|
|
113
111
|
const {
|
|
114
112
|
current: t,
|
|
115
113
|
pageSize: n
|
|
116
|
-
} = c, r =
|
|
114
|
+
} = c, r = o.total - e, a = Math.ceil(r / n), l = t > a ? a : t;
|
|
117
115
|
k({
|
|
118
116
|
current: l > 0 ? l : 1
|
|
119
117
|
});
|
|
@@ -122,8 +120,8 @@ const Ae = ({
|
|
|
122
120
|
var p, F;
|
|
123
121
|
const r = w();
|
|
124
122
|
c.current = e.current, c.pageSize = e.pageSize, W(t, n);
|
|
125
|
-
const
|
|
126
|
-
for (const u of
|
|
123
|
+
const a = q(n) ? [...n] : [n], l = {};
|
|
124
|
+
for (const u of a)
|
|
127
125
|
(p = m(K)) != null && p.includes(u.columnKey || u.field) && u.order && (l[fe(u.columnKey || u.field)] = u.order);
|
|
128
126
|
const g = {};
|
|
129
127
|
for (const u of Object.keys(t))
|
|
@@ -158,16 +156,16 @@ const Ae = ({
|
|
|
158
156
|
deep: !0
|
|
159
157
|
});
|
|
160
158
|
const ne = A(() => {
|
|
161
|
-
if (
|
|
159
|
+
if (o.total === 0)
|
|
162
160
|
return "-";
|
|
163
161
|
const {
|
|
164
162
|
current: e,
|
|
165
163
|
pageSize: t
|
|
166
164
|
} = c;
|
|
167
|
-
return `${e}/${Math.ceil(
|
|
165
|
+
return `${e}/${Math.ceil(o.total / t)}`;
|
|
168
166
|
});
|
|
169
167
|
function re(e) {
|
|
170
|
-
q(e) && (
|
|
168
|
+
q(e) && (o.records = e, o.total = e.length);
|
|
171
169
|
}
|
|
172
170
|
const oe = A(() => {
|
|
173
171
|
const {
|
|
@@ -175,19 +173,19 @@ const Ae = ({
|
|
|
175
173
|
showTotal: t,
|
|
176
174
|
showQuickJumper: n,
|
|
177
175
|
showSizeChanger: r,
|
|
178
|
-
pageSizeOptions:
|
|
176
|
+
pageSizeOptions: a
|
|
179
177
|
} = Q;
|
|
180
178
|
return {
|
|
181
|
-
loading:
|
|
179
|
+
loading: o.loading,
|
|
182
180
|
pagination: {
|
|
183
181
|
current: c.current,
|
|
184
182
|
pageSize: c.pageSize,
|
|
185
|
-
total:
|
|
183
|
+
total: o.total,
|
|
186
184
|
showSizeChanger: N(r) ? r : !e,
|
|
187
185
|
showQuickJumper: N(n) ? n : !e,
|
|
188
186
|
showLessItems: e,
|
|
189
187
|
size: "default",
|
|
190
|
-
pageSizeOptions: pe(
|
|
188
|
+
pageSizeOptions: pe(a) ? ["10", "20", "50", "100"] : a,
|
|
191
189
|
showTotal: t ? (l) => x("span", {
|
|
192
190
|
class: P("pagination-total-wrapper")
|
|
193
191
|
}, [T("ap.apTable.pagination.totalLeftPrefix"), " ", x("span", {
|
|
@@ -199,7 +197,7 @@ const Ae = ({
|
|
|
199
197
|
}, [m(ne)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
|
|
200
198
|
},
|
|
201
199
|
onChange: _,
|
|
202
|
-
dataSource:
|
|
200
|
+
dataSource: o.records
|
|
203
201
|
};
|
|
204
202
|
});
|
|
205
203
|
return {
|
|
@@ -208,12 +206,12 @@ const Ae = ({
|
|
|
208
206
|
reset: ee,
|
|
209
207
|
refresh: U,
|
|
210
208
|
refreshByDelete: te,
|
|
211
|
-
data:
|
|
209
|
+
data: o,
|
|
212
210
|
current: c.current,
|
|
213
211
|
pageSize: c.pageSize,
|
|
214
212
|
handleTableChange: _,
|
|
215
213
|
tableProps: oe,
|
|
216
|
-
dataSource: A(() =>
|
|
214
|
+
dataSource: A(() => o.records),
|
|
217
215
|
setDataSource: re,
|
|
218
216
|
getColumnSFConfig: G,
|
|
219
217
|
sortedInfo: H,
|
|
@@ -165,7 +165,7 @@ const Re = /* @__PURE__ */ $({
|
|
|
165
165
|
const o = ((u = r(m)) == null ? void 0 : u.length) || 0, a = g(e) ? e : e.length;
|
|
166
166
|
if (F(n.maxLength) && o + a > n.maxLength)
|
|
167
167
|
return;
|
|
168
|
-
const l = g(e) ? new Array(e).fill({}) : le(e);
|
|
168
|
+
const l = g(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
|
|
169
169
|
(d = (s = i.value) == null ? void 0 : s.setFieldValue) == null || d.call(s, n.name, l, !0, (f, p) => {
|
|
170
170
|
if (!f[p]) {
|
|
171
171
|
f[p] = [...l];
|
|
@@ -21,6 +21,10 @@ export type EditableColumnType<RecordType = any, ExtraValueType = 'text', ValueT
|
|
|
21
21
|
* 是否省略自动溢出,自动溢出省略,为对象时可设置省略行数、是否可展开、添加后缀等
|
|
22
22
|
*/
|
|
23
23
|
ellipsis?: boolean | EllipsisConfig;
|
|
24
|
+
/**
|
|
25
|
+
* 是否渲染必填标记(只渲染标记不生成校验规则)
|
|
26
|
+
*/
|
|
27
|
+
markRequired?: boolean;
|
|
24
28
|
/**
|
|
25
29
|
* 是否可编辑
|
|
26
30
|
*/
|