refactor: 不分页表格逻辑调整
This commit is contained in:
parent
4d02b544bd
commit
c3b2d18a06
|
@ -381,13 +381,17 @@ export default function useTableProps<T>(
|
|||
|
||||
watchEffect(() => {
|
||||
const { heightUsed, showPagination, selectedKeys, msPagination } = propsRes.value;
|
||||
const { pageSize, total } = msPagination as Pagination;
|
||||
/*
|
||||
* 是否有底部操作栏 包括 批量操作 和 分页器
|
||||
* 1. 有分页器,且总条数大于每页条数
|
||||
* 2. 有选中项
|
||||
*/
|
||||
const hasFooterAction = (showPagination && total > pageSize) || selectedKeys.size > 0;
|
||||
let hasFooterAction = false;
|
||||
if (showPagination) {
|
||||
const { pageSize, total } = msPagination as Pagination;
|
||||
/*
|
||||
* 是否有底部操作栏 包括 批量操作 和 分页器
|
||||
* 1. 有分页器,且总条数大于每页条数
|
||||
* 2. 有选中项
|
||||
*/
|
||||
hasFooterAction = total > pageSize || selectedKeys.size > 0;
|
||||
}
|
||||
|
||||
const currentY =
|
||||
appStore.innerHeight - (heightUsed || defaultHeightUsed) + (hasFooterAction ? 0 : footerActionWrapHeight);
|
||||
propsRes.value.showFooterActionWrap = hasFooterAction;
|
||||
|
|
Loading…
Reference in New Issue