11<template >
2- <Layout :class = " extra " >
2+ <Layout >
33 <template v-if =" frontmatter .layout === ' schema' " #sidebar-nav-before >
4- <VPNavBarTitle ></VPNavBarTitle >
54 <div class =" group" >
65 <VPSidebarItem :item =" navItem" :depth =" 0" ></VPSidebarItem >
76 </div >
1413
1514<script lang="ts" setup>
1615
17- import { Layout } from ' @cordisjs/ vitepress/client '
16+ import DefaultTheme from ' vitepress/theme '
1817import { useData } from ' vitepress'
1918import { computed , provide , watch } from ' vue'
2019import { useI18n } from ' vue-i18n'
2120import { getSorted , kConfig , MarketFilter } from ' @koishijs/market'
22- import VPNavBarTitle from ' @theme-default/components/VPNavBarTitle.vue'
2321import VPSidebarItem from ' @theme-default/components/VPSidebarItem.vue'
24- import { home , market , words } from ' ./utils'
22+ import { market , words } from ' ./utils'
23+
24+ const Layout = DefaultTheme .Layout
2525
2626provide (kConfig , {
2727 portable: true ,
@@ -36,15 +36,9 @@ watch(localeIndex, () => {
3636
3737const navItem = computed (() => ({
3838 text: theme .value .navText || ' 导航' ,
39- items: theme .value .nav .filter (item => item .link ),
39+ items: theme .value .nav .filter (( item : any ) => item .link ),
4040}))
4141
42- const extra = computed (() => {
43- if (frontmatter .value .layout === ' home' ) {
44- return [` parity- ` + (Math .round (home .position .value ) % 2 ? ' odd' : ' even' )]
45- }
46- })
47-
4842 </script >
4943
5044<style lang="scss">
0 commit comments