直播小程序源码,对话框左滑显示选项和删除按钮
直播小程序源码,对话框左滑显示选项和删除按钮
<view class="">
<view class="containerTitle">使用movable-view实现左滑</view>
<view class="list">
<view class="product-item" wx:for="{{productList}}" wx:for-index="index" wx:key="{{item.id}}" >
<movable-area>
<movable-view out-of-bounds="true" direction="horizontal" x="{{item.xmove}}"
inertia="true"
data-productIndex="{{index}}"
bindtouchstart="handleTouchStart"
bindtouchend="handleTouchEnd"
bindchange="handleMovableChange">
<view class="product-item-wrap">
<view class="product-movable-item">
<view class="product-movable-item-name">{{item.name}}</view>
<view class="product-movable-item-code">{{item.code}}</view>
</view>
<view class="product-movable-item product-movable-item-amount">
<text class="amount">{{item.amount}}</text>
<text class="unit">万</text>
</view>
</view>
</movable-view>
</movable-area>
<view class="delete-btn" data-id="{{item.id}}" bindtap="handleDeleteProduct">删除</view>
</view>
</view>
<view class="containerTitle">使用Touch事件实现左滑</view>
<view class="list">
<view class="product-item" wx:for="{{slideProductList}}" wx:for-index="index" wx:key="{{item.id}}">
<slide-delete pid="{{item.id}}" bindaction="handleSlideDelete" wx:key="{{item.id}}">
<view class="product-item-wrap">
<view class="product-movable-item">
<view class="product-movable-item-name">{{item.name}}</view>
<view class="product-movable-item-code">{{item.code}}</view>
</view>
<view class="product-movable-item product-movable-item-amount">
<text class="amount">{{item.amount}}</text>
<text class="unit">万</text>
</view>
</view>
</slide-delete>
</view>
</view>
</view>
以上就是直播小程序源码,对话框左滑显示选项和删除按钮, 更多内容欢迎关注之后的文章
浙公网安备 33010602011771号