0.1.2 • Published 4 years ago

lsl-request v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

使用方式

import Vue from 'vue'
import LLAxios from 'LLAxios'

Vue.use(LLAxios)

//全局使用
LLAxios.setDefaultValue('baseURL', 'http://localhost:8080/') // 设置公共参数

LLAxios.setDefaultValues({
  'baseURL': 'http://localhost:8080/'
})

LLAxios.setRequestInterceptor((config) => {
    return config;
}) // 设置拦截器

// 基于Vue的全局使用
Vue.LLAxios.post('/queryList', {id: '123'}, {timeout: 5000}).then('回调')

//基于单个Vue实例使用
this.$LLAxios.post('/queryList', {id: '123'}, {timeout: 5000}).then('回调')
0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago