改回项目内获取md文档
Some checks failed
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / build (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
2025-08-08 12:15:35 +08:00
parent 9e8a7f5c14
commit be69a51bb2
64 changed files with 7343 additions and 14 deletions

View File

@@ -5,8 +5,12 @@ const route = useRoute()
const toast = useToast()
const { copy, copied } = useClipboard()
const mdcLink = computed(() => `${window?.location?.origin}${decodeURIComponent(route.path)}`)
const markdownLink = computed(() => `${window?.location?.origin}/raw${decodeURIComponent(route.path)}.md`)
// SSR 安全:不要直接使用 window改用 useRequestURL().origin
const requestURL = useRequestURL()
const origin = computed(() => requestURL.origin)
const mdcLink = computed(() => `${origin.value}${decodeURIComponent(route.path)}`)
const markdownLink = computed(() => `${origin.value}/raw${decodeURIComponent(route.path)}.md`)
const items = [
{