first commit
This commit is contained in:
50
node_modules/vitepress/dist/client/theme-default/components/VPNavScreenMenuGroupLink.vue
generated
vendored
Normal file
50
node_modules/vitepress/dist/client/theme-default/components/VPNavScreenMenuGroupLink.vue
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<script lang="ts" setup>
|
||||
import type { DefaultTheme } from 'vitepress/theme'
|
||||
import { computed, inject } from 'vue'
|
||||
import { useData } from '../composables/data'
|
||||
import { navInjectionKey } from '../composables/nav'
|
||||
import VPLink from './VPLink.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
item: DefaultTheme.NavItemWithLink
|
||||
}>()
|
||||
|
||||
const { page } = useData()
|
||||
|
||||
const href = computed(() =>
|
||||
typeof props.item.link === 'function'
|
||||
? props.item.link(page.value)
|
||||
: props.item.link
|
||||
)
|
||||
|
||||
const { closeScreen } = inject(navInjectionKey)!
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VPLink
|
||||
class="VPNavScreenMenuGroupLink"
|
||||
:href
|
||||
:target="item.target"
|
||||
:rel="item.rel"
|
||||
:no-icon="item.noIcon"
|
||||
@click="closeScreen"
|
||||
>
|
||||
<span v-html="item.text"></span>
|
||||
</VPLink>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.VPNavScreenMenuGroupLink {
|
||||
display: block;
|
||||
margin-left: 12px;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: var(--vp-c-text-1);
|
||||
transition: color 0.25s;
|
||||
}
|
||||
|
||||
.VPNavScreenMenuGroupLink:hover {
|
||||
color: var(--vp-c-brand-1);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user