html52.com
我爱小程序-开发者交流社区

camera组件返回图片宽高由什么决定?

问题模块
API和组件

<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由什么决定?


网友回复

黄思程:

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

韩:

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

黄思程:

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

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付