cordova本地浮动框提示插件使用:cordova-plugin-x-toast

1. 添加插件:cordova plugin add cordova-plugin-x-toast

2. 调用方法(浮动提示插件,弹出本地浮动提示框):

$cordovaToast.show(message, duration, position).then(
function(success) { if (typeof callback === 'function') { callback(); } },
function (error) { // error }
);     
/** * 显示原生的toast * message 要显示的消息 * duration 显示时长 long short(2s左右) * position 显示位置 'top', 'center', 'bottom' * callback 显示成功的回调函数 */

 

posted @ 2017-10-09 10:39  三石!  阅读(2344)  评论(0编辑  收藏  举报