vue2-insta-signup
v0.1.40
Published
Vue2InstaSignup: Http component with Progress bar
Downloads
26
Maintainers
Readme
Vue2InstaSignup
Vue Component for Vue 2.x
Install
npm install vue2-insta-signup --save
Demo
For demo, please see here
Usage
1. Import the component
import Vue2InstaSignup from 'vue2-insta-signup';
2.1 Use it globally
Vue.use(Vue2InstaSignup);
// OR with options
Vue.use(Vue2InstaSignup, {baseURL: 'https://jsonplaceholder.typicode.com/', headers: {'X-API-KEY': 1234}});
*3. Access it locally
<template>
<vue2-insta-signup ref="http" v-model="data" :error-fn="onError"></vue2-insta-signup>
</template>
components: {
'vue2-insta-signup': Vue2InstaSignup
},
Properties
Example
<template>
<div id="app" style="text-align: center">
<div>
<vue2-insta-signup v-model="data"></vue2-insta-signup>
<pre>{{data}}</pre>
<button class="btn btn-primary btn-sm" type="button" @click="test">Test</button>
</div>
</div>
</template>
<script>
import Vue from 'vue';
import Vue2InstaSignup from '../src/index'
Vue.use(Vue2InstaSignup, {});
export default {
name: 'app',
data() {
return {
data: {},
}
},
methods: {
test() {
// code
}
},
}
</script>
Contributing
Contributions are welcome
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build