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
微信小程序
https://github.com/without-yy/taro_onClick_issue/blob/master/src/pages/test/index.js 小程序基础库: 2.14.4 使用框架: React
import React, { useState } from 'react'; import { View } from '@tarojs/components'; export default function Test() { const [visible, setVisible] = useState(false); const onClick = () => { console.log('test'); }; return ( <View> <View onClick={() => setVisible(true)}>点击一下展示丢失onClick事件的view</View> { visible ? <View onClick={onClick}>我的点击事件丢失了</View> : <View>我没有点击事件</View> } </View> ); }
渲染出来没有任何事件
可以触发onClick事件
无法触发
👽 Taro v3.0.23 Taro CLI 3.0.23 environment info: System: OS: macOS 11.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.4 - /usr/local/opt/node@14/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.10 - /usr/local/opt/node@14/bin/npm npmPackages: @tarojs/cli: 3.0.23 => 3.0.23 @tarojs/components: 3.0.23 => 3.0.23 @tarojs/mini-runner: 3.0.23 => 3.0.23 @tarojs/react: 3.0.23 => 3.0.23 @tarojs/runtime: 3.0.23 => 3.0.23 @tarojs/taro: 3.0.23 => 3.0.23 @tarojs/webpack-runner: 3.0.23 => 3.0.23 babel-preset-taro: 3.0.23 => 3.0.23 eslint-config-taro: 3.0.23 => 3.0.23 react: ^16.10.0 => 16.14.0 taro-ui: ^3.0.0-alpha.3 => 3.0.0-alpha.9
The text was updated successfully, but these errors were encountered:
fix(runtime): 修复组件切换属性和事件时出现的问题, fix #8520
bc94aed
3a54d90
Chen-jj
Successfully merging a pull request may close this issue.
相关平台
微信小程序
复现仓库
https://github.com/without-yy/taro_onClick_issue/blob/master/src/pages/test/index.js
小程序基础库: 2.14.4
使用框架: React
复现步骤
渲染出来没有任何事件
期望结果
可以触发onClick事件
实际结果
无法触发
环境信息
The text was updated successfully, but these errors were encountered: