showActionSheet调用会出现两个一样的弹框
发布于 7 年前 作者 guiying68 9178 次浏览 来自 问答
      let that = this;
      wx.showActionSheet({
        itemList: [that.t('pictureMaterial'), that.t('videMaterial'), that.t('recordMaterial'), that.t('PdfMaterial')],
        success(res) {
          switch (res.tapIndex) {
            case :
              if (that.data.limitType.indexOf('image') != -) {
                ui.toast(that.t('noSupport'))
                break;
              }
              that._imageAdd(); // 添加图片
              break;
            case :
              if (that.data.limitType.indexOf('video') != -) {
                ui.toast(that.t('noSupport'))
                break;
              }
              that._videoAdd(); // 添加视频
              break;
            case :
              if (that.data.limitType.indexOf('vioce') != -) {
                ui.toast(that.t('noSupport'))
                break;
              }
              that._audioAdd() // 添加音频
              break;
            case :
              if (that.data.limitType.indexOf('pdf') != -) {
                ui.toast(that.t('noSupport'))
                break;
              }
              that._filesAdd() // 添加文件(目前PDF)
              break;
            default:
              break;
          }
        },
        fail(res) {
          console.log(res.errMsg);
        }
      });
3 回复

你好,使用提供的代码片段未复现问题,请提供下问题表现截图,用出现问题的手机扫下面的小程序码并提供扫码结果截图

https://developers.weixin.qq.com/s/kTXXDams76eD

简单的一个wx.showActionSheet的调用,bug是偶发性

回到顶部