Skip to content

Commit

Permalink
fix(projects): fix header style & fix button highlight when click glo…
Browse files Browse the repository at this point in the history
…bal-tab. fixed #446
  • Loading branch information
honghuangdc committed May 23, 2024
1 parent bc8dc47 commit 64fc099
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/layouts/modules/global-header/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const headerMenus = computed(() => {
</script>

<template>
<DarkModeContainer class="h-full flex-y-center shadow-header">
<DarkModeContainer class="h-full flex-y-center px-12px shadow-header">
<GlobalLogo v-if="showLogo" class="h-full" :style="{ width: themeStore.sider.width + 'px' }" />
<HorizontalMenu v-if="showMenu" mode="horizontal" :menus="headerMenus" class="px-12px" />
<div v-else class="h-full flex-y-center flex-1-hidden">
Expand Down
10 changes: 9 additions & 1 deletion src/layouts/modules/global-tab/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ function init() {
tabStore.initTabStore(route);
}
function removeFocus() {
(document.activeElement as HTMLElement)?.blur();
}
// watch
watch(
() => route.fullPath,
Expand All @@ -162,7 +166,11 @@ init();
<template>
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
<div ref="bsWrapper" class="h-full flex-1-hidden">
<BetterScroll ref="bsScroll" :options="{ scrollX: true, scrollY: false, click: appStore.isMobile }">
<BetterScroll
ref="bsScroll"
:options="{ scrollX: true, scrollY: false, click: appStore.isMobile }"
@click="removeFocus"
>
<div
ref="tabRef"
class="h-full flex pr-18px"
Expand Down

0 comments on commit 64fc099

Please sign in to comment.