vue-cli-plugin-easy-axios
v0.0.12
Published
Vue cli 3 plugin to use axios and esaier axios
Downloads
406
Maintainers
Readme
vue-cli-plugin-easy-axios
Table of Contents
About The Project
基于easier-axios封装的Vuecli插件 version: 0.0.11 lastDate: 2020/3/12 Author: Sumer Liu
Built With
Features
- 以axios作为基础库,easier-axios作为api管理工具对axios请求做模块化管理。
- 已实现axiso配置,拦截器等模板
Installatiom
vue add easy-axios
Usage
在vue项目中的plugin中找到easier-axios.js在其中填写相应配置。
const api = new EasierAxios(
axios,
// config that same as axios
{
// baseURL: process.env.baseURL || process.env.apiUrl || ""
// timeout: 60 * 1000, // Timeout
// withCredentials: true, // Check cross-site Access-Control
},
{
dynamicRouterPattern: `:${CONSTANT.DYNAMICROUTER_PATTERN_FLAG}` // 插件的动态路由url参数默认以:开头
}
);
关于easier-axios中模块注册以及全局注册API移步到easier-axios。
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Sumer Liu - [email protected]
Project Link: https://github.com/sumerliu/vue-cli-plugin-easy-axios