管理页面
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',
|
||||
@ -47,14 +47,6 @@ const routes = [
|
||||
title: '新闻中心',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/news/detail',
|
||||
name: 'NewsDetail',
|
||||
component: () => import('@/views/news/detail.vue'),
|
||||
meta: {
|
||||
title: '新闻详情',
|
||||
},
|
||||
},
|
||||
// ============================================ 关于我们 ============================================
|
||||
{
|
||||
path: '/about',
|
||||
@ -82,6 +74,15 @@ const routes = [
|
||||
title: '下载中心',
|
||||
},
|
||||
},
|
||||
// ============================================ 管理页面 ============================================
|
||||
{
|
||||
path: '/manager',
|
||||
name: 'Manager',
|
||||
component: () => import('@/views/manager/index.vue'),
|
||||
meta: {
|
||||
title: '管理中心',
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
@ -93,7 +94,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