showActionSheet调用会出现两个一样的弹框
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 回复