mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-07 17:48:34 +08:00
docs: ✏️ 修复vitepress自定义footer展示错误的问题
This commit is contained in:
parent
39cc8c7d4a
commit
c0701d584e
@ -1,3 +1,12 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: weisheng
|
||||||
|
* @Date: 2024-01-07 00:46:50
|
||||||
|
* @LastEditTime: 2024-01-07 01:47:28
|
||||||
|
* @LastEditors: weisheng
|
||||||
|
* @Description:
|
||||||
|
* @FilePath: /wot-design-uni/docs/.vitepress/theme/components/CustomFooter.vue
|
||||||
|
* 记得注释
|
||||||
|
-->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useData } from 'vitepress/dist/client/theme-default/composables/data';
|
import { useData } from 'vitepress/dist/client/theme-default/composables/data';
|
||||||
import { useSidebar } from 'vitepress/dist/client/theme-default/composables/sidebar';
|
import { useSidebar } from 'vitepress/dist/client/theme-default/composables/sidebar';
|
||||||
@ -9,7 +18,7 @@ const { hasSidebar } = useSidebar()
|
|||||||
|
|
||||||
const copyright = computed(()=>{
|
const copyright = computed(()=>{
|
||||||
const isNetlify = typeof window !== 'undefined' ? window.location.href.includes('netlify') : false
|
const isNetlify = typeof window !== 'undefined' ? window.location.href.includes('netlify') : false
|
||||||
if (!isNetlify) {
|
if (isNetlify) {
|
||||||
return `${theme.value.footer.copyright} | <a style="text-decoration: none;" href="https://www.netlify.com">This site is powered by Netlify</a>`
|
return `${theme.value.footer.copyright} | <a style="text-decoration: none;" href="https://www.netlify.com">This site is powered by Netlify</a>`
|
||||||
}else{
|
}else{
|
||||||
return theme.value.footer.copyright
|
return theme.value.footer.copyright
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user