From 974f9e13f2187f43ad1e6223e6d01f211c3afeb0 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 27 Aug 2026 14:54:46 +0800 Subject: [PATCH] fix(Embedded Systems): The top and bottom spacing is inconsistent between floating mode and full-screen mode; optimization is recommended. --- frontend/src/main.ts | 15 ++++++++++++--- frontend/src/views/chat/ChatTokenTime.vue | 2 +- .../src/views/chat/chat-block/ChartPopover.vue | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 08c414c1a..881a63bc1 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -15,15 +15,24 @@ cssHasPseudo(document) function supportsFlexGap() { const flex = document.createElement('div') + flex.style.display = 'flex' flex.style.flexDirection = 'column' flex.style.rowGap = '1px' - flex.appendChild(document.createElement('div')) - flex.appendChild(document.createElement('div')) + const child1 = document.createElement('div') + const child2 = document.createElement('div') + + child1.style.height = '1px' + child2.style.height = '1px' + + flex.appendChild(child1) + flex.appendChild(child2) document.body.appendChild(flex) - const isSupported = flex.scrollHeight === 1 + + const isSupported = flex.scrollHeight === 3 + document.body.removeChild(flex) return isSupported diff --git a/frontend/src/views/chat/ChatTokenTime.vue b/frontend/src/views/chat/ChatTokenTime.vue index c56c9662c..184dc3c8a 100644 --- a/frontend/src/views/chat/ChatTokenTime.vue +++ b/frontend/src/views/chat/ChatTokenTime.vue @@ -61,7 +61,7 @@ function getLogList() { top: 50%; left: 50%; transform: translate(-50%, -50%); - width: 84px; + width: calc(100% + 8px); height: 26px; position: absolute; } diff --git a/frontend/src/views/chat/chat-block/ChartPopover.vue b/frontend/src/views/chat/chat-block/ChartPopover.vue index a94cbeb03..4c04a642b 100644 --- a/frontend/src/views/chat/chat-block/ChartPopover.vue +++ b/frontend/src/views/chat/chat-block/ChartPopover.vue @@ -81,7 +81,7 @@ const handleDefaultChatChange = (val: any) => {