camera组件返回图片宽高由什么决定?
发布于 5 年前 作者 schen 4791 次浏览 来自 问答

<camera style=“height: 200px; width: 100%;”></camera>

<button bindtap=“takePhoto”>拍照</button>

takePhoto () {

let _this = this;

wx.createCameraContext().takePhoto({

success: function (res) {

console.log(res);

_this.setData({ tempPath: res.tempImagePath });

}

});

},

返回的res中height为116,width为720,height由什么决定?

3 回复

问题已修复,麻烦更新微信到6.5.21

一般由预览区域决定,请问是什么机型?

苹果机型图片的高度都只有一半,只有预览区域的一半!请问这是什么原因

回到顶部