沒有高度封裝,有人愿意封裝優化下的可以弄下
效果圖
1、wxml touch-item元素綁定了bindtouchstart、bindtouchmove事件
<view class="container"> <view class="touch-item {{item.isTouchMove ? 'touch-move-active' : ''}}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" wx:for="{{items}}" wx:key=""> <view class="content">{{item.content}}</view> <view class="del" catchtap="del" data-index="{{index}}">刪除</view> </view></view>
2、wxss flex布局、css3動畫
.touch-item { font-size: 14px; display: flex; justify-content: space-between; border-bottom:1px solid #ccc; width: 100%; overflow: hidden}.content { width: 100%;
新聞熱點
疑難解答