custom_toast_web

0.0.1 • Public • Published

参数及用法

参数:

接收2个props

1、text:toast展示所需文本

2、icon:toast展示所需icon

额外参数:接收duration参数:toast展示时长

用法:

import Vue from "vue"; import ShowToast from "common/toast/toast.js"; Vue.prototype.$Toast = ShowToast;

1、任意地方可直接调用,传入对应参数即可,如:

this.$Toast({ text: "未完成提示", icon: "error", duration: 1500 });

2、默认不传icon,icon值为props的default,如:

this.$Toast({ text: "成功提示", duration: 1500 });

Package Sidebar

Install

npm i custom_toast_web

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

83.8 kB

Total Files

3

Last publish

Collaborators

  • liu_