修改
This commit is contained in:
@ -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' })
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user