From beca65f4d01ca07c358102a35b949c2a4f277afe Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期三, 24 五月 2023 10:36:27 +0800
Subject: [PATCH] 增加车间监控界面

---
 src/router/index.ts |   44 ++++++++++++++++++++++----------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/router/index.ts b/src/router/index.ts
index 359c388..a870521 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,37 +1,37 @@
-import type { RouteRecordRaw } from 'vue-router';
-import type { App } from 'vue';
+import type { App } from 'vue'
+import type { RouteRecordRaw } from 'vue-router'
 
-import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
-import { basicRoutes } from './routes';
+import { createRouter, createWebHistory } from 'vue-router'
+import { basicRoutes } from './routes'
 
 // 鐧藉悕鍗曞簲璇ュ寘鍚熀鏈潤鎬佽矾鐢�
-const WHITE_NAME_LIST: string[] = [];
+const WHITE_NAME_LIST: string[] = []
 const getRouteNames = (array: any[]) =>
-  array.forEach((item) => {
-    WHITE_NAME_LIST.push(item.name);
-    getRouteNames(item.children || []);
-  });
-getRouteNames(basicRoutes);
+	array.forEach((item) => {
+		WHITE_NAME_LIST.push(item.name)
+		getRouteNames(item.children || [])
+	})
+getRouteNames(basicRoutes)
 
 // app router
 export const router = createRouter({
-  history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH),
-  routes: basicRoutes as unknown as RouteRecordRaw[],
-  strict: true,
-  scrollBehavior: () => ({ left: 0, top: 0 }),
-});
+	history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH),
+	routes: basicRoutes as unknown as RouteRecordRaw[],
+	strict: true,
+	scrollBehavior: () => ({ left: 0, top: 0 }),
+})
 
 // reset router
 export function resetRouter() {
-  router.getRoutes().forEach((route) => {
-    const { name } = route;
-    if (name && !WHITE_NAME_LIST.includes(name as string)) {
-      router.hasRoute(name) && router.removeRoute(name);
-    }
-  });
+	router.getRoutes().forEach((route) => {
+		const { name } = route
+		if (name && !WHITE_NAME_LIST.includes(name as string)) {
+			router.hasRoute(name) && router.removeRoute(name)
+		}
+	})
 }
 
 // config router
 export function setupRouter(app: App<Element>) {
-  app.use(router);
+	app.use(router)
 }

--
Gitblit v1.9.3