Skip to content

Vue cli plugin to use axios with configs separated to modules

License

Notifications You must be signed in to change notification settings

sumerliu/vue-cli-plugin-easy-axios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-cli-plugin-easy-axios

MIT License LinkedIn


vue-cli-plugin-easy-axios

A easeily to add a contours to page by d3


Report Bug · Request Feature

Table of Contents

About The Project

基于easier-axios封装的Vuecli插件
version: 0.0.11
lastDate: 2020/3/12
Author: Sumer Liu

Built With

Features

  1. 以axios作为基础库,easier-axios作为api管理工具对axios请求做模块化管理。
  2. 已实现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 - 843627979@qq.com

Project Link: https://github.com/sumerliu/vue-cli-plugin-easy-axios

About

Vue cli plugin to use axios with configs separated to modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published