[Bug Report] $confirm 在 vue-router 中 beforeRouteLeave 调用出现闪烁后消失情况
Open
stale
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.13.1
### OS/Browsers version
86.0.4240.111
### Vue version
2.6.11
### Reproduction Link
https://jsfiddle.net/
### Steps to reproduce
。。重现链接不支持 codesandbox吗
我把重现链接粘贴到这里吧 https://codesandbox.io/s/upbeat-resonance-7h6hj
1.从首页点击 路由1 会弹出 $confirm 弹框,选择确认跳转到 路由1的页面。
2. 之后点击Home跳回首页。
3. 之后点击浏览器的 后退 按钮 ,beforeRouteLeave方法成功触发,但是 $confirm弹框一闪而逝,观察页面URL已经变化(即并没有拦截路由跳转)
### What is Expected?
点击后退按钮 $confirm 弹框正常展示,并且会拦截跳转行为,选择确认方才跳转到上一条历史记录的页面。
### What is actually happening?
$confirm弹框一闪而逝,观察页面URL已经变化(即并没有拦截路由跳转)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.