Skip to content

Commit

Permalink
fix: page scroll display abnormal
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowangxiaowang256256 committed Mar 10, 2024
1 parent 527ca9c commit e3d4330
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useHead } from '@unhead/vue'
import { isShowMenu } from './utils/store-data'
useHead({
titleTemplate: (title) => (title ? `${title} | 开源面对面` : '开源面对面'),
Expand All @@ -9,7 +10,7 @@ useHead({
<template>
<app-header />
<ai-assistant />
<router-view v-slot="{ Component }">
<router-view v-slot="{ Component }" v-show="!isShowMenu">

Check warning on line 13 in src/App.vue

View workflow job for this annotation

GitHub Actions / lint

Attribute "v-show" should go before "v-slot"
<Transition>
<component :is="Component" />
</Transition>
Expand Down
4 changes: 1 addition & 3 deletions src/components/navbar/nav-hamburger.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script setup lang="ts">
import { menuList } from '../../utils/store-data'
const isShowMenu = ref(false)
import { menuList, isShowMenu } from '../../utils/store-data'

Check failure on line 2 in src/components/navbar/nav-hamburger.vue

View workflow job for this annotation

GitHub Actions / lint

Member 'isShowMenu' of the import declaration should be sorted alphabetically
</script>

<template>
Expand Down
2 changes: 0 additions & 2 deletions src/typings/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ declare module 'vue' {
AiAssistant: typeof import('./../components/ai-assistant.vue')['default']
AppFooter: typeof import('./../components/app-footer.vue')['default']
AppHeader: typeof import('./../components/app-header.vue')['default']
AppNav: typeof import('./../components/app-nav.vue')['default']
AppNavbar: typeof import('./../components/app-navbar.vue')['default']
AppNavFull: typeof import('./../components/app-nav-full.vue')['default']
Badge: typeof import('./../components/badge.vue')['default']
Components: typeof import('./../components/index.vue')['default']
ContributorContent: typeof import('./../components/contributor-content.vue')['default']
Expand Down
3 changes: 3 additions & 0 deletions src/utils/store-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ export const menuList = ref([{ name: 'Sponsors', href: '/sponsors' }])

/** isLargeScreen info */
export const isLargeScreen = useMediaQuery('(min-width: 600px)')

/** isShowMenu */
export const isShowMenu = ref(false)

0 comments on commit e3d4330

Please sign in to comment.