<cover-view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></cover-view> 这样不行吧?官方不是说cover-view不能用wx:if进行显示与隐藏的吧
cover-view我写了一个弹窗代码是这样的 <!-- 物品类别弹窗 --> <cover-view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></cover-view> <cover-view animation="{{animationData}}" class="commodity_attr_box" wx:if="{{showModalStatus}}"> <cover-view class='cancel' bindtap='hideModal'>取消</cover-view> <cover-view class='title'>请选择物品品类</cover-view> <cover-view class='sure'>确定</cover-view> <cover-view class='glist'> <cover-view class='list-item item-chose'>食品饮料</cover-view> <cover-view class='list-item'>鲜花</cover-view> <cover-view class='list-item' style='margin-right:0;'>蛋糕</cover-view> <cover-view class='list-item'>其他</cover-view> </cover-view> </cover-view> js里面是这么写的 // 物品类别弹窗 showModal: function () { // 显示遮罩层 var animation = wx.createAnimation({ duration: 200, timingFunction: "linear", delay: 0 }) this.animation = animation animation.translateY(300).step() this.setData({ animationData: animation.export(), showModalStatus: true }) setTimeout(function () { animation.translateY(0).step() this.setData({ animationData: animation.export() }) }.bind(this), 200) }, hideModal: function () { // 隐藏遮罩层 var animation = wx.createAnimation({ duration: 200, timingFunction: "linear", delay: 0 }) this.animation = animation animation.translateY(300).step() this.setData({ animationData: animation.export(), }) setTimeout(function () { animation.translateY(0).step() this.setData({ animationData: animation.export(), showModalStatus: false }) }.bind(this), 200) }, 在编辑器上和ios手机上弹出是正常的但是在安卓手机上页面不上滑的时候弹出框正常在底部页面上滑之后弹窗也跟着靠上面了 [图片] [图片]
2019-09-04手机:ippone 6sp 系统:iOS 11 微信版本:7.0.5 运行库2.8.1
IOS iPhone6sp 屏幕突然变很宽,布局乱掉,退出重启又好了。什么原因?[图片] [图片] 整个调试界面是可以滑动的,非常的宽。退出重进这个页面又都好了。
2019-08-30