浏览代码

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

richard1015 5 年之前
父节点
当前提交
52279a488f
共有 3 个文件被更改,包括 4 次插入4 次删除
  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
       "ecmaVersion": 2020
     },
     },
     "rules": {
     "rules": {
-      "vue/no-unused-components": "off"
+      "vue/no-unused-components": "off",
+      "no-debugger": "off"
     }
     }
   },
   },
   "husky": {
   "husky": {

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

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

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

@@ -20,7 +20,7 @@ export default defineComponent({
       () => {
       () => {
         const { origin, hash, pathname } = window.top.location;
         const { origin, hash, pathname } = window.top.location;
         if (!isMobile && route.hash != hash) {
         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;
           title.value = route.name as string;
         } else {
         } else {
           title.value = route.name as string;
           title.value = route.name as string;