设置camera组件的高度随客户端变化时无效
WXML: [代码]<[代码][代码]camera[代码] [代码]id[代码][代码]=[代码][代码]'myCamera'[代码] [代码]device-position[代码][代码]=[代码][代码]'{{cameraPosition}}'[代码] [代码]flash[代码][代码]=[代码][代码]'off'[代码] [代码]style[代码][代码]=[代码][代码]'width: 100%; height: {{windowHeight-60}}px;'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-view[代码] [代码]class[代码][代码]=[代码][代码]'controls'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-image[代码] [代码]class[代码][代码]=[代码][代码]'camera'[代码] [代码]src[代码][代码]=[代码][代码]'/res/img/camera.png'[代码] [代码]bindtap[代码][代码]=[代码][代码]'takePhoto'[代码][代码]/>[代码][代码] [代码][代码]<[代码][代码]cover-image[代码] [代码]class[代码][代码]=[代码][代码]'switchCamera'[代码] [代码]src[代码][代码]=[代码][代码]'/res/img/refresh.png'[代码] [代码]bindtap[代码][代码]=[代码][代码]'switchCamera'[代码][代码]/>[代码][代码] [代码][代码]</[代码][代码]cover-view[代码][代码]>[代码][代码]</[代码][代码]camera[代码][代码]>[代码]JS: [代码]await getSystemInfo().then(res => {[代码][代码] [代码][代码]// success[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]windowWidth: res.windowWidth,[代码][代码] [代码][代码]});[代码][代码]}).[代码][代码]catch[代码][代码](res => {[代码][代码] [代码][代码]console.log(res);[代码][代码]});[代码]在开发工具中是正常显示的高度,但在手机上不能正常显示,必须切换到其他页面或者在页面上操作某个事件,引起页面刷新才能正常显示。