Skip to content

fix(fe): modal 的样式问题,遵循 LIFO 的弹出#226

Merged
dos1in merged 13 commits into
didi:mainfrom
EchoTechFE:fix-modal
May 13, 2026
Merged

fix(fe): modal 的样式问题,遵循 LIFO 的弹出#226
dos1in merged 13 commits into
didi:mainfrom
EchoTechFE:fix-modal

Conversation

@Hierifer
Copy link
Copy Markdown
Contributor

@Hierifer
Copy link
Copy Markdown
Contributor Author

好的,我会都注意提供的 diff 内容

if (this._destroyed) return // 100ms 内 mini-app 已 destroy → 短路,不挂悬空节点
const entry = this._mountModal(opts || {})
this._modalStack.push(entry)
}, 100)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这里的 setTimeout 方式需要修改下,看看有没有更稳定的时机,而不依赖硬编码 100ms。

@Hierifer
Copy link
Copy Markdown
Contributor Author

修改了一下展示策略(更加贴合微信小程序 toolkit),showModal push(同步)和展示(mask 同步 + 内容 异步)分离,push 是会先 updateModal(this.stack.peek()) 再展示。setTimeout(100)用作节流,防止 modal 内容在 display A, display C 产生闪烁。 100 这个数字我想想有没有动态的

@dos1in dos1in merged commit fed5dde into didi:main May 13, 2026
2 checks passed
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