我有一个字符串名的数组,我想这样做: let accountcode:{a:1,b:2}; this.setState({[array[0]:accountCode,array[1]:accountCode,array[3]:accountCode]}) 但是数组是动态列表,我应该映射到数组中,并在一个setState中尝
所以我想把key和value映射到一个数组中,作为我尝试过的selectsearch选项,它通过单独映射每一项来工作,现在我需要将所有数据映射到一个数组中。我怎么能这么做呢?:${student.id}`} {student.id}}// tried to map into an array of links not working 创建工作正常的选择选项<em