This commit is contained in:
amb
2026-09-02 07:57:39 +08:00
parent 2d42b0e73d
commit 410bd30b2e
5 changed files with 90 additions and 7 deletions
+6 -3
View File
@@ -3,6 +3,7 @@ import { ref, onMounted, computed } from 'vue'
import { useRoute } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
import apiClient from '@/api/client'
import { copyToClipboard } from '@/utils/clipboard'
const route = useRoute()
const kbId = route.params.id as string
@@ -173,10 +174,12 @@ async function handleReprocess(doc: any) {
}
async function handleCopyLink() {
try {
await navigator.clipboard.writeText(aiUrl.value)
const success = await copyToClipboard(aiUrl.value)
if (success) {
ElMessage.success('AI 链接已复制!')
} catch { /* ignore */ }
} else {
ElMessage.error('复制失败,请手动长按复制。')
}
}
// 重新生成 AI 链接