mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-27 21:17:39 +08:00
feat: fix menu show
This commit is contained in:
@@ -24,13 +24,10 @@ import GlobalPopups from '~/components/GlobalPopups.vue'
|
|||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
components: { HeaderComponent, MenuComponent, GlobalPopups },
|
components: { HeaderComponent, MenuComponent, GlobalPopups },
|
||||||
data() {
|
setup() {
|
||||||
return {
|
const isMobile = useIsMobile()
|
||||||
menuVisible: true
|
const menuVisible = ref(!isMobile.value)
|
||||||
}
|
const hideMenu = computed(() => {
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
hideMenu() {
|
|
||||||
return [
|
return [
|
||||||
'/login',
|
'/login',
|
||||||
'/signup',
|
'/signup',
|
||||||
@@ -41,15 +38,17 @@ export default {
|
|||||||
'/discord-callback',
|
'/discord-callback',
|
||||||
'/forgot-password',
|
'/forgot-password',
|
||||||
'/google-callback'
|
'/google-callback'
|
||||||
].includes(this.$route.path)
|
].includes(useRoute().path)
|
||||||
}
|
})
|
||||||
},
|
|
||||||
async mounted() {
|
onMounted(() => {
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
this.menuVisible = window.innerWidth > 768
|
menuVisible.value = window.innerWidth > 768
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return { menuVisible, hideMenu }
|
||||||
},
|
},
|
||||||
methods: {}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style src="~/assets/global.css"></style>
|
<style src="~/assets/global.css"></style>
|
||||||
|
|||||||
Reference in New Issue
Block a user