mirror of
https://github.com/Art051/it-tools.git
synced 2025-08-11 19:29:03 +00:00
chore: first commit
This commit is contained in:
39
src/App.vue
Normal file
39
src/App.vue
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user