将 CRUD Table 的滚动条取消,使查看更加舒服

This commit is contained in:
TermiNexus committed 2026-08-04 04:02:13 +08:00
1 parent 8e7ba71826
commit 6100dc114c
1 file changed
+7 -2
+7 -2
View File
@@ -44,6 +44,11 @@ const props = defineProps<{
maxHeight?: number
}>()
// 表格实际使用的最大高度:显式 maxHeight 优先;
// stretch(整页列表)场景默认取视口高度 60%,保证表格与卡片一体、
// 不产生页面级滚动栏(行多时表格内部滚动)
const tableMaxHeight = computed(() => props.maxHeight ?? (props.stretch ? Math.floor(window.innerHeight * 0.6) : undefined))
const options: UseCrudTableOptions<T> = {
table: props.table,
query: props.query,
@@ -178,8 +183,8 @@ function renderUuid(value: unknown): string {
border
stripe
round
:height="props.stretch ? '100%' : 'auto'"
:max-height="props.maxHeight"
:height="'auto'"
:max-height="tableMaxHeight"
:row-config="{ isHover: true }"
:column-config="{ resizable: true }"
:checkbox-config="{ range: true }"