WebIndex/app.vue

29 lines
559 B
Vue
Raw Normal View History

2024-11-17 11:45:08 +08:00
<script setup lang="ts">
2025-01-13 21:51:37 +08:00
const loading = ref<HTMLDivElement | null>(null),
{ $mitt } = useNuxtApp()
2024-11-17 11:45:08 +08:00
2025-01-13 21:51:37 +08:00
$mitt.on('startLoading', (on) => {
2024-11-17 11:45:08 +08:00
if (on) {
loading.value?.classList.remove('stop')
removeMobileTopColor()
2025-01-13 21:51:37 +08:00
}
else {
2024-11-17 11:45:08 +08:00
loading.value?.classList.add('stop')
setMobileTopColor()
}
})
</script>
<template>
2025-01-13 21:51:37 +08:00
<div
ref="loading"
class="loading"
/>
2024-11-17 11:45:08 +08:00
<div class="relative flex min-h-screen flex-col overflow-hidden bg-blue-50">
2025-01-13 21:51:37 +08:00
<nav-bar />
<nuxt-page />
<footer-main />
<alert-notification />
2024-11-17 11:45:08 +08:00
</div>
2025-01-13 21:51:37 +08:00
</template>