Skip to content

fix(toast): prevent duplicate close events during closing animation #3321

Open
JefferyHcool wants to merge 4 commits intojd-opensource:v4from
JefferyHcool:fix/h5-toast-close
Open

fix(toast): prevent duplicate close events during closing animation #3321
JefferyHcool wants to merge 4 commits intojd-opensource:v4from
JefferyHcool:fix/h5-toast-close

Conversation

@JefferyHcool
Copy link
Copy Markdown

@JefferyHcool JefferyHcool commented Mar 31, 2026

这个 PR 做了什么? (简要描述所做更改)

  • 关闭动画期间重复点击遮罩会导致 onClose 被重复触发(点击时 + 动画结束时)。
  • 通过引入 state.closing 防重入,并统一只在 onAfterLeave 触发关闭回调,避免重复调用。
  • 修复#3319

这个 PR 是什么类型? (至少选择一个)

  • feat: 新特性提交
  • fix: bug 修复
  • docs: 文档改进
  • style: 组件样式/交互改进
  • type: 类型定义更新
  • perf: 性能、包体积优化
  • refactor: 代码重构、代码风格优化
  • test: 测试用例
  • chore(deps): 依赖升级
  • chore(demo): 演示代码改进
  • chore(locale): 国际化改进
  • chore: 其他改动(是关于什么的改动?)

这个 PR 涉及以下平台:

  • NutUI H5 @nutui/nutui
  • NutUI Taro @nutui/nutui-taro

这个 PR 是否已自测:

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.

2 participants