فهرست منبع

20210705 - ruter修改

fanghuisheng 4 سال پیش
والد
کامیت
4abdb04f05
3فایلهای تغییر یافته به همراه9 افزوده شده و 29 حذف شده
  1. 1 1
      public/index.html
  2. 0 3
      src/main.js
  3. 8 25
      src/router/index.js

+ 1 - 1
public/index.html

@@ -17,7 +17,7 @@
       <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
     </noscript>
     <div id="app"></div>
-    <!-- <script src="./static/config.js"></script> -->
+    <script src="./static/config.js"></script>
 </body>
 
 </html>

+ 0 - 3
src/main.js

@@ -17,9 +17,6 @@ app.use(Antd).mount('#app');
 import '@/assets/js/flexible.js';
 
 
-
-
-
 /*路由守卫*/
 router.beforeEach((to, from, next) => {
     /* 路由发生变化修改页面title */

+ 8 - 25
src/router/index.js

@@ -4,14 +4,18 @@ import { createRouter, createWebHistory } from 'vue-router'
 const routerHistory = createWebHistory();
 
 let routes = [
-    // route -> routes
-    // 首页
+    // ming router start
+
+    // 大屏首页
     {
         path: '/',
-        name: '/',
+        name: 'home',
+        meta: { title: '首页看板' },
         component: () =>
-            import ('../views/CircuitEdit.vue'),
+            import ('../views/home/index.vue'),
     },
+    // ming router end
+
     // 编辑器页面
     {
         path: '/CircuitEdit',
@@ -25,28 +29,7 @@ let routes = [
         name: 'CircuitPreview',
         component: () =>
             import ('../views/CircuitPreview.vue'),
-    },
-
-
-
-
-
-    // ming router start
-
-    // 大屏首页
-    {
-        path: '/home/index',
-        name: 'home',
-        meta: { title: '首页看板' },
-        component: () =>
-            import ('../views/home/index.vue'),
     }
-    // ming router end
-
-
-
-
-
 
 
 ]