|
|
@ -2,7 +2,6 @@ import { createRouter, createWebHashHistory } from "vue-router"; |
|
|
|
import Home from "@/views/home.vue"; |
|
|
|
import { defineAsyncComponent, defineComponent } from "vue"; |
|
|
|
|
|
|
|
var b=defineAsyncComponent(async()=>await import("@/views/demo.vue").then(v=>({...v.default,name:'ddd'}))) |
|
|
|
const routes = [ |
|
|
|
{ |
|
|
|
path: "/", |
|
|
@ -12,12 +11,12 @@ const routes = [ |
|
|
|
{ |
|
|
|
path: "/demo", |
|
|
|
name: "demo", |
|
|
|
component: b, |
|
|
|
component: ()=>import('@/views/demo.vue').then(e=>({...e.default,name:"demo"})), |
|
|
|
}, |
|
|
|
]; |
|
|
|
const router = createRouter({ |
|
|
|
history: createWebHashHistory(), |
|
|
|
routes, |
|
|
|
}); |
|
|
|
|
|
|
|
window.r=routes |
|
|
|
export default router; |