结论:movable-view组件默设置为绝对定位,且top和left属性值为0px,所以如果没有对其进行相应设置的话,movable-view的初始位置位于movable-area的左上角
未设置的情况在左上角:
<movable-area scale-area style="width: 50vw; height: 50vh;background-color: red;margin: 10vh;">
<movable-view direction="all" scale animation="{{true}}"
style="width: 20vw;height: 20vh; background-color: blanchedalmond;">
<text style="font-size: 25rpx;position: absolute; bottom: 40rpx;">movable-view的模块</text>
<view class="" style="width: 10vw;height: 10vh;background-color: rebeccapurple;">实际显现内容</view>
</movable-view>
<text style="font-size: 40rpx;position: absolute; bottom: 200rpx;">movable-area的模块</text>
</movable-area>
进行对位置改动:
style="width: 20vw;height: 20vh; background-color: blanchedalmond; top: 20%;left: 50%;"