code is as follows. I want to load the route lazily, but I can carry out the prompt in the process of loading. Follow the prompt on the official website, but delay has no effect
route loading:
{
path: "/Me",
name: "Me",
//component: r => import("@/views/loading/loadable")
component: asyncComponent()
}
asyncComponent function:
import LoadingComponent from"@ / views/loading/index.vue"
import errorCom from"@ / views/loading/error"
export default (asyncComponent) = > {
const Com= function(){
let a = {
component: require("@/views/Me"),
loading: LoadingComponent,
error: errorCom,
delay: 2000
}
return a
}
return {
render: function (h) {
return h(Com, {})
}
}
}