we-axios
v1.0.3
Published
What does this package do? 1. use this axios replace package axios in project 2. set default header on axios 3. error handling 4. create instance on Vue
Downloads
6
Readme
Package wa-auth
What does this package do?
- use this axios replace package axios in project
- set default header on axios
- error handling
- create instance on Vue
##install
npm install we-axios
##Usage
use in main:
import Axios from 'we-axios'
Vue.use(Axios, options);
defult Options:
const options = {
base_uri: '/api',
headers: {
module: false,
},
};
###use Axios in File
import {axios} from 'we-axios'
###use Axios in Component
$axios
###use instance in other plugins
Vue._instance