51 lines
982 B
Vue
51 lines
982 B
Vue
<script setup lang="ts">
|
|
import { NConfigProvider, NDialogProvider, NMessageProvider, dateZhCN, zhCN } from "naive-ui";
|
|
import { RouterView } from "vue-router";
|
|
import { useAppTheme } from "./theme";
|
|
|
|
const { theme, themeOverrides } = useAppTheme();
|
|
</script>
|
|
|
|
<template>
|
|
<n-config-provider :locale="zhCN" :date-locale="dateZhCN" :theme="theme" :theme-overrides="themeOverrides" size="small">
|
|
<n-message-provider>
|
|
<n-dialog-provider>
|
|
<RouterView />
|
|
</n-dialog-provider>
|
|
</n-message-provider>
|
|
</n-config-provider>
|
|
</template>
|
|
|
|
<style>
|
|
html,
|
|
body,
|
|
#app {
|
|
height: 100%;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
}
|
|
html {
|
|
color-scheme: light;
|
|
}
|
|
body {
|
|
background: #f6f8fa;
|
|
color: #1f2328;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
::selection {
|
|
background: #0969da;
|
|
color: #fff;
|
|
}
|
|
html.dark {
|
|
color-scheme: dark;
|
|
}
|
|
html.dark body {
|
|
background: #0d1117;
|
|
color: #e6edf3;
|
|
}
|
|
html.dark ::selection {
|
|
background: #4493f8;
|
|
color: #0d1117;
|
|
}
|
|
</style>
|