Commit 3b13f994 authored by Chunchi Che's avatar Chunchi Che

update checkCardModal.tsx

parent 203fc54b
...@@ -27,11 +27,24 @@ const CheckCardModal = () => { ...@@ -27,11 +27,24 @@ const CheckCardModal = () => {
title={`请选择${min}到${max}张卡片`} title={`请选择${min}到${max}张卡片`}
open={isOpen} open={isOpen}
closable={false} closable={false}
footer={null} footer={
<Button
disabled={response.length < min || response.length > max}
onClick={() => {
sendSelectCardResponse(response);
dispatch(setCheckCardModalIsOpen(false));
dispatch(resetCheckCardModal());
}}
>
summit
</Button>
}
width={800}
> >
<CheckCard.Group <CheckCard.Group
multiple multiple
bordered bordered
size="small"
defaultValue={defaultValue} defaultValue={defaultValue}
onChange={(value) => { onChange={(value) => {
// @ts-ignore // @ts-ignore
...@@ -43,14 +56,16 @@ const CheckCardModal = () => { ...@@ -43,14 +56,16 @@ const CheckCardModal = () => {
<Row> <Row>
{tab.options.map((option) => { {tab.options.map((option) => {
return ( return (
<Col span={5}> <Col span={4}>
<CheckCard <CheckCard
title={option.name} title={option.name}
description={option.desc} description={option.desc}
style={{ width: 120 }}
cover={ cover={
<img <img
alt={option.code.toString()} alt={option.code.toString()}
src={`https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/${option.code}.jpg`} src={`https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/${option.code}.jpg`}
style={{ width: 100 }}
/> />
} }
value={option.response} value={option.response}
...@@ -62,15 +77,6 @@ const CheckCardModal = () => { ...@@ -62,15 +77,6 @@ const CheckCardModal = () => {
); );
})} })}
</CheckCard.Group> </CheckCard.Group>
<Button
title="完成"
disabled={response.length < min || response.length > max}
onClick={() => {
sendSelectCardResponse(response);
dispatch(setCheckCardModalIsOpen(false));
dispatch(resetCheckCardModal());
}}
/>
</Modal> </Modal>
); );
}; };
......
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