Skip to content

Commit

Permalink
fix: use sm-hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowangxiaowang256256 committed Mar 12, 2024
1 parent 43d59a4 commit 6977008
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/app-navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const toggleDark = useToggle(isDark)

<div class="content" flex flex-grow-1 items-center flex-justify-end>
<!-- menu -->
<NavMenu v-if="isLargeScreen" class="menu" />
<NavMenu v-if="isLargeScreen" />

<!-- search -->
<!-- <NavSearch /> -->
Expand All @@ -41,7 +41,7 @@ const toggleDark = useToggle(isDark)
</a>

<!-- collapsible menu -->
<NavHamburger v-if="!isLargeScreen" />
<NavHamburger />
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/components/navbar/nav-hamburger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import { isShowMenu, menuList } from '../../utils/store-data'
<div
ml-20px
cursor-pointer
sm-hidden
:i="isShowMenu ? 'carbon-close' : 'carbon-menu'"
text=" 2xl"
@click="isShowMenu = !isShowMenu"
/>
<div
v-if="isShowMenu"
v-show="isShowMenu"
style="background-color: var(--bg)"
flex="~ col"
fixed
Expand Down
2 changes: 1 addition & 1 deletion src/utils/store-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export const menuList = ref([{ name: '🩷 Sponsors', href: '/sponsors' }])

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

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

0 comments on commit 6977008

Please sign in to comment.