Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
869449bf
Commit
869449bf
authored
Mar 30, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update positionModal.tsx
parent
b8477ec2
Pipeline
#21016
passed with stages
in 18 minutes and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
21 deletions
+27
-21
src/ui/Duel/positionModal.tsx
src/ui/Duel/positionModal.tsx
+27
-21
No files found.
src/ui/Duel/positionModal.tsx
View file @
869449bf
import
React
,
{
useState
}
from
"
react
"
;
import
React
,
{
use
Ref
,
use
State
}
from
"
react
"
;
import
{
useAppSelector
}
from
"
../../hook
"
;
import
{
store
}
from
"
../../store
"
;
import
{
Modal
,
Button
}
from
"
antd
"
;
import
{
Button
}
from
"
antd
"
;
import
{
sendSelectPositionResponse
}
from
"
../../api/ocgcore/ocgHelper
"
;
import
{
selectPositionModalIsOpen
,
...
...
@@ -13,6 +13,7 @@ import {
setPositionModalIsOpen
,
}
from
"
../../reducers/duel/mod
"
;
import
{
CheckCard
}
from
"
@ant-design/pro-components
"
;
import
DragModal
from
"
./dragModal
"
;
const
PositionModal
=
()
=>
{
const
dispatch
=
store
.
dispatch
;
...
...
@@ -21,26 +22,31 @@ const PositionModal = () => {
const
[
selected
,
setSelected
]
=
useState
<
ygopro
.
CardPosition
|
undefined
>
(
undefined
);
const
draggleRef
=
useRef
<
HTMLDivElement
>
(
null
);
return
(
<
Modal
title=
"请选择表示形式"
open=
{
isOpen
}
closable=
{
false
}
footer=
{
<
Button
disabled=
{
selected
===
undefined
}
onClick=
{
()
=>
{
if
(
selected
!==
undefined
)
{
sendSelectPositionResponse
(
selected
);
dispatch
(
setPositionModalIsOpen
(
false
));
dispatch
(
resetPositionModal
());
}
}
}
>
submit
</
Button
>
}
<
DragModal
modalProps=
{
{
title
:
"
请选择表示形式
"
,
open
:
isOpen
,
closable
:
false
,
footer
:
(
<
Button
disabled=
{
selected
===
undefined
}
onClick=
{
()
=>
{
if
(
selected
!==
undefined
)
{
sendSelectPositionResponse
(
selected
);
dispatch
(
setPositionModalIsOpen
(
false
));
dispatch
(
resetPositionModal
());
}
}
}
>
submit
</
Button
>
),
}
}
dragRef=
{
draggleRef
}
draggable=
{
true
}
>
<
CheckCard
.
Group
bordered
...
...
@@ -58,7 +64,7 @@ const PositionModal = () => {
/>
))
}
</
CheckCard
.
Group
>
</
Modal
>
</
Drag
Modal
>
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment