File tree 1 file changed +4
-4
lines changed
themes/theme-default/src/client/components
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { useThemeLocaleData } from '@theme/useThemeData'
7
7
import { DeviceType , useUpdateDeviceStatus } from ' @theme/useUpdateDeviceStatus'
8
8
import { hasGlobalComponent } from ' @vuepress/helper/client'
9
9
import type { VNode } from ' vue'
10
- import { computed , ref , resolveComponent } from ' vue'
10
+ import { computed , ref , useTemplateRef , resolveComponent } from ' vue'
11
11
12
12
defineEmits <{
13
13
toggleSidebar: []
@@ -24,8 +24,8 @@ const SearchBox = hasGlobalComponent('SearchBox')
24
24
25
25
const themeLocale = useThemeLocaleData ()
26
26
27
- const navbar = ref <HTMLElement | null >(null )
28
- const navbarBrand = ref <HTMLElement | null >(null )
27
+ const navbar = useTemplateRef <HTMLElement | null >(' navbar ' )
28
+ const navbarBrand = useTemplateRef <HTMLElement | null >(' navbar-brand ' )
29
29
30
30
const linksWrapperMaxWidth = ref (0 )
31
31
const linksWrapperStyle = computed (() => {
@@ -71,7 +71,7 @@ useUpdateDeviceStatus(
71
71
<header ref =" navbar" class =" vp-navbar" vp-navbar >
72
72
<VPToggleSidebarButton @toggle =" $emit('toggleSidebar')" />
73
73
74
- <span ref =" navbarBrand " >
74
+ <span ref =" navbar-brand " >
75
75
<VPNavbarBrand />
76
76
</span >
77
77
You can’t perform that action at this time.
0 commit comments