0.0.7 • Published 6 years ago

@lanxuexing/vue2toast v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

vue2toastnpm version

Install

npm i @lanxuexing/vue2toast --save

Settings

NameDefaultTypeDescription
duration200NumberThe duration of the toast
callbacknullNumberThe callback of the toast

Usage

There are two different ways to manage a Toast.

Calling api
// import plugin
import Vue2Toast from '@lanxuexing/vue2toast';

// register plugin on vue
Vue.use(Vue2Toast)

// add a toast on screen
this.$toast.show("Hello, Toast");

// you can manually hide the toast, or it will automatically disappear after a `duration` ms timeout.
this.$toast.show("Hello, Toast", {
  duration: 500
});

// you can add callback functions after toast display is complete
this.$toast.show("Hello, Toast", function() {
    // do anything
});

Run example:

cd ./vue2toast
npm install
0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago