修改分享传递参数,清理注释
This commit is contained in:
@@ -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" />
|
||||
|
Reference in New Issue
Block a user