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