mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 10:56:50 +08:00
refactor(app): 优化首页角色信息显示逻辑
- 改进了当前角色的显示逻辑,增加了对 userInfo.roleNames 的空值检查- 如果 roleNames 为空,将显示 '未指定',提高了代码的健壮性和用户体验
This commit is contained in:
@@ -6,7 +6,9 @@
|
|||||||
<span class="title">你好,{{ userInfo.realName }}</span>
|
<span class="title">你好,{{ userInfo.realName }}</span>
|
||||||
<div class="subtitle">欢迎使用{{ title }}</div>
|
<div class="subtitle">欢迎使用{{ title }}</div>
|
||||||
<div class="role-info">
|
<div class="role-info">
|
||||||
当前角色:{{ userInfo.roleNames[0] || '未指定' }}
|
当前角色:{{
|
||||||
|
userInfo.roleNames ? userInfo.roleNames[0] : '未指定'
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
|
|||||||
Reference in New Issue
Block a user