0.0.6 • Published 5 years ago

wx-sideslip v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

wx-sideslip

类似 QQ 通讯录侧滑

slide-tabs

加入项目

  • npm 下载
npm i -S wx-sideslip

使用

{
  "usingComponents": {
    "slide-slip": "wx-sideslip"
  }
}
  • 手动下载组件到项目 components 目录 使用
{
  "usingComponents": {
    "side-slip": "/components/wx-sideslip/index"
  }
}

使用

wxml

<side-slip height="120" show="{{true}}">
  <view slot="left" class="sideslip-content">
    哈哈
  </view>
  <view slot="right" class="sideslip-right">
    <view class='sideslip-gray'>求助</view>
    <view class='sideslip-red'>删除</view>
  </view>
</side-slip>

wxss

.sideslip-right {
  height: 120rpx;
  width: 340rpx;
  display: flex;
}
.sideslip-right view {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  height: 100%;
}

.sideslip-content {
  background-color: #fff;
}

.sideslip-gray {
  background-color: #ccc;
}

.sideslip-red {
  background-color: red;
  color: #fff;
}

参数

选项名类型是否必填默认值描述
heightNumber组件显示区域的高度(rpx)
widthNumber视图宽度组件显示区域的宽度(rpx)
slideWidthNumberslot='right'插槽宽度滑动显示区域的宽度(rpx)
outBooleantrue是否允许惯性越界
showBooleanfalse初始状态是否侧滑
distanceNumber10滑动生效间距值

其他小程序插件

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago