Commit d5a5441b authored by timel's avatar timel Committed by Chunchi Che

fix: [select action modal] card zone select

parent e200d3c7
...@@ -171,52 +171,59 @@ export const NewSelectActionsModal: FC = () => { ...@@ -171,52 +171,59 @@ export const NewSelectActionsModal: FC = () => {
selectedZone={selectedZone} selectedZone={selectedZone}
onChange={setSelectedZone as any} onChange={setSelectedZone as any}
/> />
{grouped.map((options, i) => ( {grouped.map(
<div className="checkcard-container" key={i}> (options, i) =>
<CheckCard.Group options[0] === selectedZone && (
onChange={setResponse as any} <div className="checkcard-container" key={i}>
// TODO 考虑如何设置默认值,比如只有一个的,就直接选中 <CheckCard.Group
multiple onChange={setResponse as any}
style={{ // TODO 考虑如何设置默认值,比如只有一个的,就直接选中
display: "grid", multiple
gridTemplateColumns: "repeat(6, 1fr)", style={{
gap: 10, display: "grid",
}} gridTemplateColumns: "repeat(6, 1fr)",
> gap: 10,
{options[1].map((card, j) => ( }}
<Tooltip title={card.effectDesc} placement="bottom" key={j}> >
<div> {options[1].map((card, j) => (
<CheckCard <Tooltip
cover={ title={card.effectDesc}
<YgoCard placement="bottom"
code={card.meta.id} key={j}
>
<div>
<CheckCard
cover={
<YgoCard
code={card.meta.id}
style={{
width: "100%",
height: "100%",
position: "absolute",
left: 0,
top: 0,
}}
/>
}
style={{ style={{
width: "100%", width: 100,
height: "100%", aspectRatio: 5.9 / 8.6,
position: "absolute", marginInlineEnd: 0,
left: 0, marginBlockEnd: 0,
top: 0, flexShrink: 0,
}}
value={card}
onClick={() => {
showCardModal(card);
}} }}
/> />
} </div>
style={{ </Tooltip>
width: 100, ))}
aspectRatio: 5.9 / 8.6, </CheckCard.Group>
marginInlineEnd: 0, </div>
marginBlockEnd: 0, )
flexShrink: 0, )}
}}
value={card}
onClick={() => {
showCardModal(card);
}}
/>
</div>
</Tooltip>
))}
</CheckCard.Group>
</div>
))}
</Space> </Space>
</div> </div>
</NeosModal> </NeosModal>
......
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