vue2-tts
v0.0.4
Published
Vue2Tts: Http component with Progress bar
Downloads
5
Maintainers
Readme
Vue2Tts
Vue Component for Vue 2.x
Install
npm install vue2-tts --save
Demo
For demo, please see here
Usage
1. Import the component
import Vue2Tts from 'vue2-tts';
2.1 Use it globally
Vue.use(Vue2Tts);
// OR with options
Vue.use(Vue2Tts, {baseURL: 'https://jsonplaceholder.typicode.com/', headers: {'X-API-KEY': 1234}});
*3. Access it locally
<template>
<vue2-tts ref="http" v-model="data" :error-fn="onError"></vue2-tts>
</template>
components: {
'vue2-tts': Vue2Tts
},
Properties
- value: any
Example
<template>
<div id="app" style="text-align: center">
<div>
<vue2-tts v-model="data"></vue2-tts>
<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 Vue2Tts from '../src/index'
Vue.use(Vue2Tts, {});
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