@aplus-frontend/ui 7.9.0 → 7.10.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/ag-grid/editable/form-item.vue.mjs +77 -76
- package/es/src/ap-form/ap-form.vue2.mjs +69 -67
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/style/item-text-group.mjs +8 -4
- package/es/src/ap-list/index.vue.d.ts +1 -0
- package/es/src/ap-list/index.vue.mjs +155 -114
- package/es/src/ap-list/interface.d.ts +5 -0
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -0
- package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +29 -25
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +11 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +168 -143
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/style/item-text-group.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +1 -0
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +5 -0
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -0
- package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +11 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Empty as
|
|
3
|
-
import { useTablePaging as
|
|
1
|
+
import { defineComponent as ue, shallowRef as V, computed as m, toRef as ce, unref as t, watch as L, createElementBlock as s, openBlock as o, normalizeStyle as D, normalizeClass as l, renderSlot as u, createElementVNode as fe, createCommentVNode as N, createVNode as h, Fragment as O, createBlock as A, withCtx as B, renderList as de, mergeProps as me } from "vue";
|
|
2
|
+
import { Empty as $, Spin as pe, Pagination as ge } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useTablePaging as Se } 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 { throttle as ye, isUndefined as M, isNumber as ve, omit as he } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as be } from "./hooks/use-offline-list.mjs";
|
|
7
7
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
8
|
-
import { RecycleScroller as
|
|
9
|
-
import
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
8
|
+
import { RecycleScroller as ke, DynamicScroller as Ie, DynamicScrollerItem as Pe } from "vue-virtual-scroller";
|
|
9
|
+
import we from "./style/index.mjs";
|
|
10
|
+
import { useNamespace as De } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const Oe = /* @__PURE__ */ ue({
|
|
12
12
|
name: "ApList",
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
@@ -27,173 +27,214 @@ const De = /* @__PURE__ */ Z({
|
|
|
27
27
|
footerWarpperStyle: { type: [Boolean, null, String, Object, Array] },
|
|
28
28
|
virtual: { default: void 0 },
|
|
29
29
|
rowKey: {},
|
|
30
|
-
adaptive: { type: Boolean, default: !1 }
|
|
30
|
+
adaptive: { type: Boolean, default: !1 },
|
|
31
|
+
fetchMode: { default: "paging" }
|
|
31
32
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
34
|
-
formRef:
|
|
35
|
-
submit:
|
|
36
|
-
reset:
|
|
37
|
-
handleTableChange:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
setup(j, { expose: q }) {
|
|
34
|
+
const K = $.PRESENTED_IMAGE_SIMPLE, a = j, { b: p, e: b, bm: H, m: W } = De("ap-list"), G = we("ap-list"), c = V(), g = V(), S = m(() => a.fetchMode === "paging"), {
|
|
35
|
+
formRef: k,
|
|
36
|
+
submit: U,
|
|
37
|
+
reset: J,
|
|
38
|
+
handleTableChange: Q,
|
|
39
|
+
fetchNextPageAndCache: C,
|
|
40
|
+
data: I,
|
|
41
|
+
refresh: X,
|
|
42
|
+
refreshByDelete: Y,
|
|
43
|
+
tableProps: P,
|
|
44
|
+
getPaging: Z,
|
|
45
|
+
setPaging: _
|
|
46
|
+
} = Se({
|
|
47
|
+
async request(e) {
|
|
48
|
+
const n = await a.request?.(e);
|
|
47
49
|
return {
|
|
48
50
|
data: n?.data || [],
|
|
49
51
|
total: n?.total || 0
|
|
50
52
|
};
|
|
51
53
|
},
|
|
52
|
-
params:
|
|
54
|
+
params: ce(a, "params"),
|
|
53
55
|
defaultData: a.defaultData,
|
|
54
56
|
manual: a.manual,
|
|
55
57
|
pagination: a.pagination,
|
|
56
58
|
formatParams: a.beforeSearchSubmit
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
});
|
|
60
|
+
let y = 0;
|
|
61
|
+
function x() {
|
|
62
|
+
const e = c.value;
|
|
63
|
+
if (S.value || !e)
|
|
64
|
+
return;
|
|
65
|
+
const n = e.scrollTop, r = e.scrollHeight - e.clientHeight;
|
|
66
|
+
y >= r && (y = 0), !(y > n) && r - n <= 1 && (y = n, C());
|
|
67
|
+
}
|
|
68
|
+
function E() {
|
|
69
|
+
!S.value && C();
|
|
70
|
+
}
|
|
71
|
+
const z = ye(x, 300), ee = { form: k }, {
|
|
72
|
+
pagination: T,
|
|
73
|
+
dataSource: te,
|
|
74
|
+
onChange: ae
|
|
75
|
+
} = be(a);
|
|
76
|
+
function ne(e, n) {
|
|
77
|
+
if (t(v)) {
|
|
78
|
+
ae(e, n);
|
|
65
79
|
return;
|
|
66
80
|
}
|
|
67
|
-
|
|
68
|
-
{ current:
|
|
81
|
+
Q(
|
|
82
|
+
{ current: e, pageSize: n },
|
|
69
83
|
{},
|
|
70
84
|
{},
|
|
71
85
|
{ currentDataSource: [], action: "paginate" }
|
|
72
86
|
);
|
|
73
87
|
}
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
() =>
|
|
77
|
-
(
|
|
78
|
-
a.onLoadingChange?.(
|
|
88
|
+
const f = m(() => t(v) ? t(te) : [...t(I).records || []]), d = m(() => M(a.loading) ? t(I).loading : a.loading), re = m(() => a.pagination === !1 || a.virtual ? !1 : a.pagination?.hideOnSinglePage !== !0 ? !0 : t(v) ? (a.dataSource?.length || 0) > t(T).pageSize : t(I).total > t(P).pagination.pageSize), v = m(() => !M(a.dataSource));
|
|
89
|
+
L(
|
|
90
|
+
() => t(d),
|
|
91
|
+
(e) => {
|
|
92
|
+
a.onLoadingChange?.(e);
|
|
93
|
+
}
|
|
94
|
+
), L(
|
|
95
|
+
() => a.params,
|
|
96
|
+
() => {
|
|
97
|
+
w();
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
deep: !0
|
|
79
101
|
}
|
|
80
102
|
);
|
|
81
|
-
function
|
|
82
|
-
|
|
103
|
+
function oe(e) {
|
|
104
|
+
c.value?.querySelector(e || ":first-child")?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
105
|
+
}
|
|
106
|
+
function le(e = !1) {
|
|
107
|
+
const n = k.value?.apForm;
|
|
108
|
+
return (e ? n?.getFieldsValueTransformed : n?.getFieldsValue)?.() || {};
|
|
109
|
+
}
|
|
110
|
+
function ie(e) {
|
|
111
|
+
k.value?.apForm?.setFieldsValue?.(e);
|
|
112
|
+
}
|
|
113
|
+
function w() {
|
|
114
|
+
S.value || (c.value && (c.value.scrollTop = 0), g.value && g.value.scrollToPosition?.(0));
|
|
83
115
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
return (t ? n?.getFieldsValueTransformed : n?.getFieldsValue)?.() || {};
|
|
116
|
+
function F() {
|
|
117
|
+
w(), U();
|
|
87
118
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
119
|
+
function R() {
|
|
120
|
+
w(), J();
|
|
90
121
|
}
|
|
91
|
-
return
|
|
92
|
-
submit:
|
|
93
|
-
reset:
|
|
94
|
-
refresh: () =>
|
|
95
|
-
refreshByDelete: (
|
|
96
|
-
scrollToFirstRow:
|
|
97
|
-
getSearchFormValuesIfSetted:
|
|
98
|
-
setPaging:
|
|
99
|
-
getPaging:
|
|
100
|
-
setSearchFormValuesIfSetted:
|
|
101
|
-
}), (
|
|
102
|
-
class:
|
|
103
|
-
style:
|
|
122
|
+
return q({
|
|
123
|
+
submit: F,
|
|
124
|
+
reset: R,
|
|
125
|
+
refresh: () => X(),
|
|
126
|
+
refreshByDelete: (e) => Y(e),
|
|
127
|
+
scrollToFirstRow: oe,
|
|
128
|
+
getSearchFormValuesIfSetted: le,
|
|
129
|
+
setPaging: _,
|
|
130
|
+
getPaging: Z,
|
|
131
|
+
setSearchFormValuesIfSetted: ie
|
|
132
|
+
}), (e, n) => (o(), s("div", {
|
|
133
|
+
class: l([t(p)(), { [t(W)("adaptive")]: e.adaptive }, t(G)]),
|
|
134
|
+
style: D(e.containerStyle)
|
|
104
135
|
}, [
|
|
105
|
-
u(
|
|
106
|
-
formIns:
|
|
107
|
-
submit:
|
|
108
|
-
reset:
|
|
136
|
+
u(e.$slots, "header", {
|
|
137
|
+
formIns: ee,
|
|
138
|
+
submit: F,
|
|
139
|
+
reset: R,
|
|
140
|
+
loading: t(P).loading
|
|
109
141
|
}),
|
|
110
|
-
|
|
111
|
-
class:
|
|
112
|
-
|
|
113
|
-
{ [
|
|
142
|
+
fe("div", {
|
|
143
|
+
class: l([
|
|
144
|
+
t(p)("content-container"),
|
|
145
|
+
{ [t(H)("content-container", "spinning")]: d.value }
|
|
114
146
|
])
|
|
115
147
|
}, [
|
|
116
|
-
|
|
148
|
+
d.value ? (o(), s("div", {
|
|
117
149
|
key: 0,
|
|
118
|
-
class:
|
|
150
|
+
class: l(t(b)("spin-wrapper"))
|
|
119
151
|
}, [
|
|
120
|
-
|
|
121
|
-
], 2)) :
|
|
122
|
-
|
|
152
|
+
h(t(pe), { spinning: d.value }, null, 8, ["spinning"])
|
|
153
|
+
], 2)) : N("", !0),
|
|
154
|
+
f.value.length === 0 ? u(e.$slots, "empty", {
|
|
123
155
|
key: 1,
|
|
124
|
-
loading:
|
|
156
|
+
loading: d.value
|
|
125
157
|
}, () => [
|
|
126
|
-
|
|
158
|
+
h(t($), { image: t(K) }, null, 8, ["image"])
|
|
127
159
|
]) : (o(), s("div", {
|
|
128
160
|
key: 2,
|
|
129
161
|
ref_key: "contentRef",
|
|
130
|
-
ref:
|
|
131
|
-
style:
|
|
132
|
-
class:
|
|
162
|
+
ref: c,
|
|
163
|
+
style: D(e.contentStyle),
|
|
164
|
+
class: l(t(b)("content")),
|
|
165
|
+
onScroll: n[0] || (n[0] = //@ts-ignore
|
|
166
|
+
(...r) => t(z) && t(z)(...r))
|
|
133
167
|
}, [
|
|
134
|
-
|
|
135
|
-
|
|
168
|
+
e.virtual ? (o(), s(O, { key: 0 }, [
|
|
169
|
+
t(ve)(e.virtual) ? (o(), A(t(ke), {
|
|
136
170
|
key: 0,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"
|
|
140
|
-
|
|
171
|
+
ref_key: "scroller",
|
|
172
|
+
ref: g,
|
|
173
|
+
class: l(t(p)("scroll-wrapper")),
|
|
174
|
+
items: f.value,
|
|
175
|
+
"item-size": e.virtual,
|
|
176
|
+
"key-field": a.rowKey || "id",
|
|
177
|
+
onScrollEnd: E
|
|
141
178
|
}, {
|
|
142
|
-
default:
|
|
143
|
-
u(
|
|
179
|
+
default: B(({ item: r, index: i }) => [
|
|
180
|
+
u(e.$slots, "renderItem", {
|
|
144
181
|
item: r,
|
|
145
|
-
index:
|
|
182
|
+
index: i
|
|
146
183
|
})
|
|
147
184
|
]),
|
|
148
185
|
_: 3
|
|
149
|
-
}, 8, ["class", "items", "item-size", "key-field"])) : (o(),
|
|
186
|
+
}, 8, ["class", "items", "item-size", "key-field"])) : (o(), A(t(Ie), {
|
|
150
187
|
key: 1,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
188
|
+
ref_key: "scroller",
|
|
189
|
+
ref: g,
|
|
190
|
+
items: f.value,
|
|
191
|
+
"min-item-size": e.virtual.minItemSize,
|
|
192
|
+
class: l(t(p)("scroll-wrapper")),
|
|
193
|
+
"key-field": a.rowKey || "id",
|
|
194
|
+
onScrollEnd: E
|
|
154
195
|
}, {
|
|
155
|
-
default:
|
|
156
|
-
|
|
196
|
+
default: B(({ item: r, index: i, active: se }) => [
|
|
197
|
+
h(t(Pe), {
|
|
157
198
|
item: r,
|
|
158
|
-
active:
|
|
159
|
-
"data-index":
|
|
160
|
-
"size-dependencies":
|
|
199
|
+
active: se,
|
|
200
|
+
"data-index": i,
|
|
201
|
+
"size-dependencies": e.virtual.sizeDependencies?.(r)
|
|
161
202
|
}, {
|
|
162
|
-
default:
|
|
163
|
-
u(
|
|
203
|
+
default: B(() => [
|
|
204
|
+
u(e.$slots, "renderItem", {
|
|
164
205
|
item: r,
|
|
165
|
-
index:
|
|
206
|
+
index: i
|
|
166
207
|
})
|
|
167
208
|
]),
|
|
168
209
|
_: 2
|
|
169
210
|
}, 1032, ["item", "active", "data-index", "size-dependencies"])
|
|
170
211
|
]),
|
|
171
212
|
_: 3
|
|
172
|
-
}, 8, ["items", "min-item-size", "class"]))
|
|
173
|
-
], 64)) : u(
|
|
213
|
+
}, 8, ["items", "min-item-size", "class", "key-field"]))
|
|
214
|
+
], 64)) : u(e.$slots, "renderContent", {
|
|
174
215
|
key: 1,
|
|
175
|
-
dataSource:
|
|
216
|
+
dataSource: f.value
|
|
176
217
|
}, () => [
|
|
177
|
-
(o(!0), s(
|
|
218
|
+
(o(!0), s(O, null, de(f.value, (r, i) => u(e.$slots, "renderItem", {
|
|
178
219
|
item: r,
|
|
179
|
-
index:
|
|
220
|
+
index: i
|
|
180
221
|
})), 256))
|
|
181
222
|
])
|
|
182
|
-
],
|
|
223
|
+
], 38))
|
|
183
224
|
], 2),
|
|
184
|
-
|
|
225
|
+
S.value && re.value ? (o(), s("div", {
|
|
185
226
|
key: 0,
|
|
186
|
-
class:
|
|
187
|
-
style:
|
|
227
|
+
class: l(t(b)("footer")),
|
|
228
|
+
style: D(e.footerWarpperStyle)
|
|
188
229
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
{ onChange:
|
|
230
|
+
h(t(ge), me(
|
|
231
|
+
v.value ? t(T) : t(he)(t(P).pagination, ["showTotal"]),
|
|
232
|
+
{ onChange: ne }
|
|
192
233
|
), null, 16)
|
|
193
|
-
], 6)) :
|
|
234
|
+
], 6)) : N("", !0)
|
|
194
235
|
], 6));
|
|
195
236
|
}
|
|
196
237
|
});
|
|
197
238
|
export {
|
|
198
|
-
|
|
239
|
+
Oe as default
|
|
199
240
|
};
|
|
@@ -90,6 +90,11 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
|
90
90
|
* 是否自适应外部容器高度(无数据时充满容器、数据超出时内部滚动)
|
|
91
91
|
*/
|
|
92
92
|
adaptive?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* 请求网络请求模式: `paging`分页、`infinite-scroll`无限滚动
|
|
95
|
+
* @default "paging"
|
|
96
|
+
*/
|
|
97
|
+
fetchMode?: 'paging' | 'infinite-scroll';
|
|
93
98
|
};
|
|
94
99
|
export type ApListExpose = {
|
|
95
100
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApProCardStatisticProps, ApProCardStatisticSolts } from '../../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, VNode, RendererNode, RendererElement, VNodeArrayChildren, ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { Formatter } from '@aplus-frontend/antdv/es/statistic/utils';
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
attrs: Partial<{}>;
|
|
5
6
|
slots: Readonly<ApProCardStatisticSolts> & ApProCardStatisticSolts;
|
|
@@ -35,6 +36,7 @@ declare const __VLS_component: DefineComponent<ApProCardStatisticProps, {}, {},
|
|
|
35
36
|
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
36
37
|
[key: string]: any;
|
|
37
38
|
}> | null;
|
|
39
|
+
formatter: Formatter;
|
|
38
40
|
description: string | number | boolean | void | VNodeArrayChildren | VNode<RendererNode, RendererElement, {
|
|
39
41
|
[key: string]: any;
|
|
40
42
|
}> | null;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QuestionCircleOutlined as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { omit as
|
|
1
|
+
import { defineComponent as F, useSlots as I, computed as t, createVNode as r, Fragment as s, createElementBlock as P, openBlock as o, mergeProps as x, createBlock as u, createElementVNode as C, resolveDynamicComponent as a, normalizeClass as B, unref as O, createSlots as V, withCtx as d } from "vue";
|
|
2
|
+
import { QuestionCircleOutlined as Q } from "@ant-design/icons-vue";
|
|
3
|
+
import { Tooltip as R, Badge as T, Statistic as q } from "@aplus-frontend/antdv";
|
|
4
|
+
import { omit as G } from "lodash-unified";
|
|
5
5
|
import "../../../config-provider/index.mjs";
|
|
6
|
-
import
|
|
6
|
+
import H from "../../style/statistic.mjs";
|
|
7
7
|
import { mergeClass as c } from "../../../editable-table/utils.mjs";
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
const
|
|
8
|
+
import { useNamespace as J } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const ne = /* @__PURE__ */ F({
|
|
10
10
|
name: "ApProCardStatistic",
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
@@ -18,7 +18,8 @@ const te = /* @__PURE__ */ E({
|
|
|
18
18
|
valueStyle: {},
|
|
19
19
|
valueRender: {},
|
|
20
20
|
formatter: {
|
|
21
|
-
type: [Boolean, String, Function]
|
|
21
|
+
type: [Boolean, String, Function],
|
|
22
|
+
default: void 0
|
|
22
23
|
},
|
|
23
24
|
precision: {},
|
|
24
25
|
prefix: {
|
|
@@ -62,9 +63,9 @@ const te = /* @__PURE__ */ E({
|
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
setup(S) {
|
|
65
|
-
const n =
|
|
66
|
+
const n = I(), e = S, {
|
|
66
67
|
b: l
|
|
67
|
-
} =
|
|
68
|
+
} = J("pro-card-statistic"), b = H("pro-card-statistic"), g = t(() => {
|
|
68
69
|
const i = l();
|
|
69
70
|
return c(`${i}`, [e.size ? `${i}-size-${e.size}` : void 0, b.value].filter(Boolean));
|
|
70
71
|
}), $ = t(() => l("tip")), D = t(() => {
|
|
@@ -73,51 +74,54 @@ const te = /* @__PURE__ */ E({
|
|
|
73
74
|
}), N = t(() => l("status")), M = t(() => l("icon")), A = t(() => l("wrapper")), j = t(() => l("content")), k = t(() => {
|
|
74
75
|
const i = l();
|
|
75
76
|
return c(`${i}-layout`, [e.layout ? `${i}-layout-${e.layout}` : void 0, e.trend ? `${i}-trend-${e.trend}` : void 0].filter(Boolean));
|
|
76
|
-
}), _ = t(() => l("description")), f = t(() => e.tip || n.tip ? r(
|
|
77
|
+
}), _ = t(() => l("description")), f = t(() => e.tip || n.tip ? r(R, {
|
|
77
78
|
title: e.tip ?? n.tip?.()
|
|
78
79
|
}, {
|
|
79
|
-
default: () => [r(
|
|
80
|
+
default: () => [r(Q, {
|
|
80
81
|
class: $.value
|
|
81
82
|
}, null)]
|
|
82
83
|
}) : void 0), p = t(() => e.trend ? r("div", {
|
|
83
84
|
class: D.value
|
|
84
|
-
}, null) : void 0), z = t(() => e.status ? r(
|
|
85
|
+
}, null) : void 0), z = t(() => e.status ? r(T, {
|
|
85
86
|
class: N.value,
|
|
86
87
|
status: e.status
|
|
87
88
|
}, null) : void 0), h = t(() => e.icon || n.icon ? r("div", {
|
|
88
89
|
class: M.value
|
|
89
|
-
}, [e.icon ?? n.icon?.()]) : void 0), m = t(() => e.title || n.title ? r(
|
|
90
|
+
}, [e.icon ?? n.icon?.()]) : void 0), m = t(() => e.title || n.title ? r(s, null, [e.title || n.title?.()]) : void 0), v = t(() => e.prefix || n.prefix ? r(s, null, [e.prefix || n.prefix?.()]) : void 0), y = t(() => e.suffix || n.suffix ? r(s, null, [e.suffix || n.suffix?.()]) : void 0), w = t(() => e.description || n.description ? r("div", {
|
|
90
91
|
class: _.value
|
|
91
92
|
}, [e.description || n.description?.()]) : void 0);
|
|
92
|
-
return (i,
|
|
93
|
+
return (i, K) => (o(), P("div", x({
|
|
93
94
|
...i.$attrs
|
|
94
95
|
}, {
|
|
95
96
|
class: g.value
|
|
96
|
-
}), [(o(),
|
|
97
|
+
}), [(o(), u(a(h.value))), C("div", {
|
|
97
98
|
class: B(A.value)
|
|
98
|
-
}, [(o(),
|
|
99
|
+
}, [(o(), u(a(z.value))), C("div", {
|
|
99
100
|
class: B(j.value)
|
|
100
|
-
}, [r(O(
|
|
101
|
+
}, [r(O(q), x({
|
|
101
102
|
class: k.value
|
|
102
103
|
}, {
|
|
103
|
-
...O(
|
|
104
|
-
|
|
104
|
+
...O(G)(e, ["title", "prefix"]),
|
|
105
|
+
formatter: e.formatter ?? (({
|
|
106
|
+
value: E
|
|
107
|
+
}) => E ?? "--")
|
|
108
|
+
}), V({
|
|
105
109
|
_: 2
|
|
106
110
|
}, [m.value || f.value ? {
|
|
107
111
|
name: "title",
|
|
108
|
-
fn: d(() => [(o(),
|
|
112
|
+
fn: d(() => [(o(), u(a(m.value))), (o(), u(a(f.value)))]),
|
|
109
113
|
key: "0"
|
|
110
114
|
} : void 0, p.value || v.value ? {
|
|
111
115
|
name: "prefix",
|
|
112
|
-
fn: d(() => [(o(),
|
|
116
|
+
fn: d(() => [(o(), u(a(p.value))), (o(), u(a(v.value)))]),
|
|
113
117
|
key: "1"
|
|
114
118
|
} : void 0, y.value ? {
|
|
115
119
|
name: "suffix",
|
|
116
|
-
fn: d(() => [(o(),
|
|
120
|
+
fn: d(() => [(o(), u(a(y.value)))]),
|
|
117
121
|
key: "2"
|
|
118
|
-
} : void 0]), 1040, ["class"]), (o(),
|
|
122
|
+
} : void 0]), 1040, ["class"]), (o(), u(a(w.value)))], 2)], 2)], 16));
|
|
119
123
|
}
|
|
120
124
|
});
|
|
121
125
|
export {
|
|
122
|
-
|
|
126
|
+
ne as default
|
|
123
127
|
};
|
|
@@ -64,6 +64,16 @@ export type UseTablePagingParams<DataType, ParamsType> = {
|
|
|
64
64
|
*/
|
|
65
65
|
onAfterRequest?: (records: DataType[]) => void;
|
|
66
66
|
};
|
|
67
|
+
export type TablePagingRequestOptions = {
|
|
68
|
+
/**
|
|
69
|
+
* 是否缓存数据(无限滚动下适用)
|
|
70
|
+
*/
|
|
71
|
+
cache?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 单次网络请求成功后触发
|
|
74
|
+
*/
|
|
75
|
+
onSuccess?: (rawParams: Recordable, hasMore: boolean) => void;
|
|
76
|
+
};
|
|
67
77
|
export type InternalPagingType = Partial<{
|
|
68
78
|
current: number;
|
|
69
79
|
pageSize: number;
|
|
@@ -112,5 +122,6 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
|
|
|
112
122
|
};
|
|
113
123
|
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
114
124
|
submitWith: (resetCurrent?: boolean) => void;
|
|
125
|
+
fetchNextPageAndCache: () => void;
|
|
115
126
|
};
|
|
116
127
|
export {};
|