vue-axios-client

0.2.2 • Public • Published

vue-axios-client

Installation

npm install vue-axios-client
# or
yarn add vue-axios-client

Usage

Install the plugin to use it

import Vue from 'vue'
import axios from 'axios'
import VueAxiosClient, { AxiosRequest } from 'vue-axios-client'

const vueAxiosClient = new VueAxiosClient({ axios })

Vue.use(vueAxiosClient)
Vue.component('AxiosRequest', AxiosRequest)

API Reference

AxiosRequest component

Props

Name Description Type
axios Axios instance Function See details
config Axios request config Object See details
lazy Lazy request. If true use request in scoped slot. Defaults to false Boolean
pendingDelay Delay in ms to wait before displaying the isLoading in default slot. Defaults to 200 Number, String
tag String HTML tag name (default: div); if falsy (for example null or undefined), String
the component will be renderless (the content won't be wrapped in a tag),
in this case, only the first child will be rendered
transformData Function to transform the result data, useful for picking a specific part of the response. Function
Example: :transformData="data => data.user.messages"

Scoped slot

...

Events

...

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i vue-axios-client

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

81 kB

Total Files

9

Last publish

Collaborators

  • mastone