diff options
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..c7c24ef --- /dev/null +++ b/src/App.vue @@ -0,0 +1,39 @@ +<script setup lang="ts"> +import { RouterView } from 'vue-router' +import { layouts } from './layouts'; +import { computed } from 'vue'; +import { useRoute } from 'vue-router' + +import { + NConfigProvider, + NGlobalStyle, +} from 'naive-ui' + +const route = useRoute(); +const layout = computed(() => route?.meta?.layout ?? layouts.base) +</script> + +<template> + <n-config-provider> + <n-global-style /> + <component :is="layout"> + <router-view /> + </component> + </n-config-provider> +</template> + +<style> +body { + min-height: 100%; + margin: 0; + padding: 0; +} +html { + height: 100%; + margin: 0; + padding: 0; +} +* { + box-sizing: border-box; +} +</style>
\ No newline at end of file |