react antd Warning: must set key for children

实例中,location 有多是一个‘’,''.split() 将输出[""],是个含有空字符串的数组,而[]是个什么都没有的数组,二者不一样。
code:
change initialValue from :
initialValue: location.split(',') || []
to:
initialValue: location === '' ? [] : location.split(',')数组

相关文章
相关标签/搜索