taro-ui icon indicating copy to clipboard operation
taro-ui copied to clipboard

tabs点击事件触发两次

Open shaodushu opened this issue 7 years ago • 1 comments

问题描述

点击tabs组件,onClick事件触发两次

代码: image

小程序效果: image

复现步骤 如上

期望行为 点击tabs组件,onClick事件触发一次

报错信息 无

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

👽 Taro v1.2.4

Taro CLI 1.2.4 environment info: System: OS: Windows 10 Binaries: Node: 11.4.0 - D:\nodejs\node.EXE npm: 6.4.1 - D:\nodejs\npm.CMD

` taro-ui image

shaodushu avatar Jan 08 '19 02:01 shaodushu

自己去改源码。componentWillReceiveProps(nextProps) { if (nextProps.scroll !== this.props.scroll) { this.getTabHeaderRef(); } /* if (nextProps.current !== this.state.current) { this.handleClick(nextProps.current); } */ } 注释掉就好了

Michaels-bot avatar Jan 14 '19 03:01 Michaels-bot