fix(theme): fix menu dropdown group dividers (#5365)

pull/5367/head
Bjorn Lu 4 weeks ago committed by GitHub
parent a422b22f3f
commit 49c84f570a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -11,7 +11,7 @@ defineProps<{
<template> <template>
<div class="VPMenu"> <div class="VPMenu">
<ul v-if="items" class="items"> <ul v-if="items" class="items">
<li v-for="item in items" :key="JSON.stringify(item)"> <template v-for="item in items" :key="JSON.stringify(item)">
<VPMenuLink v-if="'link' in item" :item /> <VPMenuLink v-if="'link' in item" :item />
<component <component
v-else-if="'component' in item" v-else-if="'component' in item"
@ -19,7 +19,7 @@ defineProps<{
v-bind="item.props" v-bind="item.props"
/> />
<VPMenuGroup v-else :text="item.text" :items="item.items" /> <VPMenuGroup v-else :text="item.text" :items="item.items" />
</li> </template>
</ul> </ul>
<slot /> <slot />

@ -9,13 +9,15 @@ defineProps<{
</script> </script>
<template> <template>
<div class="VPMenuGroup"> <li class="VPMenuGroup">
<p v-if="text" class="title">{{ text }}</p> <p v-if="text" class="title">{{ text }}</p>
<ul>
<template v-for="item in items" :key="JSON.stringify(item)"> <template v-for="item in items" :key="JSON.stringify(item)">
<VPMenuLink v-if="'link' in item" :item /> <VPMenuLink v-if="'link' in item" :item />
</template> </template>
</div> </ul>
</li>
</template> </template>
<style scoped> <style scoped>

@ -31,7 +31,7 @@ defineOptions({ inheritAttrs: false })
</script> </script>
<template> <template>
<div class="VPMenuLink"> <li class="VPMenuLink">
<VPLink <VPLink
v-bind="$attrs" v-bind="$attrs"
:class="{ active: isActiveLink }" :class="{ active: isActiveLink }"
@ -42,7 +42,7 @@ defineOptions({ inheritAttrs: false })
> >
<span v-html="item.text"></span> <span v-html="item.text"></span>
</VPLink> </VPLink>
</div> </li>
</template> </template>
<style scoped> <style scoped>

@ -32,7 +32,7 @@ const hasExtraContent = computed(
> >
<li class="trans-title">{{ currentLang.label }}</li> <li class="trans-title">{{ currentLang.label }}</li>
<li v-for="locale in localeLinks" :key="locale.link"> <template v-for="locale in localeLinks" :key="locale.link">
<VPMenuLink <VPMenuLink
:item="locale" :item="locale"
:external="false" :external="false"
@ -42,7 +42,7 @@ const hasExtraContent = computed(
:dir="locale.dir" :dir="locale.dir"
data-allow-mismatch="attribute" data-allow-mismatch="attribute"
/> />
</li> </template>
</ul> </ul>
<div <div

@ -20,7 +20,7 @@ const { localeLinks, currentLang } = useLangs({
<ul class="items"> <ul class="items">
<li class="title">{{ currentLang.label }}</li> <li class="title">{{ currentLang.label }}</li>
<li v-for="locale in localeLinks" :key="locale.link"> <template v-for="locale in localeLinks" :key="locale.link">
<VPMenuLink <VPMenuLink
:item="locale" :item="locale"
:external="false" :external="false"
@ -30,7 +30,7 @@ const { localeLinks, currentLang } = useLangs({
:dir="locale.dir" :dir="locale.dir"
data-allow-mismatch="attribute" data-allow-mismatch="attribute"
/> />
</li> </template>
</ul> </ul>
</VPFlyout> </VPFlyout>
</template> </template>

Loading…
Cancel
Save