vue-ttoast
v0.1.2
Published
vue-toast
Downloads
5
Readme
vue-ttoast
Toast Component for Vue
Demo
https://lishengzxc.github.io/toast/
Install
npm install vue-ttoast --save
Usage
html
<body>
<button v-on:click="clickHandler">toast</button>
<script src="http://cdn.bootcss.com/vue/1.0.24/vue.min.js"></script>
<script src="dist/dist.js"></script>
</body>
js
import Vue from 'vue'
import VueToast from './main'
Vue.use(VueToast)
new Vue({
el: 'body',
methods: {
clickHandler() {
this.$toast('hello')
}
}
})
API
Basic
Toast('hello world~')
Duration
Toast({
message: 'hello world~',
duration: 5000
});
LICENSE
MIT