React组件封装
//内部封装
import React from ‘react’
import ‘./index.less’
const List = ({
listClick,
list,
listStyle
}) => {
return (
list && list.map(e => (
< div
onClick={listClick.bind(this, e)}
style={listStyle}
>{e.name}
))
)
}
export default List
//
原创
2020-08-03 19:02:10 ·
135 阅读 ·
0 评论