-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
Version
3.4.9
Reproduction link
Steps to reproduce
It's a strange problem and it's hard to reproduce。
I found that the problem may lie inhook:destroyed
C through breakpoint debugging
app.$once('hook:destroyed', () => {
// clean out app from this.apps array once destroyed
const index = this.apps.indexOf(app)
if (index > -1) this.apps.splice(index, 1)
// ensure we still have a main app or null if no apps
// we do not release the router so it can be reused
if (this.app === app) this.app = this.apps[0] || null
if (!this.app) this.history.teardown()
})
this.app
Is set to null, when the app is destroyed for some reason
What is expected?
router.back () works
What is actually happening?
the page is normal, just router.back () or router.go (- 1) not working, which is strange
The code fragment cannot be provided because it is not required
The secondary routing component uses the keepAlive
<transition name="fade" mode="out-in">
<keep-alive :max="2" :exclude="excludeViews" :include="includeViews">
<router-view :key="key"></router-view>
</keep-alive>
</transition>
Metadata
Metadata
Assignees
Labels
No labels