jd-opensource / jd-opensource/taro-ui

AInput组件在外层循环内部的onChange 事件取值bug!index 取的数组最后一个

Open
#1,397 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

版本:"taro-ui": "^3.0.0-alpha.10"
"@tarojs/components": "^3.3.8",
"@tarojs/react": "^3.3.8",
"@tarojs/router": "^3.3.8",
"@tarojs/runtime": "^3.3.5",
"@tarojs/taro": "^3.3.5",
"@tarojs/taro-h5": "^3.3.8",
"react": "^16.10.0",
"react-dom": "^16.10.0",

代码:
import React, { Component } from 'react';
import { View } from '@tarojs/components';
import { AtSearchBar, AtInput } from 'taro-ui';

class TestPage extends Component {
render() {
return (

{[1, 2, 3, 4].map((item, index) => (
{
console.log('错误的index', index);
return value;
}}
/>
))}

);
}
}

export default TestPage;
1634181702874_CBD1C39F-F464-49A3-8702-E960F5A563F3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.