-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathapp.vue
53 lines (48 loc) · 1.28 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<script setup lang="ts">
import { getRandomTheme, getThemeCSS } from './themes/utils'
import './style/index.css'
import { ThemeKey } from '~/types/symbol'
const currentTheme = ref(getRandomTheme())
const themeStyleChildren = computed(() => `:root ${getThemeCSS(currentTheme.value)}`)
provide(ThemeKey, currentTheme)
const route = useRoute()
const title = computed(() => route.meta.title)
useHead({
titleTemplate: (titleChunk) => {
return titleChunk
? `${titleChunk} - 软件部`
: '软件部 - 大学生创新创业综合实践基地'
},
htmlAttrs: {
lang: 'zh',
},
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content:
'width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0',
},
{
hid: 'description',
name: 'description',
content: '桂林电子科技大学创新创业综合实践基地软件部宣传及报名网站',
},
{ name: 'format-detection', content: 'telephone=no' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
})
</script>
<template>
<Head>
<Title>{{ title }}</Title>
<Style
type="text/css"
:children="themeStyleChildren"
/>
<Link rel="icon" />
</Head>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>