记录个人router-view输出无法渲染问题

const routes = [{
path: “/”,
redirect: “/index”
},
]
const router = new VueRouter({
routes,
mode: ‘history’,
//回到顶部
scrollBehavior: () => ({
y: 0
})
})
这里的必须是routes,而不是routers,如果是routers将无法显示路由中的内容

发布了17 篇原创文章 · 获赞 1 · 访问量 1703

猜你喜欢

转载自blog.csdn.net/weixin_43817724/article/details/96317207