1.1.1 • Published 6 years ago

easy-toast v1.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

easy-toast

vue simple toast component

install

npm i easy-toast

use

import Vue from 'vue'  
import Toast from 'easy-toast';  
Vue.use(Toast, {duration: 1500 // 消失间隔,可以不传,默认1.5s});  

option

Object

type

图标类型Sting: success,fail, warning,默认不显示

title

标题String: 默认:""

message

内容String: 默认:""

或者直接传String类,直接显示内容

methods

手动关闭的方法:

this.$toast.hide();

example

this.$toast({
  type: "warning",
  title: "警告",
  message: "这是警告信息"
});
this.$toast({
  type: "success",
  title: "成功",
  message: "这是条信息"
});
this.$toast({
  type: "fail",
  title: "失败",
  message: "这是条信息"
});
this.$toast("这是条信息");

warning success fail info

1.1.1

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago