图片列表全选按钮逻辑优化

This commit is contained in:
unknown 2023-07-31 11:03:51 +08:00
parent 242d29bf5e
commit 2fa7a1dd4e

View File

@ -192,23 +192,23 @@ const ResourceImagesPage = () => {
></UploadImageSub>
{selectKey.length > 0 && (
<Button className="ml-16" onClick={() => cancelAll()}>
</Button>
)}
{selectKey.length === 0 && (
<Button className="ml-16" onClick={() => selectAll()}>
</Button>
)}
{imageList.length !== 0 && (
<>
<Button className="ml-16" onClick={() => selectAll()}>
</Button>
<Button
className="ml-16"
disabled={selectKey.length === 0}
type="primary"
onClick={() => removeResource()}
>
</Button>
</>
<Button
className="ml-16"
disabled={selectKey.length === 0}
type="primary"
onClick={() => removeResource()}
>
</Button>
)}
</div>
<div className="d-flex"></div>