From b81d231caf53364d98a5edf576270fd923f3221a Mon Sep 17 00:00:00 2001 From: huliang <1539398430@qq.com> Date: Tue, 8 Jul 2025 18:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=B5=B1=E7=9B=A3=E6=8E=A7=E7=95=B6?= =?UTF-8?q?=E5=89=8D=E8=B7=AF=E7=94=B1=E5=A6=82=E7=9B=B8=E5=90=8C=E4=BB=8D?= =?UTF-8?q?=E8=A7=B8=E7=99=BC=20iframe=20=E9=87=8D=E6=96=B0=E8=BC=89?= =?UTF-8?q?=E5=85=A5=20|=20scrollbar=E5=AF=AC=E5=BA=A6none?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/navbar/LeftSidebar.vue | 24 ++++++++++++++++++++++-- src/style.css | 16 ++++++++++++++++ src/views/system/SystemPage.vue | 16 +++++++++++++++- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/components/navbar/LeftSidebar.vue b/src/components/navbar/LeftSidebar.vue index 65343dd..8e97141 100644 --- a/src/components/navbar/LeftSidebar.vue +++ b/src/components/navbar/LeftSidebar.vue @@ -29,10 +29,30 @@ const filteredItems = computed(() => { const handleClick = (ord) => { if (ord) { - router.push({ + const targetRoute = { name: "baja", query: { pagename: "system", ord: encodeURIComponent(ord) }, - }); + }; + // 檢查當前路由是否相同 + if ( + router.currentRoute.value.query.ord === targetRoute.query.ord + ) { + // 相同則加上一個時間戳記來強制重新導航,觸發 iframe 重新載入 + router.push({ + name: "baja", + query: { + ...targetRoute.query, + _t: new Date().getTime(), + }, + }); + } else { + router.push(targetRoute); + } + + // 點擊選項後關閉側邊欄 + if (props.toggleSidebar) { + props.toggleSidebar(); + } } }; diff --git a/src/style.css b/src/style.css index bcd1bc8..e0ebc8b 100644 --- a/src/style.css +++ b/src/style.css @@ -4,6 +4,22 @@ serif; } +/* Webkit 瀏覽器 (Chrome, Safari, Edge) */ +::-webkit-scrollbar { + width: 0px; + background: transparent; +} + +/* Firefox */ +* { + scrollbar-width: none; +} + +/* IE 和舊版 Edge */ +* { + -ms-overflow-style: none; +} + a { color: #69b0cf; } diff --git a/src/views/system/SystemPage.vue b/src/views/system/SystemPage.vue index 983b5f2..3bfac5f 100644 --- a/src/views/system/SystemPage.vue +++ b/src/views/system/SystemPage.vue @@ -1,5 +1,5 @@