摘要: 通过vue-cli2.x创建的项目实现跨域 1.找到config文件夹 2.在inde.js文件中找到proxytable{} 3.添加代码 proxyTable: { '/api': { target: 'http://xxxxxx.com', // 请求的接口的域名 // secure: fal 阅读全文
posted @ 2018-10-06 16:04 陈南北 阅读(3650) 评论(0) 推荐(1) 编辑
摘要: 路由独享写法: import VueRouter from 'vue-router' Vue.use(VueRoter) const router = new VueRouter({ routes:[ {path:component:,name:,beforeEnter:((to,next,from 阅读全文
posted @ 2018-10-06 11:10 陈南北 阅读(2030) 评论(0) 推荐(0) 编辑
摘要: 简单的路由全局守卫 阅读全文
posted @ 2018-10-06 10:41 陈南北 阅读(195) 评论(0) 推荐(0) 编辑