mu2.toast

1.3.5 • Public • Published

mu2.toast

An easy use Toast for Vue.js.

mu2.toast

Installation

Prerequisites: Vue.js (>=2.x).

$ npm install mu2.toast

Usage

import Toast from 'mu2.toast'
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()

Readme

Keywords

none

Package Sidebar

Install

npm i mu2.toast

Weekly Downloads

1

Version

1.3.5

License

MIT

Last publish

Collaborators

  • mufeng