微信小程序, movable-view 组件设置了 :out-of-bounds="true" 无效
<movable-area class="movearea">
<movable-view
class="red-box"
direction="all"
out-of-bounds="{{true}}"
animation="{{false}}"
scale="{{true}}"
>
</movable-view>
</movable-area>
<movable-area class="movearea">
<movable-view
direction="all"
out-of-bounds="{{true}}"
animation="{{false}}"
scale="{{true}}"
>
<text class="green-box">移动</text>
</movable-view>
</movable-area>
.movearea {
margin: 20px 0px 20px 50px;
width: 600rpx;
height: 600rpx;
background-color: pink;
}
.red-box {
display: inline-block;
width: 200rpx;
height: 100rpx;
background-color: red;
}
.green-box {
display: inline-block;
width: 200rpx;
height: 100rpx;
background-color: green;
}
如代码中所示,有绿色、红色2个 movable-view 组件,都设置了 out-of-bounds="{{true}}",但移动时: 1、红色的只能在 movable-area 的大小区域内移动,无法移动到以外的地方; 2、绿色的只能在 movable-area 的大小区域内 右以外 下以外移动,而无法移动到左以外、上以外的区域; 麻烦帮忙看看这是啥原因,按照文档设置了 out-of-bounds="{{true}}",movable-view 组件可以移动到 movable-area 以外的区域,而红色盒子完全无法移动到盒子以外,绿色盒子只有部分可以。