提交 aa7cc9ae 编写于 作者: fxy060608's avatar fxy060608

fix(h5): 包含 tabBar 时调用 reLaunch 未正常清理 page

上级 11e7dbd1
...@@ -31,7 +31,7 @@ function switchTab (routes) { ...@@ -31,7 +31,7 @@ function switchTab (routes) {
function reLaunch (toName) { function reLaunch (toName) {
__uniConfig.reLaunch = (__uniConfig.reLaunch || 1) + 1 __uniConfig.reLaunch = (__uniConfig.reLaunch || 1) + 1
// 关闭所有页面 // 关闭所有页面
const pages = getCurrentPages() const pages = getCurrentPages(true)
for (let i = pages.length - 1; i >= 0; i--) { for (let i = pages.length - 1; i >= 0; i--) {
callPageHook(pages[i], 'onUnload') callPageHook(pages[i], 'onUnload')
// 重新reLaunch至首页可能会被keepAlive,先手动强制destroy // 重新reLaunch至首页可能会被keepAlive,先手动强制destroy
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册