Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tagviews 关闭最后一个是首页时,跳转首页没有刷新页面的问题 #1861

Closed
de1ck opened this issue Apr 8, 2019 · 4 comments

Comments

@de1ck
Copy link
Contributor

de1ck commented Apr 8, 2019

code
由于router,对跳转的路由没有改变时,不会触发页面刷新,所以需要使用其他方式去触发,以下是我的解决方案,利用vue-element-admin本身实现当前路由刷新的方案。

//   添加 view 入参
toLastView(visitedViews, view) {
      const latestView = visitedViews.slice(-1)[0]
      if (latestView) {
        this.$router.push(latestView)
      } else {
        // 添加一层判断,当前页是否为首页
       if (view.name=== 'Dashboard') this.$router.push('/redirect' + view.fullPath)
        // You can set another route
       else  this.$router.push('/')
      }
    },
@PanJiaChen
Copy link
Owner

按照逻辑来讲,好像的确是不需要刷新的。

@de1ck
Copy link
Contributor Author

de1ck commented Apr 8, 2019

我的页面在router before 中使用了过度效果,会导致过度效果一直存在,直到点击其他菜单

@PanJiaChen
Copy link
Owner

恩,的确在没有 设置affix的情况下,会有问题。
欢迎把你的代码改动作为pr提交。

@PanJiaChen
Copy link
Owner

Fixed in #1866

EdwinBetanc0urt pushed a commit to EdwinBetanc0urt/adempiere-vue that referenced this issue Jan 22, 2024
* Fix: Settings DashBoard

* minimal changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants