Skip to content

Commit

Permalink
简化表达式
Browse files Browse the repository at this point in the history
  • Loading branch information
baojiawei committed Mar 29, 2020
1 parent a00e4ba commit dac2ef4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/baseUI/horizen-item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ function Horizen(props) {
const clickHandle = (item) => {
handleClick(item.key);
}
return (
return (
<Scroll direction={"horizental"} refresh={true}>
<div ref={Category} >
<List>
<span>{title}</span>
{
list.map((item) => {
return (
<ListItem
<ListItem
key={item.key}
className={`${oldVal === item.key ? 'selected': ''}`}
className={oldVal === item.key ? 'selected' : ''}
onClick={() => clickHandle(item)}>
{item.name}
{item.name}
</ListItem>
)
})
Expand All @@ -85,5 +85,5 @@ Horizen.propTypes = {
list: PropTypes.array,
handleClick: PropTypes.func
};

export default memo(Horizen);

0 comments on commit dac2ef4

Please sign in to comment.