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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
love_飞影
Neos
Commits
00aa816c
Commit
00aa816c
authored
Jul 09, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 动画序列优化
parent
d7656ed2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+3
-3
No files found.
src/ui/Duel/PlayMat/Card/index.tsx
View file @
00aa816c
...
@@ -3,7 +3,7 @@ import "./index.scss";
...
@@ -3,7 +3,7 @@ import "./index.scss";
import
{
animated
,
to
,
useSpring
}
from
"
@react-spring/web
"
;
import
{
animated
,
to
,
useSpring
}
from
"
@react-spring/web
"
;
import
{
Dropdown
,
type
MenuProps
}
from
"
antd
"
;
import
{
Dropdown
,
type
MenuProps
}
from
"
antd
"
;
import
classnames
from
"
classnames
"
;
import
classnames
from
"
classnames
"
;
import
React
,
{
type
CSSProperties
,
useEffect
,
useState
}
from
"
react
"
;
import
React
,
{
type
CSSProperties
,
useEffect
,
useState
,
useRef
}
from
"
react
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
type
{
CardMeta
}
from
"
@/api
"
;
import
type
{
CardMeta
}
from
"
@/api
"
;
...
@@ -94,11 +94,11 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
...
@@ -94,11 +94,11 @@ export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
// >>> 动画 >>>
// >>> 动画 >>>
/** 动画序列的promise */
/** 动画序列的promise */
let
animationQueue
:
Promise
<
unknown
>
=
new
Promise
<
void
>
((
rs
)
=>
rs
(
));
const
animationQueue
=
useRef
(
new
Promise
<
void
>
((
rs
)
=>
rs
()
));
const
addToAnimation
=
(
p
:
()
=>
Promise
<
void
>
)
=>
const
addToAnimation
=
(
p
:
()
=>
Promise
<
void
>
)
=>
new
Promise
((
rs
)
=>
{
new
Promise
((
rs
)
=>
{
animationQueue
=
animationQueue
.
then
(
p
).
then
(
rs
);
animationQueue
.
current
=
animationQueue
.
current
.
then
(
p
).
then
(
rs
);
});
});
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
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