wx.hideTabBar和wx.showTabBar导致movable-area非正常工作
发布于 7 年前 作者 fshao 5001 次浏览 来自 官方Issues

<movable-area class="moveAreaCharge">

<movable-view class="modeContainer" style="margin-top:20%;margin-left:80%;" hidden="{{!modalHidden}}" direction="all">

<view class="modeSwitch" bindtap="showChargeDialog">

<image class="itemStateImage " style="margin-top:10%" mode='widthFix' src="resources/kind/ic_float_charge.png"></image>

<view class="modeSwitchText">

充电

</view>

</view>

</movable-view>

</movable-area>

movable-view不点击时拖动没问题,点击后触发wx.hideTabBar显示TabBar栏隐藏并弹出对话框,对话框确定后触发wx.showTabBar显示TabBar栏,

显示TabBar栏后出现bug,movable-area范围不变动,但movable-view可拖动范围出现大量偏移,干脆和原先位置完全不一样,

单单使用的wx.hideTabBar或者wx.showTabBar无问题


2 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

已通过wx:if重建movable-area绕开bug


回到顶部