Commit 0f4a09e3 authored by 张烨's avatar 张烨

style: 优化站点管理样式

parent d7dbb073
......@@ -181,6 +181,23 @@ const SiteManage = () => {
console.log(err);
});
};
const renderListItem = items =>
items.map(t => (
<List.Item
onClick={() => {
setCurrentStation(t);
}}
key={t.id}
className={classnames({
[styles.listItem]: true,
[styles.selected]: currentStation.id === t.id,
})}
>
{t.text}
</List.Item>
));
return (
<PageContainer>
<GridContent>
......@@ -192,22 +209,7 @@ const SiteManage = () => {
spinning={spinLoading}
style={{ marginTop: '20px' }}
>
<List>
{treeData.map(t => (
<List.Item
onClick={() => {
setCurrentStation(t);
}}
key={t.id}
className={classnames({
[styles.listItem]: true,
[styles.selected]: currentStation.id === t.id,
})}
>
{t.text}
</List.Item>
))}
</List>
<List>{renderListItem(treeData)}</List>
</Spin>
<AddModal
visible={modalVisible}
......
.cardBox{
min-height: calc(100vh - 200px);
height: calc(100vh - 200px);
overflow: auto;
}
.cardBoxR{
min-height: calc(100vh - 292px);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment