From fe943cbf7639407f12e10166bf703ed99cb2002d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Thu, 2 Apr 2026 11:05:27 +0800 Subject: [PATCH] =?UTF-8?q?style:=20tab=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=20(#18183)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/de-screen/Component.vue | 6 ++++-- .../src/custom-component/de-tabs/Component.vue | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/custom-component/de-screen/Component.vue b/core/core-frontend/src/custom-component/de-screen/Component.vue index ebc5b0b1c9..04161dd049 100644 --- a/core/core-frontend/src/custom-component/de-screen/Component.vue +++ b/core/core-frontend/src/custom-component/de-screen/Component.vue @@ -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 } diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue index eae0c84325..fab16cd76a 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -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 }