Skip to content
New issue

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

map嵌套后组件响应事件获取数据有误 #3695

Closed
derekeeeeely opened this issue Jul 5, 2019 · 6 comments
Closed

map嵌套后组件响应事件获取数据有误 #3695

derekeeeeely opened this issue Jul 5, 2019 · 6 comments
Labels
question Further information is requested

Comments

@derekeeeeely
Copy link

derekeeeeely commented Jul 5, 2019

问题描述
map嵌套后组件响应事件获取数据有误

复现步骤

  1. 点击4-7 正常打印
  2. 点击1-3 打印出[4,5,6,7] 4xxxx
  3. event打印出来发现e.target.dataset是一样一样的
        {
          [[1,2,3],[4,5,6,7]].map(item => <View key={item.join(',')}>
            {item.map(_item => (
              <View
                key={_item}
                onClick={() => {console.log(item, _item)}}
              >
                {_item}
              </View>
            ))}
          </View>)
        }

期望行为
期望嵌套时正确输出

报错信息

系统信息
Taro CLI 1.3.2 environment info:
System:
OS: macOS 10.14
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node
Yarn: 1.15.2 - ~/.nvm/versions/node/v10.15.1/bin/yarn
npm: 6.8.0 - ~/.nvm/versions/node/v10.15.1/bin/npm

补充信息

@taro-bot
Copy link

taro-bot bot commented Jul 5, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@vanstoo
Copy link

vanstoo commented Jul 6, 2019

遇到一样的问题,希望尽快修复。。

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 8, 2019

#3665

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 8, 2019

先用回 1.3.4

@Chen-jj Chen-jj added answered question Further information is requested labels Jul 8, 2019
@taro-bot taro-bot bot added the to be closed label Jul 8, 2019
@taro-bot
Copy link

taro-bot bot commented Jul 8, 2019

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@taro-bot taro-bot bot removed the to be closed label Aug 3, 2019
@taro-bot taro-bot bot closed this as completed Aug 3, 2019
@robinv8
Copy link
Member

robinv8 commented Mar 27, 2020

image
image

taro 版本 2.0.7
map嵌套,定义事件会报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants