iview / iview/iview-admin

[Bug Report]关于Modal的关闭问题

Open
#843 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
16.3k
Forks
4.7k
PR merge metrics
No merged PRs in 30d

Description

### Environment
win7 x64、chrome68、vue2.5.2

### Reproduction link
[https://admin.iviewui.com/directive/directive_page](https://admin.iviewui.com/directive/directive_page)

### Steps to reproduce
进入iview admin后台管理系统后,点击左侧菜单“指令”,然后点击“显示可拖动弹窗”,会弹出一个Modal。此时,点击浏览器的“回退”按钮,回到iview admin后台主页,但是“显示可拖动弹窗”这个Modal并未关闭。
问题:实际业务系统中,几乎每个页面都有Modal,每次点击浏览器“回退”到上一个历史页面后,当前页面的Modal对话框不消失,影响用户体验。尝试了在根路由页面监控route的变化,使用this.$modal.remove()并未有效果。

### What is expected?
浏览器“回退”到别的页面后,this.$modal.remove()方法可以关闭任何弹出的modal对话框。

### What is actually happening?
this.$modal.remove()并未有效果

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue at the linked directive page with the reported Vue 2.5.2 and Chrome 68 setup: open the draggable Modal, then use the browser back button. Trace the route-change handling and the $modal.remove() call; done means the Modal closes when navigating back to another page.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.