6141b25a2f6960d1ee3b16f448f3782423659559d8d41b5cd2bef6ef4b4b44b6.json 2.3 KB

1
  1. {"ast":null,"code":"import Vue from \"vue\";\nimport VueRouter from \"vue-router\";\nimport MyLayout from \"@/components/MyLayout\";\nVue.use(VueRouter);\nconst routes = [\n//因为导航到的每个页面,都包含了导航栏、头部、底部、主体部分(统一到MyLayout组件中)\n//所以我每个菜单都会让根菜单component: MyLayout,再用 redirect 找到原本component的主体页面。(有多个子菜单的 redirect 可以省略)\n{\n path: \"/\",\n component: MyLayout,\n redirect: '/ordinaryPage',\n children: [{\n path: \"ordinaryPage\",\n component: () => import(\"@/views/ordinaryPage\")\n }]\n}];\nconst router = new VueRouter({\n mode: \"history\",\n base: process.env.BASE_URL,\n routes\n});\nexport default router;","map":{"version":3,"names":["Vue","VueRouter","MyLayout","use","routes","path","component","redirect","children","router","mode","base","process","env","BASE_URL"],"sources":["/Users/mac/projects/mime/mine/src/router/index.js"],"sourcesContent":["import Vue from \"vue\";\nimport VueRouter from \"vue-router\";\nimport MyLayout from \"@/components/MyLayout\";\n\nVue.use(VueRouter);\n\nconst routes = [\n //因为导航到的每个页面,都包含了导航栏、头部、底部、主体部分(统一到MyLayout组件中)\n //所以我每个菜单都会让根菜单component: MyLayout,再用 redirect 找到原本component的主体页面。(有多个子菜单的 redirect 可以省略)\n {\n path: \"/\",\n component: MyLayout,\n redirect: '/ordinaryPage',\n children: [\n {\n path: \"ordinaryPage\",\n component: () => import(\"@/views/ordinaryPage\")\n }\n ]\n }\n];\n\nconst router = new VueRouter({\n mode: \"history\",\n base: process.env.BASE_URL,\n routes,\n});\n\nexport default router;\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AACrB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,QAAQ,MAAM,uBAAuB;AAE5CF,GAAG,CAACG,GAAG,CAACF,SAAS,CAAC;AAElB,MAAMG,MAAM,GAAG;AACb;AACA;AACA;EACEC,IAAI,EAAE,GAAG;EACTC,SAAS,EAAEJ,QAAQ;EACnBK,QAAQ,EAAE,eAAe;EACzBC,QAAQ,EAAE,CACR;IACEH,IAAI,EAAE,cAAc;IACpBC,SAAS,EAAEA,CAAA,KAAM,MAAM,CAAC,sBAAsB;EAChD,CAAC;AAEL,CAAC,CACF;AAED,MAAMG,MAAM,GAAG,IAAIR,SAAS,CAAC;EAC3BS,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,QAAQ;EAC1BV;AACF,CAAC,CAAC;AAEF,eAAeK,MAAM"},"metadata":{},"sourceType":"module","externalDependencies":[]}