ng-alain / ng-alain

NG-ZORRO admin panel front-end framework (surge mirror https://ng-alain-doc.surge.sh)
https://ng-alain.com
MIT License
4.53k stars 1.15k forks source link

When there are sub-routes on the page,ReuseTabService cannot refresh and locate the tab head correctly 当页面有子路由时,reuseTab不能正确刷新和定位tab head #1821

Open anderslu opened 4 years ago

anderslu commented 4 years ago

Reproduction link

https://github.com/ng-alain/ng-alain/releases/tag/9.5.5

Steps to reproduce

clone ng-alain v 9.5.5 基于9.X版本 use ReuseTabService 开启路由复用 click menu[Account/Account Center] and [Account/Account Settings] 点击个人中心和个人设置页面(包含子路由) ①In order to ensure that the problem is reproduced, click several times 为了确保再现问题,多点击几次 ②The page has changed, and the header of the tab has not changed 页面内容变化,但tab 的标签头部不变 ③click [Result/Success & Fail] or [Profile/Basic profile & advanced profile] 再点击结果也,或详情页面 ④There will be the same problem as ②. 也会出现和2一样的问题。哪怕页面已经有便签显示了,也不会正确定位,只会再最后显示子路由那个页面显示

What is expected?

Hope to be revised in 9.x

What is actually happening?

When there are sub-routes on the page,ReuseTabService cannot refresh and locate the tab head correctly
当页面有子路由时,reuseTab不能正确刷新和定位tab head

Environment Info
ng-alain 9.5.5
Browser Chrome

In the figure below, the problem is marked in red,and The blue part is the tab that should be used to jump.
下图中,红色标注的是问题现状蓝色部分是应该跳转使用的tab

image image image

alain-bot[bot] commented 4 years ago

Translation of this issue:

When When there are sub-routes on the page, ReuseTabService can not refresh and locate the tab head correctly when the page has sub-routing, reuseTab not properly refresh and positioning tab head

Reproduction link

Https://github.com/ng-alain/ng-alain/releases/tag/9.5.5

Steps to reproduce

clone ng-alain v 9.5.5-based version 9.X use [ReuseTabService] (https://ng-alain.com/components/reuse-tab) routing multiplex open click menu [Account / Account Center] and [Account / Account Settings] Click the individual center and personal settings page (containing sub-routing) ①In order to ensure that the problem is reproduced, click several times to ensure reproducibility problems, more than a few clicks ②The page has changed, and the header of the tab has not changed the page content changes, but the tab label head unchanged ③click [Result / Success & Fail] or [Profile / Basic profile & advanced profile] and then click on the results, or detail page ④There will be the same problem as ②. 2 and will also appear the same problem. Even page notes have been displayed, it will not correctly positioned, then only the last sub-route display that page display

What is expected?

Hope to be revised in 9.x

What is actually happening?

When there are sub-routes on the page, ReuseTabService can not refresh and locate the tab head correctly When the page has sub-routing, reuseTab not properly refresh and positioning tab head

Environment Info
Ng-alain 9.5.5
Browser Chrome

In the figure below, the problem is marked in red, and The blue part is the tab that should be used to jump. Below, highlighted in red is the blue part of the problem is the status quo should be used to jump tab

! [Image] (https://user-images.githubusercontent.com/1821328/91923938-23882b00-ed04-11ea-8e74-bad2c743df68.png) ! [Image] (https://user-images.githubusercontent.com/1821328/91924018-4b778e80-ed04-11ea-9fc5-2f96629109f8.png) ! [Image] (https://user-images.githubusercontent.com/1821328/91924075-6813c680-ed04-11ea-9ec2-893f085fbc9c.png)

webliuxiang commented 3 years ago

我也遇到了这个问题,有解决方法吗?