We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微信小程序
小程序基础库: 2.11.3 使用框架: React
<RngLoginButton> <View className={styles.rightView} onClick={e => { e.stopPropagation() // 通过加入定时器解决了,但是有没有更好的办法呢 setTimeout(() => { if (data.isLike === 1) { onUnLike(data) // 这里会导致组件重新render } else { onLike(data) // 这里会导致组件重新render } }, 100) }} > {/* 爱心图标 */} {data.isLike === 1 ? ( <View className={styles.imgBox}> <View className={styles.rightText1}>{data.likes}</View> <RngIcon name='yidianzan' iconSize='36' /> </View> ) : ( <View className={styles.imgBox}> <View className={styles.rightText2}>{data.likes}</View> <RngIcon name='weidianzan' iconSize='36' /> </View> )} </View> </RngLoginButton>
阻止事件冒泡
android上没有阻止,华为p20
👽 Taro v3.0.8 Taro CLI 3.0.8 environment info: System: OS: macOS 10.14.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 10.21.0 - ~/.nvm/versions/node/v10.21.0/bin/node Yarn: 1.22.4 - ~/.nvm/versions/node/v10.21.0/bin/yarn npm: 6.14.4 - ~/.nvm/versions/node/v10.21.0/bin/npm npmPackages: @tarojs/cli: 3.0.8 => 3.0.8 @tarojs/components: 3.0.8 => 3.0.8 @tarojs/mini-runner: 3.0.8 => 3.0.8 @tarojs/react: 3.0.8 => 3.0.8 @tarojs/runtime: 3.0.8 => 3.0.8 @tarojs/taro: 3.0.8 => 3.0.8 @tarojs/webpack-runner: 3.0.8 => 3.0.8 babel-preset-taro: 3.0.8 => 3.0.8 eslint-config-taro: 3.0.8 => 3.0.8 react: ^16.10.0 => 16.13.1 taro-ui: ^3.0.0-alpha.3 => 3.0.0-alpha.3
The text was updated successfully, but these errors were encountered:
@allendongyx 提供一下完整可运行的 demo
Sorry, something went wrong.
@Chen-jj 目前就用setTimeout解决了,暂时先不管啦~
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.11.3
使用框架: React
复现步骤
期望结果
阻止事件冒泡
实际结果
android上没有阻止,华为p20
环境信息
The text was updated successfully, but these errors were encountered: