mirror of
https://github.com/ZiuChen/ZiuChen.github.io.git
synced 2025-12-20 09:45:38 +08:00
fix: 引入Vue组件 解决页内跳转404的错误
This commit is contained in:
31
docs/.vitepress/components/Title.vue
Normal file
31
docs/.vitepress/components/Title.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div class="title">
|
||||
<img :src="logo" alt="logo" style="margin: 0 auto" />
|
||||
<p style="text-align: center">{{ subTitle }}</p>
|
||||
<template v-for="item of linkList" :key="item.content">
|
||||
<Link :c="item.content" :t="item.target" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import Link from './Link.vue'
|
||||
|
||||
const props = defineProps({
|
||||
subTitle: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
logo: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
linkList: {
|
||||
type: Array as PropType<LinkList>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user