npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nuke-biz-list-swipe-item

v0.0.3

Published

listView子组件用于实现左右滑动

Readme

nuke-biz-list-swipe-item

  • category: BizComponent
  • chinese: listView子组件用于实现左右滑动
  • type: 基本

注意

  • 在该组件中添加id等同于为cell添加key,可以优化列表的重绘效率,同时滑块的自动隐藏也依赖于id

  • 仅在weex环境下有效,H5将降级禁止滑动。

  • 手势组件在android低端机型下会存在卡顿,建议在android机采用长按触发实现交互。

  • 为防止左滑返回工作台,千牛端需使用sdk禁止返回,详情见示例demo。

API

参数 | 说明 | 类型 | 默认值 -----|-----|-----|----- onPress | 点击触发事件 |func | () | longPress | 长按触发事件,ios无法再长按状态下进行滑动,仅在disabledSwipe状态下可触发长按事件 | func | () | style | list item点击区域外观 | object | {} | itemStyle | list item滑块外观 | object | {} | rightBtn | 右侧滑动出现的列表 | array | [] | leftBtn | 左侧滑动出现的列表 | array | [] | indent | 滑动回弹距离 | number | 100 | id | 当前item的唯一标识,建议指定 | string | | expand | 滑块展开的回调 | function | (e) | threshold |自动收回的阈值 | number | 0.5 | disabledSwipe | 禁用左右滑动 | bool | false | deleteAnimation | 移除item的动画效果[todo] | string | default、none | insertAnimation(string) | 插入item的动画效果[todo] | string | default、none |

  • rightBtn | leftBtn 的内容需满足
let rightBtn = [{
    id: '按钮1的唯一标识',
	text: '按钮1内的文字内容',
	style:{
        height:80,  // 不设置height,则自适应按钮高度
        backgroundColor:'#ffffff'
    },
    textStyle:{
        color:'black'
    }
    onPress: (e,item)=>{console.log('delete1!');},
}, {
    id: '按钮2的唯一标识',
	text: '按钮2内的文字内容',
	style:{
        height:80,
        backgroundColor:'#ffffff'
    },
    textStyle:{
        color:'black'
    }
    onPress: ()=>{console.log('delete1!');},
}]

使用细节请参考:docs/basic.md || docs/advance.md

注意

本组件依赖于aliweex最新expressBinding新特性,低于5.8.7的IOS千牛手淘iOS 6.4.0``天猫 iOS 5.30.1 手淘 Android 6.3.0`` 天猫 Android 5.28.1无法拖拽,只能通过disable拖拽改为长按降级。较低端的android手机同时会存在拖拽效果不理想的情况,建议通过平台判断进行降级处理。