修改路由守卫
This commit is contained in:
parent
c0e58d2994
commit
18ca4ba0f7
@ -32,14 +32,6 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
component: () =>
|
component: () =>
|
||||||
import(/* webpackChunkName: "about" */ "../views/demo/demo.vue"),
|
import(/* webpackChunkName: "about" */ "../views/demo/demo.vue"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/index",
|
|
||||||
name: "index",
|
|
||||||
// route level code-splitting
|
|
||||||
// this generates a separate chunk (about.[hash].js) for this route
|
|
||||||
// which is lazy-loaded when the route is visited.
|
|
||||||
component: () => import("../views/index.vue"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/environment",
|
path: "/environment",
|
||||||
name: "environment",
|
name: "environment",
|
||||||
@ -61,16 +53,14 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
{
|
{
|
||||||
path: "/energyConsume",
|
path: "/energyConsume",
|
||||||
name: "energyConsume",
|
name: "energyConsume",
|
||||||
component: () => import("../views/energyConsume/index.vue"),
|
component: () => import("../views/energyConsume/index.vue")
|
||||||
children: [
|
},
|
||||||
{
|
{
|
||||||
path: "/energyConsume/historyData",
|
path: "/energyConsume/historyData",
|
||||||
name: 'historyData',
|
name: 'historyData',
|
||||||
component: () =>
|
component: () =>
|
||||||
import("../views/energyConsume/content/child/historyData.vue"),
|
import("../views/energyConsume/content/child/historyData.vue"),
|
||||||
},
|
},
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/InPlantProducts",
|
path: "/InPlantProducts",
|
||||||
name: "InPlantProducts",
|
name: "InPlantProducts",
|
||||||
@ -332,7 +322,7 @@ router.beforeEach(async (to: any, from, next) => {
|
|||||||
let hash = to.query.hash
|
let hash = to.query.hash
|
||||||
let arr = [
|
let arr = [
|
||||||
'legionProducts', 'devItem', 'tufting', 'Winding', 'Large_Format',
|
'legionProducts', 'devItem', 'tufting', 'Winding', 'Large_Format',
|
||||||
'GetonAgain', 'OffsiteDevList', 'Mechanicschild', 'Mechanicsson', 'jixieHistoryData'
|
'GetonAgain', 'OffsiteDevList', 'Mechanicschild', 'Mechanicsson','historyData', 'jixieHistoryData'
|
||||||
]
|
]
|
||||||
|
|
||||||
// 返回 false 以取消导航
|
// 返回 false 以取消导航
|
||||||
|
Loading…
Reference in New Issue
Block a user