Skip to content

flymoth/vue-mtoast

Repository files navigation

vue-mtoast

Usage

Install:

npm i vue-mtoast --save

Import:

import MToast from 'vue-mtoast'
Vue.use(MToast)

Example:

<button @click="toast">点击</button>

toast() {
    this.$toast("hello") //基本用法
}

demo1

toast() {
    this.$toast("hello",{duration: 1000}) //自定义持续时间
}
toast() {
    this.$toast.success("hello",{duration: 1000}) //成功
}

demo2

toast() {
    this.$toast.error("hello",{duration: 1000}) //失败
}

demo3

About

a vue mobile toast plugin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published