mu2.toaster
v1.0.2
Published
An easy use Toast
Downloads
2
Readme
mu2.toaster
An easy use Toast.
Installation
Prerequisites: Vue.js (>=2.x).
$ npm install mu2.toaster
Usage
import Toast from 'mu2.toaster'
Vue.use(Toast)
// Use in a vue file
this.$toast({
type: 'loading',
text: 'Loading',
duration: 0
})
// Loading
this.$toast.loading('Loading')
// Or
this.$toast.loading({
text: 'Loading'
})
// Success
this.$toast.success('Success')
// Or
this.$toast.success({
text: 'Success',
duration: 5000
})
// Error
this.$toast.error('Error')
// Or
this.$toast.error({
text: 'Error',
duration: 5000
})
// Warning
this.$toast.warning('Warning')
// Or
this.$toast.warning({
text: 'Warning',
duration: 5000
})
// Toast
this.$toast.toast('Toast')
// Or
this.$toast.toast({
text: 'Toast',
duration: 5000
})
// Dismiss
this.$toast.dismiss()