修改分享传递参数,清理注释

This commit is contained in:
2025-08-10 16:38:55 +08:00
parent 3b9fae1eea
commit 06de0f2b33
2 changed files with 15 additions and 44 deletions

View File

@@ -98,37 +98,6 @@ const links = computed(() => {
return [...links, ...(appConfig.toc?.bottom?.links || [])].filter(Boolean)
})
// // ===== 微信分享(测试按钮用)=====
// const wxShareActive = ref(false)
// // const contentRoot = ref<HTMLElement | null>(null)
// const shareLink = computed(() => 'https://lijue.me' + decodeURIComponent(path.value))
// const shareTitle = computed(() => title)
// const shareDesc = computed(() => description || title)
// const shareImg = page?.value?.img
// const shareImg = ref<string>('/images/default-blog.jpg')
// onMounted(() => {
// // 从正文中抓取第一张图片作为分享图
// const el = contentRoot.value
// const firstImg = el?.querySelector('img') as HTMLImageElement | null
// if (firstImg?.src) {
// shareImg.value = firstImg.src
// }
// })
// // Toast点击测试分享后给出指引
// const toast = useToast()
// function handleShareClick() {
// wxShareActive.value = true
// toast.add({
// title: '已获取分享接口',
// description: '点击右上角分享吧',
// duration: 3000,
// icon: 'i-lucide-share-2'
// })
// }
</script>
<template>
@@ -156,7 +125,11 @@ const links = computed(() => {
v-bind="link"
/>
<DocsPageHeaderLinks />
<DocsPageHeaderLinks
:title="page.title"
:desc="page.description || page.seo?.description || page.title"
:img-url="page.img || '/images/default-blog.jpg'"
/>
</template>
</UPageHeader>
@@ -192,16 +165,6 @@ const links = computed(() => {
>
提交问题
</UButton>
<!-- <UButton
variant="link"
color="neutral"
icon="lucide-share-2"
:ui="{ leadingIcon: 'size-4' }"
@click="handleShareClick()"
>
微信分享
</UButton> -->
</div>
</USeparator>
<UContentSurround :surround="surround" />