Closed sjcUD closed 6 years ago
Translation of this issue:
Const dataArray = [ { Icon: 'smile-o', Color: '#FF5500', Title: 'freedom', Id: '1001' }, { Icon: 'smile-o', Color: '#5FC296', Title: 'Equality', Id: '1002' }, { Icon: 'smile-o', Color: '#2DB7F5', Title: 'just', Id: '1003' }, ] Const childrenToRender = dataArray.map((item) => { Const {icon, color, title, id} = item; Return ( <div key={id} className={
${this.props.className}-list}> <div className={
${this.props.className}-icon}> <Icon type={icon} style={{color}}/> </div> <div className={
${this.props.className}-text`}>
{childrenToRender} `
[ListSort component] (https://github.com/ant-design/ant-motion/blob/master/src/edit/template/components/ListSort.jsx)
https://codesandbox.io/s/50qk2539mk 没什么问题啊。。。
可能是我这边项目包冲突了吧,解决了,用react@15.x就可以了
ListSort组件
"react": "^16.2.1", "react-dom": "^16.2.1",