fix issue4161 navbar show name error #4162
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug report(问题描述)
用用户1登录系统,手动在控制台去除cookie信息后,在地址栏上跳转到login页面,用用户2登录,结果navbar显示的用户名字还是用户1的
Steps to reproduce(问题复现步骤)
1.使用admin账户登录系统
2.控制台手动去除cookie中的token,地址栏访问到login页面
3.使用editor账户登录系统
4.发现navbar显示的还是admin的用户名字
Other relevant information(格外信息)
Your OS: win10
Node.js version: 14.17.6
vue-element-admin version: 4.4.0