style: tab样式调整 (#18183)

This commit is contained in:
王嘉豪
2026-04-02 11:05:27 +08:00
committed by wangjiahao
parent df3d49be06
commit fe943cbf76
2 changed files with 8 additions and 4 deletions

View File

@@ -326,8 +326,10 @@ const calcTabLength = () => {
const containerDom = document.getElementById(
'tab-' + element.value.propValue[element.value.propValue.length - 1].name
)
tabsAreaScroll.value =
containerDom.parentNode.clientWidth > tabComponentRef.value.clientWidth - 100
if (containerDom) {
tabsAreaScroll.value =
containerDom?.parentNode?.clientWidth > tabComponentRef.value.clientWidth - 100
}
} else {
tabsAreaScroll.value = false
}

View File

@@ -323,8 +323,10 @@ const calcTabLength = () => {
const containerDom = document.getElementById(
'tab-' + element.value.propValue[element.value.propValue.length - 1].name
)
tabsAreaScroll.value =
containerDom.parentNode.clientWidth > tabComponentRef.value.clientWidth - 100
if (containerDom) {
tabsAreaScroll.value =
containerDom?.parentNode?.clientWidth > tabComponentRef.value.clientWidth - 100
}
} else {
tabsAreaScroll.value = false
}