SwipeAction 绑定点击事件
-
SwipeAction 侧滑 绑定onClick事件 怎么区分点击的是哪一个 请大神指教
-
@jd_425bec8131baf 半年了还没人回。。。
-
<AtSwipeAction onClick={this.handleClick} options={[ { id: item.id, text: '删除', style: { backgroundColor: '#FF4949' } } ]}>
handleClick(this, index) { console.log('this', this) console.log('index', index) //可以取到options的内容 const { text } = index if (text === '删除') { Taro.showLoading({ title: '删除中', mask: true, }) } }
// 找到这里 export interface SwipeActionOption { /** * id标记,可以自己添加 */ id: string