Skip to content

Commit

Permalink
fix: 修复无权限页面切换显示不正确的问题 --bug=128795439 (#3490)
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 17298
  • Loading branch information
luofann authored and AlkaidChan committed Sep 6, 2024
1 parent 159d951 commit 0e0fa97
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
15 changes: 8 additions & 7 deletions bcs-services/bcs-bscp/ui/src/components/head.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@
v-for="secondNav in nav.children"
:key="secondNav.id"
:class="['secondNav-item', { actived: isSecondNavActived(secondNav.module) }]">
<router-link
:to="{ name: secondNav.id, params: { spaceId: spaceId || 0 } }"
@click="handleNavClick(secondNav.id)">
<a @click.stop="handleNavClick(secondNav.id)">
{{ secondNav.name }}
</router-link>
</a>
</div>
</div>
</div>
<router-link v-else :to="{ name: nav.id, params: { spaceId: spaceId || 0 } }" @click="handleNavClick(nav.id)">
<a v-else @click.stop="handleNavClick(nav.id)">
{{ nav.name }}
</router-link>
</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -224,13 +222,14 @@
const detail = JSON.parse(lastAccessedServiceDetail);
if (detail.spaceId === spaceId.value) {
router.push({
name: navId === 'service-all' ? 'service-config' : (navId as RouteRecordName),
name: navId === 'service-all' && !showPermApplyPage.value ? 'service-config' : (navId as RouteRecordName),
params: { spaceId: detail.spaceId, appId: detail.appId },
});
return;
}
}
}
router.push({ name: navId, params: { spaceId: spaceId.value || 0 } });
};
const handleSpaceSearch = (searchStr: string) => {
Expand Down Expand Up @@ -417,6 +416,7 @@
padding: 0 16px;
font-size: 14px;
color: #96a2b9;
cursor: pointer;
a {
color: #96a2b9;
}
Expand Down Expand Up @@ -457,6 +457,7 @@
padding: 0 16px;
font-size: 14px;
white-space: nowrap;
cursor: pointer;
a {
color: #96a2b9;
}
Expand Down
3 changes: 1 addition & 2 deletions bcs-services/bcs-bscp/ui/src/views/space/apply-perm-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
const permTitle = computed(() => {
if (applyPermResource.value.length > 0) {
// 暂时只展示最上层权限名称
const resource = applyPermResource.value[0];
const resource = applyPermResource.value[applyPermResource.value.length - 1];
// 权限名称未做国际化,用action字段代替
const permissionName = locale.value === 'en' ? ` ${resource.action} ` : resource.action_name;
return `${t('')}${permissionName}${t('权限')}`;
Expand Down

0 comments on commit 0e0fa97

Please sign in to comment.