Skip to content

Commit 64fc099

Browse files
committed
fix(projects): fix header style & fix button highlight when click global-tab. fixed #446
1 parent bc8dc47 commit 64fc099

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/layouts/modules/global-header/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const headerMenus = computed(() => {
4747
</script>
4848

4949
<template>
50-
<DarkModeContainer class="h-full flex-y-center shadow-header">
50+
<DarkModeContainer class="h-full flex-y-center px-12px shadow-header">
5151
<GlobalLogo v-if="showLogo" class="h-full" :style="{ width: themeStore.sider.width + 'px' }" />
5252
<HorizontalMenu v-if="showMenu" mode="horizontal" :menus="headerMenus" class="px-12px" />
5353
<div v-else class="h-full flex-y-center flex-1-hidden">

src/layouts/modules/global-tab/index.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ function init() {
141141
tabStore.initTabStore(route);
142142
}
143143
144+
function removeFocus() {
145+
(document.activeElement as HTMLElement)?.blur();
146+
}
147+
144148
// watch
145149
watch(
146150
() => route.fullPath,
@@ -162,7 +166,11 @@ init();
162166
<template>
163167
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
164168
<div ref="bsWrapper" class="h-full flex-1-hidden">
165-
<BetterScroll ref="bsScroll" :options="{ scrollX: true, scrollY: false, click: appStore.isMobile }">
169+
<BetterScroll
170+
ref="bsScroll"
171+
:options="{ scrollX: true, scrollY: false, click: appStore.isMobile }"
172+
@click="removeFocus"
173+
>
166174
<div
167175
ref="tabRef"
168176
class="h-full flex pr-18px"

0 commit comments

Comments
 (0)