@@@@@@
This commit is contained in:
28
src/App.vue
Normal file
28
src/App.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<vab-app v-show="show" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useSettingsStore } from '/@/store/modules/settings'
|
||||
|
||||
defineOptions({
|
||||
name: 'App',
|
||||
})
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const { updateTheme } = settingsStore
|
||||
const show = ref(false)
|
||||
|
||||
const resizeContainer = () => {
|
||||
let vh = window.innerHeight * 0.01
|
||||
const el = ref(null)
|
||||
useCssVar('--vh', el).value = `${vh}px`
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
updateTheme()
|
||||
window.addEventListener('orientationchange', resizeContainer)
|
||||
window.addEventListener('resize', resizeContainer)
|
||||
resizeContainer()
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user