zzz-pc-view 0.0.19 → 0.0.21
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/package.json
CHANGED
|
@@ -454,6 +454,12 @@ export declare abstract class CurdHandler<T extends object = object> extends Fil
|
|
|
454
454
|
* @description 这对于性能优化很重要,因为它避免了不必要的更新。
|
|
455
455
|
*/
|
|
456
456
|
protected readonly totalRef: import('vue').ShallowRef<number, number>;
|
|
457
|
+
/**
|
|
458
|
+
* 获取列表数据的总数。
|
|
459
|
+
* 这个方法返回 totalRef 引用的值,它表示列表数据的总数。
|
|
460
|
+
* @returns {number} - 列表数据的总数。
|
|
461
|
+
*/
|
|
462
|
+
get total(): number;
|
|
457
463
|
/**
|
|
458
464
|
* 设置列表数据和总数。
|
|
459
465
|
* 这个方法用于更新 listRef 和 totalRef 引用的值,从而更新列表数据和总数。
|
package/src/index.es.js
CHANGED
|
@@ -3724,6 +3724,14 @@ class CurdHandler extends FilterHandler {
|
|
|
3724
3724
|
get displayList() {
|
|
3725
3725
|
return this.displayListComputed.value;
|
|
3726
3726
|
}
|
|
3727
|
+
/**
|
|
3728
|
+
* 获取列表数据的总数。
|
|
3729
|
+
* 这个方法返回 totalRef 引用的值,它表示列表数据的总数。
|
|
3730
|
+
* @returns {number} - 列表数据的总数。
|
|
3731
|
+
*/
|
|
3732
|
+
get total() {
|
|
3733
|
+
return this.totalRef.value;
|
|
3734
|
+
}
|
|
3727
3735
|
/**
|
|
3728
3736
|
* 设置列表数据和总数。
|
|
3729
3737
|
* 这个方法用于更新 listRef 和 totalRef 引用的值,从而更新列表数据和总数。
|
|
@@ -9946,8 +9954,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
9946
9954
|
viewHandler: {}
|
|
9947
9955
|
},
|
|
9948
9956
|
setup(__props) {
|
|
9957
|
+
const props = __props;
|
|
9958
|
+
const { pagination } = props.viewHandler;
|
|
9949
9959
|
return (_ctx, _cache) => {
|
|
9950
9960
|
const _component_el_card = resolveComponent("el-card");
|
|
9961
|
+
const _component_el_pagination = resolveComponent("el-pagination");
|
|
9951
9962
|
const _directive_loading = resolveDirective("loading");
|
|
9952
9963
|
return openBlock(), createBlock(_sfc_main$b, null, {
|
|
9953
9964
|
header: withCtx(() => [
|
|
@@ -9991,6 +10002,21 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
9991
10002
|
])) : createCommentVNode("", true)
|
|
9992
10003
|
])
|
|
9993
10004
|
]),
|
|
10005
|
+
footer: withCtx(() => [
|
|
10006
|
+
unref(pagination) ? (openBlock(), createBlock(_component_el_pagination, {
|
|
10007
|
+
key: 0,
|
|
10008
|
+
"current-page": unref(pagination).currentPage,
|
|
10009
|
+
"onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => unref(pagination).currentPage = $event),
|
|
10010
|
+
"page-size": unref(pagination).pageSize,
|
|
10011
|
+
"onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => unref(pagination).pageSize = $event),
|
|
10012
|
+
"page-sizes": [10, 20, 30, 40, 50, 100],
|
|
10013
|
+
total: _ctx.viewHandler.total,
|
|
10014
|
+
layout: "total, sizes, prev, pager, next",
|
|
10015
|
+
background: "",
|
|
10016
|
+
onCurrentChange: _ctx.viewHandler.onCurrentPageChange,
|
|
10017
|
+
onSizeChange: _ctx.viewHandler.onPageSizeChange
|
|
10018
|
+
}, null, 8, ["current-page", "page-size", "total", "onCurrentChange", "onSizeChange"])) : createCommentVNode("", true)
|
|
10019
|
+
]),
|
|
9994
10020
|
_: 3
|
|
9995
10021
|
});
|
|
9996
10022
|
};
|