微调
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user