jira项目笔记9-封装table得一个组件(不用ant之前)

const SearchList = ({ lists, users }) =>
{
  return (
    <table>
      <thead>
        <tr>
          <th>项目</th>
          <th>负责人</th>
        </tr>
      </thead>
      <tbody>
        {
          lists.map(project =>
            <tr>
              <td>{project.name}</td>
              <td>{users.find(user => user.id === project.personId)?.name}</td>
            </tr>
          )
        }
      </tbody>
    </table>
  )
}

export default SearchList

posted @ 2022-10-07 18:45  前端导师歌谣  阅读(20)  评论(0)    收藏  举报