0.0.7 • Published 5 years ago

@lanxuexing/vue2toast v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
5 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

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago