Skip to content

修复抽取多人时撒花卡顿问题#74

Open
huangyiyang89 wants to merge 3 commits into
moshang-ax:masterfrom
huangyiyang89:master
Open

修复抽取多人时撒花卡顿问题#74
huangyiyang89 wants to merge 3 commits into
moshang-ax:masterfrom
huangyiyang89:master

Conversation

@huangyiyang89

Copy link
Copy Markdown

This pull request optimizes the animation effect handling in the lottery card selection logic. Instead of adding the "prize" effect to each card individually during their animation, the effect is now applied collectively after all animations complete, reducing performance issues and improving user experience.

Animation effect optimization:

  • Moved the addition of the "prize" class from inside the card animation loop to a single operation after all card animations finish, preventing multiple triggers and potential UI lag. (product/src/lottery/index.js, [1] [2]

Copilot AI and others added 3 commits February 7, 2026 13:31
将.prize样式类的添加从逐个卡片的循环中移至所有卡片动画完成后的onComplete回调中统一添加,
避免每个卡片反转都独立触发一次CSS过渡特效造成多次样式重算和重绘。

Co-authored-by: huangyiyang89 <12613485+huangyiyang89@users.noreply.github.com>
…-bug

fix: batch .prize class addition to prevent per-card effect triggering lag
Copilot AI review requested due to automatic review settings February 7, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request optimizes the lottery card selection animation to reduce UI lag when drawing multiple winners by applying the "prize" visual effect only once after all card animations complete.

Changes:

  • Removed per-card "prize" class application during the card animation loop.
  • Added a single post-animation step that applies the "prize" class to all selected cards after animations finish.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants