camera组件高度在真机上不能够onShow动态改变(本人小米max2)
wxml
<camera device-position="back" flash="off" binderror="error" id="camera" style="height:{{camera_height}}px"></camera> |
.js
onShow:function(){ var view_height = wx.getSystemInfoSync().windowHeight this.setData({camera_height: view_height})} |
结果:
