更新
This commit is contained in:
@@ -256,18 +256,22 @@ const tableContent = useTemplateRef('tableContent')
|
||||
let scroll = ref({
|
||||
scrollToFirstRowOnChange: true,
|
||||
x: 'max-content',
|
||||
y: 100,
|
||||
y: true,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
let tableHeight = 100
|
||||
updateTableHeight()
|
||||
})
|
||||
|
||||
const updateTableHeight = () => {
|
||||
let tableHeight = 0
|
||||
if (props.pagination !== false) {
|
||||
tableHeight = tableContent.value.clientHeight - 100
|
||||
tableHeight = tableContent.value.clientHeight - 105
|
||||
} else {
|
||||
tableHeight = tableContent.value.clientHeight - 65
|
||||
}
|
||||
scroll.value.y = tableHeight
|
||||
})
|
||||
}
|
||||
|
||||
// 根据表格宽度优化横向滚动配置
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user