This commit is contained in:
sjl
2025-11-05 15:10:44 +08:00
parent 1ec3bd11a0
commit 35ce7314b0
8 changed files with 40 additions and 31 deletions

View File

@@ -2296,10 +2296,15 @@ const area = () => {
onMounted(() => {
nodeData.value.level = 0
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
}
nextTick(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom && dom.offsetHeight > 0) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
} else {
// 设置默认值
size.value = 20
}
})
})
area()
</script>