Giter VIP home page Giter VIP logo

Comments (5)

xiaoxian521 avatar xiaoxian521 commented on June 19, 2024

same #972

from vue-pure-admin.

wanghaochun avatar wanghaochun commented on June 19, 2024

same #972

你好,是点击标签栏切换是才会触发两次,点菜单栏不会。
image

from vue-pure-admin.

xiaoxian521 avatar xiaoxian521 commented on June 19, 2024

我之前提交commit有备注记录 但是我没时间去找哈
目前太忙了 计划一堆
而且这个并不影响什么
而且这应该是vue-router的问题 根据我的记忆

from vue-pure-admin.

wanghaochun avatar wanghaochun commented on June 19, 2024

已找到问题所在:
1、先说说背景,我是想在用户离开页面前提醒用户当前数据没保存,让用户做二次确认,用了vueRoute官方的API在组件内声明onBeforeRouteLeave;
image
2、点击菜单栏时(如下)
image
弹窗(如下)只会弹一次,无论我点击确定或取消
image
3、点击标签栏(如下)
image
第一次弹窗选取消后会重复再弹一次
4、最后发现问题在于标签栏点击事件冒泡引起了路由两次跳转
image
image

临时解决方案:把tagOnClick事件取消后问题不再出现,标签栏切换和菜单跳转均正常
暂时未知该方式会造成什么影响。请看一下。

from vue-pure-admin.

wanghaochun avatar wanghaochun commented on June 19, 2024

image
好像将router-link标签的to属性置空更好,这样标签切换的可点击区域会更大。。当然会有什么影响暂时还未知。

from vue-pure-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.