feat:增加AList博客
This commit is contained in:
37
docs/.vitepress/theme/components/MenuList.vue
Normal file
37
docs/.vitepress/theme/components/MenuList.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div v-if="isNested">
|
||||
<div v-for="category in props.routers.items" :key="category.text">
|
||||
<h3>{{ category.text }}</h3>
|
||||
<ul>
|
||||
<li v-for="item in category.items" :key="item.text">
|
||||
<a :href="withBase(item.link)">{{ item.text }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<ul>
|
||||
<li v-for="item in props.routers.items" :key="item.text">
|
||||
<a :href="withBase(item.link)">{{ item.text }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { withBase } from 'vitepress'
|
||||
import { defineProps } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
routers: {
|
||||
required: true,
|
||||
type: Object
|
||||
},
|
||||
isNested: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user