jqweui Toast

加载提示 

$.showLoading('加载中'); //显示

$.hideLoading(); //关闭

$.toast("操作成功"); 对勾

$.toast("取消操作", "cancel");
$.toast("禁止操作", "forbidden");
$.toast("纯文本", "text");
// 第二个参数可以是时间,单位毫秒
$.toast("消息", 20000);Toast 默认时间是 2000 毫秒,可以通过 $.toast.prototype.defaults.duration 来设置这个值。

回调函数

toast可以指定一个回调函数,当toast关闭的时候会调用此函数。

$.toast("取消操作", function() {
  console.log("cancel");
});
$.toast("禁止操作", "forbidden", function() {
  //do something
});


猜你喜欢

转载自blog.csdn.net/cail_520914/article/details/78674385