2***@qq.com
2***@qq.com
  • 发布:2018-11-08 13:42
  • 更新:2020-04-08 10:05
  • 阅读:4377

uni.previewImage 设置current参数不起作用

分类:uni-app

current 参数不起作用,每次点开还是在默认的第一张图片,我是UNI-app,安卓
previewImg(e) {
var type = e.mp.target.dataset.type;
var current_temp = e.mp.target.dataset.src;
console.log(current_temp);
var tempFilePaths =""
if(type=='open'){
tempFilePaths = this.photoBigList;
}
if(type=='hide'){
tempFilePaths = this.photoBigHideList;
}
// 预览图片
uni.previewImage({
current: current_temp,
urls: tempFilePaths
});
}

2018-11-08 13:42 负责人:无 分享
已邀请:
扶摇侠客

扶摇侠客

同问,在H5上不行

5***@qq.com

5***@qq.com

目前还没解决吗 还有怎么获取 当前图片下标

c***@foxmail.com

c***@foxmail.com

索引需要转成数字

8***@qq.com

8***@qq.com - zhangyubao

current:parseInt(current_temp) String强转int就行了

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