
router
螺纹钢铁侠
这个作者很懒,什么都没留下…
展开
-
vue router 路由匹配正确,但是不渲染组件
const router = new VueRouter({ mode: 'history', routers: [ { path: '/', component: FantasyLine, }, { path: '/chinaworld', ...原创 2019-09-20 15:41:33 · 1320 阅读 · 1 评论 -
vue项目部署到Nginx,非index页面刷新,404
vue项目编译以后,只有一个index.html的入口文件,其他地址都是靠router导航过去的,比如www/XXXX.com/对应index.html文件,如果进入其它页面,比如www/XXXX.com/13,则需要router导航渲染一个新页面,那么问题来了,如果直接刷新www/XXXX.com/13,Nginx服务器会在location里面匹配这个页面,匹配不到返回404...原创 2019-09-26 23:02:45 · 6596 阅读 · 0 评论