Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.11 KB

README.md

File metadata and controls

47 lines (33 loc) · 1.11 KB

wxapp-leftSwiper

微信小程序---左滑显示按钮组件

参数

btnWidth

  • 含义: 左滑显示出的按钮的总宽度 单位(rpx)

  • 类型: Number

  • 默认: 180

itemHeight

  • 含义: 列表项的高度

  • 类型: Number

  • 默认: 100

用法

#index.json
"usingComponents": {
  "left-swiper": "../components/leftSwiper/index"
}

# index.wxml
<view wx:for="{{list}}"  wx:key="{{index}}"  class="item">
  <left-swiper list="{{list}}" btnWidth="{{360}}" itemHeight="{{120}}">
    <view slot="left-swiper-content" class="txt">
      <image class="item-icon" mode="widthFix" src="{{item.icon}}"></image>{{item.txt}}
    </view>
    <view slot="left-swiper-btn">
      <view data-index="{{index}}" bindtap="delItem" class="inner del">删除</view>
      <view data-index="{{index}}" bindtap="delItem" class="inner fav">收藏</view>
    </view>
  </left-swiper>
</view>

#效果图 mahua

forked from demi520/wxapp-leftSwiperDel https://github.com/demi520/wxapp-leftSwiperDel