前言
因为公司业务开发需要拖拽功能。
ps:该功能只能针对高度一致的,如果高度不一致需要另外二开
演示

开始
<template>
<view style="height: 100%;">
<movable-area :style="{'width': '100%', 'height': allHeight + 'px'}">
<movable-view
v-for="(item, index) in list"
:key="item.id"
:x="0"
:y="item.y"
:style="{'height': itemHeight + 'px', 'width': '100%',}"
direction="all"
@touchstart="handleDragStart(index)"
@change="handleMoving(index, $event)"
@touchend="handleDragEnd"
class="movable-view"
>
<!-- 这里可以放置步骤的详细内容 -->
<view style="background-color: aqua; padding: 20rpx 0;">{
{ item.desc }}</view>
</movable-view>
</movable-area>
</view>
</template>
<scrip

最低0.47元/天 解锁文章
676

被折叠的 条评论
为什么被折叠?



