如代码中所示,有绿色、红色2个 movable-view 组件,都设置了 :out-of-bounds="true",但移动时:
1、绿色的只能在 movable-area 的大小区域内移动,无法移动到以外的地方;
2、红色的只能在 movable-area 的大小区域内 右以外 下以外移动,而无法移动到左以外、上以外的区域;
麻烦帮忙看看这是啥原因,按照文档设置了 :out-of-bounds="true",movable-view 组件可以移动到 movable-area 以外的区域
<movable-area style="margin: 100px 0px 0px 50px; width: 300px; height: 300px; background: #ddd;" :scale-area="false">
<movable-view
style="width: 50px; height: 50px; background: green;"
direction="all"
:inertia="false"
:animation="false"
:scale="true"
:out-of-bounds="true"
:scale-min="0.5"
:scale-max="3"
@change="onChangeMovable"
>
</movable-view>
</movable-area>
<movable-area style="margin: 100px 0px 0px 50px; width: 300px; height: 300px; background: #ddd;" :scale-area="false">
<movable-view
direction="all"
:inertia="false"
:animation="false"
:scale="true"
:out-of-bounds="true"
:scale-min="0.5"
:scale-max="3"
@change="onChangeMovable"
>
<view style="width: 50px; height: 50px; background: #f00;"></view>
</movable-view>
</movable-area>
0 个评论
要回复文章请先登录或注册