feat(theme): add footer-content slot (#299)

This commit is contained in:
pengzhanbo 2024-10-21 00:20:29 +08:00 committed by GitHub
parent 8154a4f55c
commit 3f7fa4133c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 14 deletions

View File

@ -24,18 +24,20 @@ onMounted(() => {
:class="{ 'has-sidebar': hasSidebar }"
vp-footer
>
<div class="container">
<p
v-if="theme.footer.message"
class="message"
v-html="theme.footer.message"
/>
<p
v-if="theme.footer.copyright"
class="copyright"
v-html="theme.footer.copyright"
/>
</div>
<slot name="footer-content">
<div class="container">
<p
v-if="theme.footer.message"
class="message"
v-html="theme.footer.message"
/>
<p
v-if="theme.footer.copyright"
class="copyright"
v-html="theme.footer.copyright"
/>
</div>
</slot>
</footer>
</template>

View File

@ -171,7 +171,11 @@ useCloseSidebarOnEscape(isSidebarOpen, closeSidebar)
</VPContent>
</slot>
<VPBackToTop />
<VPFooter />
<VPFooter>
<template #footer-content>
<slot name="footer-content" />
</template>
</VPFooter>
<slot name="layout-bottom" />
</template>

View File

@ -60,7 +60,11 @@ const { theme } = useData()
</div>
</slot>
</div>
<VPFooter />
<VPFooter>
<template #footer-content>
<slot name="footer-content" />
</template>
</VPFooter>
<slot name="layout-bottom" />
</div>
</template>