阅读背景:

【微信小程序】显示自带的弹窗,包括加载中,成功,错误,提示,警告

来源:互联网 

在微信小程序中,可以使用以下方法来显示自带的弹窗:

显示加载中的弹窗: wx.showLoading({ title: '加载中', mask: true }); 显示成功的弹窗: wx.showToast({ title: '成功', icon: 'success', duration: 2000 }); 显示错误的弹窗: wx.showToast({ title: '错误', icon: 'none', duration: 2000 }); 显示提示的弹窗: wx.showToast({ title: '提示', icon: 'none', duration: 2000 }); 显示警告的弹窗: wx.showToast({ title: '警告', image: '/path/to/warning.png', duration: 2000 }); 显示加载中的弹窗: wx.showLoading



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: