8
This commit is contained in:
@@ -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 链接
|
||||
|
||||
Reference in New Issue
Block a user