mobile/me 样式调整

This commit is contained in:
Wang Kejun 2023-02-09 00:28:15 +08:00
parent 18d09e0875
commit 0f2296b363
3 changed files with 54 additions and 29 deletions

View File

@ -22,4 +22,11 @@
}
}
}
}
.noData {
display: flex;
flex-direction: column;
flex: 1;
align-items: center;
justify-content: center;
}

View File

@ -22,4 +22,12 @@
}
}
}
}
.noData {
display: flex;
flex-direction: column;
flex: 1;
align-items: center;
justify-content: center;
}

View File

@ -23,35 +23,45 @@ export default function render(
const { goAddMobile, removeItem, execute } = props.methods;
return (
<div className={Style.container}>
<List className={Style.list}>
{mobiles?.map((ele, index) => (
<List.Item
key={index}
prefix={<MobileOutlined />}
extra={
allowRemove && (
<div
onClick={async () => {
const result = await Dialog.confirm({
content:
'确认删除吗?删除后无法用此号码登录',
});
if (result) {
removeItem(ele.id);
await execute();
}
}}
>
<DeleteOutlined />
</div>
)
}
>
{ele.mobile}
</List.Item>
))}
</List>
<div style={{ flex: 1 }} />
{mobiles?.length > 0 ? (
<>
<List className={Style.list}>
{mobiles?.map((ele, index) => (
<List.Item
key={index}
prefix={<MobileOutlined />}
extra={
allowRemove && (
<div
onClick={async () => {
const result =
await Dialog.confirm({
content:
'确认删除吗?删除后无法用此号码登录',
});
if (result) {
removeItem(ele.id);
await execute();
}
}}
>
<DeleteOutlined />
</div>
)
}
>
{ele.mobile}
</List.Item>
))}
</List>
<div style={{ flex: 1 }} />
</>
) : (
<div className={Style.noData}>
<span></span>
</div>
)}
<Button
block
size="large"