Skip to content

huleiEthan/wxapp-leftSwiper

 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%