aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-03-31 00:33:29 +0200
committerGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-03-31 00:33:29 +0200
commit64c92a661ccf1fb6a6482c5504db97dbcb003977 (patch)
treed6c11f07c766ffe72c2e54e802d4f86c33517c2a /src/App.vue
downloadit-tools-64c92a661ccf1fb6a6482c5504db97dbcb003977.tar.gz
it-tools-64c92a661ccf1fb6a6482c5504db97dbcb003977.tar.zst
it-tools-64c92a661ccf1fb6a6482c5504db97dbcb003977.zip
chore: first commit
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue39
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