This commit is contained in:
2025-10-13 18:41:08 +08:00
parent a8717ccc13
commit 9a01223fc9
7 changed files with 58 additions and 44 deletions

View File

@ -1,9 +1,9 @@
import {createWebHashHistory, createRouter} from 'vue-router'
import { createWebHashHistory, createRouter } from 'vue-router'
import HomeView from '@/views/homepage/index.vue'
const routes = [
{path: '/', component: HomeView},
{ path: '/', component: HomeView },
// ============================================ 产品中心 ============================================
{
path: '/product/monitorSystem',
@ -85,7 +85,7 @@ router.afterEach((to, from) => {
// 只有路径变化时才滚动到顶部
if (to.path !== from.path) {
requestAnimationFrame(() => {
window.scrollTo({top: 0, behavior: 'instant'})
window.scrollTo({ top: 0, behavior: 'instant' })
})
}
})