03 2020 档案

摘要:在Vue项目中国,我们一般会设置一个路由导航守卫,为防止用户未登录直接从地址栏输入地址访问网站其他页面。其中路由导航守卫使用Vue-router提供的方法来实现。 https://router.vuejs.org/zh/guide/advanced/navigation-guards.html 1. 阅读全文
posted @ 2020-03-18 13:42 littleRabbit83 阅读(908) 评论(0) 推荐(0)
摘要:配置axios具体步骤: 1.首先在项目所在根文件打开终端,输入以下代码下载axios需求文件 npm install axios 2.在项目main.js中引入axios,代码如下 import axios from axios 3.配置默认请求地址、请求头 axios.defaults.base 阅读全文
posted @ 2020-03-18 11:54 littleRabbit83 阅读(548) 评论(0) 推荐(1)