showToast 、showloading中的mask设置无效

在小程序的消息提示框中mask的设置无效。

属性 类型 默认值 必填 说明
title string 提示的内容
icon string ‘success’ 图标
image string 自定义图标的本地路径,image 的优先级高于 icon
duration number 1500 提示的延迟时间
mask boolean false 是否显示透明蒙层,防止触摸穿透
success function 接口调用成功的回调函数
fail function 接口调用失败的回调函数
complete function 接口调用结束的回调函数(调用成功、失败都会执行)

在showToast 和showloading中设置mask是无效的:

//showToast
	 wx.showToast({
       title: '提交成功!',
       icon:"success",
       duration:2000,
       mask:true
     })
//showLoading
    wx.showLoading({
      title: '加载中',
      mask:true
    }),
    setTimeout(function(){
      wx.hideLoading();
    },2000)
  }

\color{red}{注意:} wx.showLoading 和 wx.showToast 同时只能显示一个。

猜你喜欢

转载自blog.csdn.net/weixin_43363871/article/details/91859481