@aplus-frontend/ui 0.3.9 → 0.3.11
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 +222 -220
- package/es/src/ap-form/ap-form.vue.d.ts +1 -3
- package/es/src/ap-form/ap-form.vue2.mjs +101 -95
- package/es/src/ap-list/index.vue.mjs +37 -39
- package/es/src/ap-list/interface.d.ts +3 -3
- package/es/src/ap-table/ap-table.vue2.mjs +62 -66
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +87 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +209 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +6 -0
- package/es/src/ap-table/interface.d.ts +4 -3
- package/es/src/business/ap-select-layout/index.d.ts +1 -0
- package/es/src/business/ap-select-layout/interface.d.ts +1 -0
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +69 -63
- package/es/src/config-provider/config-provider-props.d.ts +0 -2
- package/es/src/config-provider/config-provider-props.mjs +2 -4
- package/es/src/config-provider/config-provider.d.ts +0 -6
- package/es/src/config-provider/config-provider.mjs +26 -25
- package/es/src/config-provider/constants.d.ts +2 -0
- package/es/src/config-provider/constants.mjs +3 -1
- package/es/src/config-provider/hooks/use-global-config.d.ts +0 -2
- package/es/src/config-provider/index.d.ts +0 -12
- package/es/src/config-provider/index.mjs +17 -15
- package/es/src/index.mjs +207 -205
- package/lib/index.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -3
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +3 -3
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +87 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +6 -0
- package/lib/src/ap-table/interface.d.ts +4 -3
- package/lib/src/business/ap-select-layout/index.d.ts +1 -0
- package/lib/src/business/ap-select-layout/interface.d.ts +1 -0
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +0 -2
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +0 -6
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +2 -0
- package/lib/src/config-provider/constants.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +0 -2
- package/lib/src/config-provider/index.d.ts +0 -12
- package/lib/src/config-provider/index.js +1 -1
- package/lib/src/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useProvideForm as
|
|
4
|
-
import { isArray as f, cloneDeep as oe, isFunction as
|
|
5
|
-
import { useUrlSearchParams as
|
|
6
|
-
import { INTERNAL_FORM_INSTANCE_MARK as
|
|
7
|
-
import { getRouteType as
|
|
8
|
-
import
|
|
1
|
+
import { defineComponent as G, ref as b, reactive as H, unref as g, nextTick as J, toRaw as O, computed as Q, openBlock as X, createBlock as Y, mergeProps as Z, withCtx as ee, renderSlot as te } from "vue";
|
|
2
|
+
import { Form as le } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useProvideForm as re } from "./context.mjs";
|
|
4
|
+
import { isArray as f, cloneDeep as oe, isFunction as P, isPlainObject as R, omit as se } from "lodash-unified";
|
|
5
|
+
import { useUrlSearchParams as ie } from "@vueuse/core";
|
|
6
|
+
import { INTERNAL_FORM_INSTANCE_MARK as ne } from "./constant.mjs";
|
|
7
|
+
import { getRouteType as ae, isDef as T } from "../utils/index.mjs";
|
|
8
|
+
import ue from "./utils/set.mjs";
|
|
9
9
|
import { genParams as _, setToParams as w } from "./utils/params.mjs";
|
|
10
|
-
const
|
|
10
|
+
const Ve = /* @__PURE__ */ G({
|
|
11
11
|
__name: "ap-form",
|
|
12
12
|
props: {
|
|
13
13
|
layout: { default: "horizontal" },
|
|
@@ -38,8 +38,11 @@ const ye = /* @__PURE__ */ $({
|
|
|
38
38
|
syncToUrlPriority: { type: Boolean }
|
|
39
39
|
},
|
|
40
40
|
setup(E, { expose: j }) {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
function x(e, t) {
|
|
42
|
+
return f(t) ? t.reduce((l, s) => l == null ? void 0 : l[s], e) : e == null ? void 0 : e[t];
|
|
43
|
+
}
|
|
44
|
+
const o = E;
|
|
45
|
+
function V(e, t, l = !0) {
|
|
43
46
|
var i;
|
|
44
47
|
if (f(e)) {
|
|
45
48
|
let r = n;
|
|
@@ -48,105 +51,108 @@ const ye = /* @__PURE__ */ $({
|
|
|
48
51
|
r[e[e.length - 1]] = t;
|
|
49
52
|
} else
|
|
50
53
|
n[e] = t;
|
|
51
|
-
let
|
|
52
|
-
l && ((i =
|
|
54
|
+
let s = f(e) ? e[0] : e;
|
|
55
|
+
l && ((i = o.onValuesChange) == null || i.call(o, { [s]: n[s] }, n, e)), y();
|
|
53
56
|
}
|
|
54
|
-
const a =
|
|
55
|
-
|
|
57
|
+
const a = b(), m = ie(ae()), v = b(
|
|
58
|
+
o.syncToUrl ? _(o.syncToUrl, m, "get") : {}
|
|
56
59
|
);
|
|
57
|
-
let
|
|
58
|
-
const n =
|
|
60
|
+
let p = oe(B()), d = {};
|
|
61
|
+
const n = H(B());
|
|
59
62
|
let F = [];
|
|
60
|
-
function
|
|
61
|
-
const e =
|
|
62
|
-
return
|
|
63
|
+
function B() {
|
|
64
|
+
const e = o.initialValues || {};
|
|
65
|
+
return o.syncToUrlPriority ? {
|
|
63
66
|
...e,
|
|
64
|
-
...
|
|
67
|
+
...g(v)
|
|
65
68
|
} : {
|
|
66
|
-
...
|
|
69
|
+
...g(v),
|
|
67
70
|
...e
|
|
68
71
|
};
|
|
69
72
|
}
|
|
70
|
-
function
|
|
73
|
+
function A(e) {
|
|
71
74
|
var l;
|
|
72
|
-
const t =
|
|
73
|
-
|
|
75
|
+
const t = h(e, d);
|
|
76
|
+
o.syncToUrl && w(m, _(o.syncToUrl, t, "set")), (l = o.onFinish) == null || l.call(o, t);
|
|
74
77
|
}
|
|
75
|
-
const
|
|
78
|
+
const N = async () => {
|
|
76
79
|
var e;
|
|
77
|
-
(e = a.value) == null || e.resetFields(), await
|
|
78
|
-
Object.keys(n).forEach((t) => delete n[t]), Object.assign(n,
|
|
79
|
-
|
|
80
|
+
(e = a.value) == null || e.resetFields(), await J(() => {
|
|
81
|
+
Object.keys(n).forEach((t) => delete n[t]), Object.assign(n, p), y(), o.syncToUrl && w(
|
|
82
|
+
m,
|
|
80
83
|
_(
|
|
81
|
-
|
|
82
|
-
p
|
|
84
|
+
o.syncToUrl,
|
|
85
|
+
h(p, d),
|
|
83
86
|
"set"
|
|
84
87
|
)
|
|
85
88
|
);
|
|
86
89
|
});
|
|
87
|
-
},
|
|
90
|
+
}, S = (e) => {
|
|
88
91
|
var t;
|
|
89
92
|
(t = a.value) == null || t.clearValidate(e);
|
|
90
|
-
},
|
|
93
|
+
}, W = (e, t) => {
|
|
91
94
|
var l;
|
|
92
95
|
return (l = a.value) == null ? void 0 : l.validateFields(e, t);
|
|
93
|
-
},
|
|
94
|
-
var
|
|
95
|
-
const l = await ((
|
|
96
|
+
}, q = async (e, t) => {
|
|
97
|
+
var s;
|
|
98
|
+
const l = await ((s = a.value) == null ? void 0 : s.validateFields(
|
|
96
99
|
e,
|
|
97
100
|
t
|
|
98
101
|
));
|
|
99
|
-
return
|
|
100
|
-
},
|
|
102
|
+
return h(l, d);
|
|
103
|
+
}, z = (e) => {
|
|
101
104
|
var t;
|
|
102
105
|
return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
|
|
103
|
-
},
|
|
106
|
+
}, C = (e) => {
|
|
104
107
|
var l;
|
|
105
108
|
const t = (l = a.value) == null ? void 0 : l.getFieldsValue(e);
|
|
106
|
-
return
|
|
107
|
-
},
|
|
109
|
+
return h(t, d);
|
|
110
|
+
}, D = (e, t) => {
|
|
108
111
|
var l;
|
|
109
112
|
return (l = a.value) == null ? void 0 : l.validate(e, t);
|
|
110
|
-
},
|
|
113
|
+
}, L = (e, t = {}) => {
|
|
111
114
|
var l;
|
|
112
115
|
(l = a.value) == null || l.scrollToField(e, t);
|
|
113
|
-
},
|
|
114
|
-
Object.assign(n, e),
|
|
115
|
-
},
|
|
116
|
-
|
|
116
|
+
}, k = (e) => {
|
|
117
|
+
Object.assign(n, e), y();
|
|
118
|
+
}, I = (e, t, l = !0) => {
|
|
119
|
+
V(e, t, l), y();
|
|
117
120
|
};
|
|
118
|
-
function
|
|
121
|
+
function U(e, t) {
|
|
119
122
|
return t || e(O(n)), F.push(e), () => {
|
|
120
123
|
F = F.filter((l) => l !== e);
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
function M({ initialValue: e, name: t, transform: l }) {
|
|
127
|
+
if (T(e) && T(t)) {
|
|
128
|
+
const s = x(g(v), t);
|
|
129
|
+
if (!T(s) || !o.syncToUrlPriority)
|
|
130
|
+
if (V(t, e, !1), f(t)) {
|
|
131
|
+
let i = p;
|
|
132
|
+
for (let r = 0; r < t.length - 1; r++)
|
|
133
|
+
T(i[t[r]]) || (i[t[r]] = {}), i = i[t[r]];
|
|
134
|
+
i[t[t.length - 1]] = e;
|
|
135
|
+
} else
|
|
136
|
+
p[t] = e;
|
|
137
|
+
}
|
|
138
|
+
l && (d = ue(
|
|
133
139
|
d,
|
|
134
140
|
[t].flat(1),
|
|
135
141
|
l,
|
|
136
142
|
!0
|
|
137
143
|
));
|
|
138
144
|
}
|
|
139
|
-
function
|
|
140
|
-
if (e !==
|
|
145
|
+
function K(e) {
|
|
146
|
+
if (e !== ne) {
|
|
141
147
|
console.warn("getInternalInstance should only used at internal");
|
|
142
148
|
return;
|
|
143
149
|
}
|
|
144
150
|
return {
|
|
145
|
-
registerField:
|
|
146
|
-
registerWatch:
|
|
151
|
+
registerField: M,
|
|
152
|
+
registerWatch: U
|
|
147
153
|
};
|
|
148
154
|
}
|
|
149
|
-
function
|
|
155
|
+
function y() {
|
|
150
156
|
if (F.length) {
|
|
151
157
|
const e = O(n);
|
|
152
158
|
F.forEach((t) => {
|
|
@@ -154,63 +160,63 @@ const ye = /* @__PURE__ */ $({
|
|
|
154
160
|
});
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
|
-
function
|
|
163
|
+
function h(e, t) {
|
|
158
164
|
if (e == null)
|
|
159
165
|
return;
|
|
160
166
|
let l = f(e) ? [] : {};
|
|
161
|
-
return Object.keys(e).forEach((
|
|
162
|
-
const i = e[
|
|
163
|
-
if (
|
|
167
|
+
return Object.keys(e).forEach((s) => {
|
|
168
|
+
const i = e[s], r = t == null ? void 0 : t[s], u = P(r) ? r : r == null ? void 0 : r.transformer, $ = P(r) ? !0 : r == null ? void 0 : r.flat;
|
|
169
|
+
if (P(u)) {
|
|
164
170
|
const c = u(i);
|
|
165
|
-
|
|
171
|
+
$ ? f(c) && f(l) ? l = [...l, ...c] : R(c) && R(l) ? l = {
|
|
166
172
|
...l,
|
|
167
173
|
...c
|
|
168
|
-
} : l[
|
|
174
|
+
} : l[s] = c : l[s] = c;
|
|
169
175
|
} else if (R(i) || f(i)) {
|
|
170
|
-
const c =
|
|
176
|
+
const c = h(
|
|
171
177
|
i,
|
|
172
178
|
r
|
|
173
179
|
);
|
|
174
|
-
l[
|
|
180
|
+
l[s] = c;
|
|
175
181
|
} else
|
|
176
|
-
l[
|
|
182
|
+
l[s] = i;
|
|
177
183
|
}), l;
|
|
178
184
|
}
|
|
179
|
-
return
|
|
180
|
-
model:
|
|
181
|
-
updateModel:
|
|
185
|
+
return re({
|
|
186
|
+
model: Q(() => n),
|
|
187
|
+
updateModel: V,
|
|
182
188
|
internalInstance: {
|
|
183
|
-
registerWatch:
|
|
184
|
-
registerField:
|
|
185
|
-
setFieldValue:
|
|
189
|
+
registerWatch: U,
|
|
190
|
+
registerField: M,
|
|
191
|
+
setFieldValue: I
|
|
186
192
|
}
|
|
187
193
|
}), j({
|
|
188
|
-
resetFields:
|
|
189
|
-
clearValidate:
|
|
190
|
-
validateFields:
|
|
191
|
-
getFieldsValue:
|
|
192
|
-
validate:
|
|
193
|
-
scrollToField:
|
|
194
|
-
setFieldsValue:
|
|
195
|
-
setFieldValue:
|
|
196
|
-
registerWatch:
|
|
197
|
-
validateFieldsReturnTransformed:
|
|
198
|
-
getFieldsValueTransformed:
|
|
199
|
-
getInternalInstance:
|
|
200
|
-
}), (e, t) => (
|
|
194
|
+
resetFields: N,
|
|
195
|
+
clearValidate: S,
|
|
196
|
+
validateFields: W,
|
|
197
|
+
getFieldsValue: z,
|
|
198
|
+
validate: D,
|
|
199
|
+
scrollToField: L,
|
|
200
|
+
setFieldsValue: k,
|
|
201
|
+
setFieldValue: I,
|
|
202
|
+
registerWatch: U,
|
|
203
|
+
validateFieldsReturnTransformed: q,
|
|
204
|
+
getFieldsValueTransformed: C,
|
|
205
|
+
getInternalInstance: K
|
|
206
|
+
}), (e, t) => (X(), Y(g(le), Z({
|
|
201
207
|
ref_key: "formRef",
|
|
202
208
|
ref: a
|
|
203
|
-
},
|
|
209
|
+
}, g(se)(o, ["initialValues", "onValuesChange", "onFinish"]), {
|
|
204
210
|
model: n,
|
|
205
|
-
onFinish:
|
|
211
|
+
onFinish: A
|
|
206
212
|
}), {
|
|
207
|
-
default:
|
|
208
|
-
|
|
213
|
+
default: ee(() => [
|
|
214
|
+
te(e.$slots, "default")
|
|
209
215
|
]),
|
|
210
216
|
_: 3
|
|
211
217
|
}, 16, ["model"]));
|
|
212
218
|
}
|
|
213
219
|
});
|
|
214
220
|
export {
|
|
215
|
-
|
|
221
|
+
Ve as default
|
|
216
222
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineComponent as H, ref as J, unref as t, computed as
|
|
1
|
+
import { defineComponent as H, ref as J, unref as t, computed as d, watch as Q, openBlock as i, createBlock as S, normalizeClass as u, withCtx as f, createElementVNode as X, normalizeStyle as h, renderSlot as l, createVNode as v, createElementBlock as p, Fragment as I, renderList as Y, mergeProps as Z, createCommentVNode as _ } from "vue";
|
|
2
2
|
import { Empty as E, Spin as x, Pagination as ee } from "@aplus-frontend/antdv";
|
|
3
|
-
import "../ap-table/
|
|
3
|
+
import { useTablePaging as te } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { isUndefined as O, isNumber as
|
|
6
|
-
import { useOfflineList as
|
|
5
|
+
import { isUndefined as O, isNumber as ae, omit as ne } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as re } 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
|
-
import { useTablePaging as se } from "../ap-table/hooks/use-table-paging.mjs";
|
|
8
|
+
import { RecycleScroller as oe, DynamicScroller as ie, DynamicScrollerItem as le } from "vue-virtual-scroller";
|
|
9
|
+
import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
10
|
const he = /* @__PURE__ */ H({
|
|
12
11
|
__name: "index",
|
|
13
12
|
props: {
|
|
@@ -28,16 +27,16 @@ const he = /* @__PURE__ */ H({
|
|
|
28
27
|
rowKey: {}
|
|
29
28
|
},
|
|
30
29
|
setup(V, { expose: F }) {
|
|
31
|
-
const L = E.PRESENTED_IMAGE_SIMPLE, n = V, { b:
|
|
30
|
+
const L = E.PRESENTED_IMAGE_SIMPLE, n = V, { b: m, e: N } = se("ap-list"), b = J(), {
|
|
32
31
|
formRef: k,
|
|
33
|
-
submit:
|
|
34
|
-
reset:
|
|
32
|
+
submit: D,
|
|
33
|
+
reset: w,
|
|
35
34
|
handleTableChange: R,
|
|
36
35
|
data: g,
|
|
37
36
|
refresh: T,
|
|
38
37
|
refreshByDelete: $,
|
|
39
|
-
tableProps:
|
|
40
|
-
} =
|
|
38
|
+
tableProps: z
|
|
39
|
+
} = te({
|
|
41
40
|
async request(e) {
|
|
42
41
|
var r;
|
|
43
42
|
const a = await ((r = n.request) == null ? void 0 : r.call(n, e));
|
|
@@ -49,16 +48,15 @@ const he = /* @__PURE__ */ H({
|
|
|
49
48
|
defaultParams: n.params,
|
|
50
49
|
defaultData: n.defaultData,
|
|
51
50
|
manual: n.manual,
|
|
52
|
-
|
|
53
|
-
defaultPageSize: n.pagination ? n.pagination.defaultPageSize : void 0,
|
|
51
|
+
pagination: n.pagination,
|
|
54
52
|
formatParams: n.beforeSearchSubmit
|
|
55
53
|
}), j = { form: k }, {
|
|
56
|
-
pagination:
|
|
54
|
+
pagination: B,
|
|
57
55
|
dataSource: q,
|
|
58
56
|
onChange: A
|
|
59
|
-
} =
|
|
57
|
+
} = re(n);
|
|
60
58
|
function K(e, a) {
|
|
61
|
-
if (t(
|
|
59
|
+
if (t(c)) {
|
|
62
60
|
A(e, a);
|
|
63
61
|
return;
|
|
64
62
|
}
|
|
@@ -69,10 +67,10 @@ const he = /* @__PURE__ */ H({
|
|
|
69
67
|
{ currentDataSource: [], action: "paginate" }
|
|
70
68
|
);
|
|
71
69
|
}
|
|
72
|
-
const s =
|
|
70
|
+
const s = d(() => t(c) ? t(q) : t(g).records), y = d(() => O(n.loading) ? t(g).loading : n.loading), M = d(() => {
|
|
73
71
|
var e, a;
|
|
74
|
-
return n.pagination === !1 || n.virtual ? !1 : ((e = n.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(
|
|
75
|
-
}),
|
|
72
|
+
return n.pagination === !1 || n.virtual ? !1 : ((e = n.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(c) ? (((a = n.dataSource) == null ? void 0 : a.length) || 0) > t(B).pageSize : t(g).total > t(z).pagination.pageSize;
|
|
73
|
+
}), c = d(() => !O(n.dataSource));
|
|
76
74
|
Q(
|
|
77
75
|
() => t(y),
|
|
78
76
|
(e) => {
|
|
@@ -90,41 +88,41 @@ const he = /* @__PURE__ */ H({
|
|
|
90
88
|
return (r == null ? void 0 : r()) || {};
|
|
91
89
|
}
|
|
92
90
|
return F({
|
|
93
|
-
submit: () =>
|
|
94
|
-
reset: () =>
|
|
91
|
+
submit: () => D(),
|
|
92
|
+
reset: () => w(),
|
|
95
93
|
refresh: () => T(),
|
|
96
94
|
refreshByDelete: (e) => $(e),
|
|
97
95
|
scrollToFirstRow: W,
|
|
98
96
|
getSearchFormValuesIfSetted: G
|
|
99
97
|
}), (e, a) => (i(), S(t(x), {
|
|
100
98
|
spinning: y.value,
|
|
101
|
-
class: u(t(
|
|
99
|
+
class: u(t(m)("spin"))
|
|
102
100
|
}, {
|
|
103
101
|
default: f(() => [
|
|
104
102
|
X("div", {
|
|
105
|
-
class: u(t(
|
|
106
|
-
style:
|
|
103
|
+
class: u(t(m)()),
|
|
104
|
+
style: h(e.containerStyle)
|
|
107
105
|
}, [
|
|
108
106
|
l(e.$slots, "header", {
|
|
109
107
|
formIns: j,
|
|
110
|
-
submit: t(
|
|
111
|
-
reset: t(
|
|
108
|
+
submit: t(D),
|
|
109
|
+
reset: t(w)
|
|
112
110
|
}),
|
|
113
111
|
s.value.length === 0 ? l(e.$slots, "empty", {
|
|
114
112
|
key: 0,
|
|
115
113
|
loading: y.value
|
|
116
114
|
}, () => [
|
|
117
|
-
|
|
115
|
+
v(t(E), { image: t(L) }, null, 8, ["image"])
|
|
118
116
|
]) : (i(), p("div", {
|
|
119
117
|
key: 1,
|
|
120
118
|
ref_key: "contentRef",
|
|
121
119
|
ref: b,
|
|
122
|
-
style:
|
|
120
|
+
style: h(e.contentStyle)
|
|
123
121
|
}, [
|
|
124
122
|
e.virtual ? (i(), p(I, { key: 0 }, [
|
|
125
|
-
t(
|
|
123
|
+
t(ae)(e.virtual) ? (i(), S(t(oe), {
|
|
126
124
|
key: 0,
|
|
127
|
-
class: u(t(
|
|
125
|
+
class: u(t(m)("scroll-wrapper")),
|
|
128
126
|
items: s.value,
|
|
129
127
|
"item-size": e.virtual,
|
|
130
128
|
"key-field": n.rowKey || "id"
|
|
@@ -136,20 +134,20 @@ const he = /* @__PURE__ */ H({
|
|
|
136
134
|
})
|
|
137
135
|
]),
|
|
138
136
|
_: 3
|
|
139
|
-
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), S(t(
|
|
137
|
+
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), S(t(ie), {
|
|
140
138
|
key: 1,
|
|
141
139
|
items: s.value,
|
|
142
140
|
"min-item-size": e.virtual.minItemSize,
|
|
143
|
-
class: u(t(
|
|
141
|
+
class: u(t(m)("scroll-wrapper"))
|
|
144
142
|
}, {
|
|
145
143
|
default: f(({ item: r, index: o, active: U }) => {
|
|
146
|
-
var
|
|
144
|
+
var C, P;
|
|
147
145
|
return [
|
|
148
|
-
|
|
146
|
+
v(t(le), {
|
|
149
147
|
item: r,
|
|
150
148
|
active: U,
|
|
151
149
|
"data-index": o,
|
|
152
|
-
"size-dependencies": (
|
|
150
|
+
"size-dependencies": (P = (C = e.virtual).sizeDependencies) == null ? void 0 : P.call(C, r)
|
|
153
151
|
}, {
|
|
154
152
|
default: f(() => [
|
|
155
153
|
l(e.$slots, "renderItem", {
|
|
@@ -176,10 +174,10 @@ const he = /* @__PURE__ */ H({
|
|
|
176
174
|
M.value ? (i(), p("div", {
|
|
177
175
|
key: 2,
|
|
178
176
|
class: u(t(N)("footer")),
|
|
179
|
-
style:
|
|
177
|
+
style: h(e.footerWarpperStyle)
|
|
180
178
|
}, [
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
v(t(ee), Z(
|
|
180
|
+
c.value ? t(B) : t(ne)(t(z).pagination, ["showTotal"]),
|
|
183
181
|
{ onChange: K }
|
|
184
182
|
), null, 16)
|
|
185
183
|
], 6)) : _("", !0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleValue } from 'vue';
|
|
1
|
+
import { Ref, StyleValue } from 'vue';
|
|
2
2
|
import { RequestData } from '../ap-table';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
@@ -16,9 +16,9 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
|
16
16
|
*/
|
|
17
17
|
onItem?: (record: RecordType, index: number) => void;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* 依赖的额外的参数,传入响应式参数会在变更后重新执行
|
|
20
20
|
*/
|
|
21
|
-
params?: ParamsType
|
|
21
|
+
params?: ParamsType | Ref<ParamsType>;
|
|
22
22
|
/**
|
|
23
23
|
* 请求数据
|
|
24
24
|
* @param params
|