ifloce
ifloce
  • 发布:2020-02-15 16:06
  • 更新:2020-02-15 16:06
  • 阅读:776

【报Bug】uni中APP的plus.nativeUI.closeToast()没有用

分类:uni-app

ios中页面中使用 this.toast(信息)
this.closeToast() 无法关闭 toast 都是等待他自己关闭的

Vue.prototype.toast= function(msg,time=2000,icon = false){  
	// #ifdef APP-PLUS  
	plus.nativeUI.toast("<font style=\"font-size:14px;font-weight:bold\">"+msg+"</font>",  
		{type:'richtext',  
		verticalAlign:'center',  
		richTextStyle:{  
			align:'center'  
		}  
	});  
	// #endif  
	  
	// #ifndef APP-PLUS  
		uni.showToast({  
			title : msg,  
			icon: icon ? icon : 'none',  
			duration:time  
		})  
	//#endif  
}
Vue.prototype.closeToast= function(){  
	// #ifdef APP-PLUS  
	plus.nativeUI.closeToast();  
	// #endif  
}
2020-02-15 16:06 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复