Skip to content

Commit

Permalink
style(theme-default): use useTemplateRef
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 6, 2024
1 parent 5057a89 commit f0542cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions themes/theme-default/src/client/components/VPNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useThemeLocaleData } from '@theme/useThemeData'
import { DeviceType, useUpdateDeviceStatus } from '@theme/useUpdateDeviceStatus'
import { hasGlobalComponent } from '@vuepress/helper/client'
import type { VNode } from 'vue'
import { computed, ref, resolveComponent } from 'vue'
import { computed, ref, useTemplateRef, resolveComponent } from 'vue'

Check failure on line 10 in themes/theme-default/src/client/components/VPNavbar.vue

View workflow job for this annotation

GitHub Actions / build-check

Member 'resolveComponent' of the import declaration should be sorted alphabetically

Check failure on line 10 in themes/theme-default/src/client/components/VPNavbar.vue

View workflow job for this annotation

GitHub Actions / bundle-check

Member 'resolveComponent' of the import declaration should be sorted alphabetically
defineEmits<{
toggleSidebar: []
Expand All @@ -24,8 +24,8 @@ const SearchBox = hasGlobalComponent('SearchBox')
const themeLocale = useThemeLocaleData()
const navbar = ref<HTMLElement | null>(null)
const navbarBrand = ref<HTMLElement | null>(null)
const navbar = useTemplateRef<HTMLElement | null>('navbar')
const navbarBrand = useTemplateRef<HTMLElement | null>('navbar-brand')
const linksWrapperMaxWidth = ref(0)
const linksWrapperStyle = computed(() => {
Expand Down Expand Up @@ -71,7 +71,7 @@ useUpdateDeviceStatus(
<header ref="navbar" class="vp-navbar" vp-navbar>
<VPToggleSidebarButton @toggle="$emit('toggleSidebar')" />

<span ref="navbarBrand">
<span ref="navbar-brand">
<VPNavbarBrand />
</span>

Expand Down

0 comments on commit f0542cc

Please sign in to comment.