Browse Source

fix: 修复demo示例 同步修改问题

richard1015 5 years ago
parent
commit
52279a488f
3 changed files with 4 additions and 4 deletions
  1. 2 1
      package.json
  2. 1 2
      src/sites/doc/router.ts
  3. 1 1
      src/sites/mobile/App.vue

+ 2 - 1
package.json

@@ -87,7 +87,8 @@
       "ecmaVersion": 2020
     },
     "rules": {
-      "vue/no-unused-components": "off"
+      "vue/no-unused-components": "off",
+      "no-debugger": "off"
     }
   },
   "husky": {

+ 1 - 2
src/sites/doc/router.ts

@@ -14,12 +14,11 @@ files.keys().forEach(component => {
 const routes: Array<RouteRecordRaw> = [
   {
     path: '/',
-    name: 'index',
+    name: '/',
     component: Index,
     children: pagesRouter
   }
 ];
-
 const router = createRouter({
   history: createWebHashHistory(),
   routes,

+ 1 - 1
src/sites/mobile/App.vue

@@ -20,7 +20,7 @@ export default defineComponent({
       () => {
         const { origin, hash, pathname } = window.top.location;
         if (!isMobile && route.hash != hash) {
-          window.top.location.replace(`${origin}${pathname}#/${route.hash}`);
+          // window.top.location.replace(`${origin}${pathname}#/${route.hash}`);
           title.value = route.name as string;
         } else {
           title.value = route.name as string;