From f711a3565180bf4344a882e240eba54a5de83536 Mon Sep 17 00:00:00 2001 From: yinkang Date: Thu, 11 Dec 2025 15:00:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=AF=8F=E6=AC=A1=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=BB=9A=E5=8A=A8=E6=9D=A1=E7=BD=AE=E9=A1=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/size1920/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/index/size1920/index.vue b/src/views/index/size1920/index.vue index 3400523..6513488 100644 --- a/src/views/index/size1920/index.vue +++ b/src/views/index/size1920/index.vue @@ -2,7 +2,7 @@ import customHeader from "@/components/customHeader/index.vue"; import customFooter from "@/components/customFooter/index.vue"; import { NScrollbar } from "naive-ui"; -import { computed } from "vue"; +import { computed, watch, ref } from "vue"; import { useRoute } from "vue-router"; const route = useRoute(); @@ -55,12 +55,18 @@ const currentBg = computed(() => { // 兜底:当作颜色或直接背景 return { background: value }; }); + +const scrollbarRef = ref(null); +watch(route, () => { + scrollbarRef.value?.scrollTo({ top: 0 }); +})