Skip to content

Commit 3f20ebc

Browse files
committed
add var isMobile
1 parent 73fb1b2 commit 3f20ebc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/App.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
import { ref, computed } from 'vue'
2424
import { RouterLink, RouterView } from 'vue-router'
2525
26-
const navExpanded = ref(true)
27-
const navExpandedAni = ref(true)
26+
const isMobile = window.innerHeight > window.innerWidth
27+
28+
const navExpanded = ref(!isMobile)
29+
const navExpandedAni = ref(!isMobile)
2830
2931
const accounts = ref([
3032
{'email': 'user@example.com', 'boxes': ['Inbox', 'Sent', 'Junk', 'Trash']},

0 commit comments

Comments
 (0)