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
@@ -2,6 +2,7 @@ import { ref, onMounted } 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;
const isMobile = ref(window.innerWidth <= 768);
@@ -162,11 +163,13 @@ async function handleReprocess(doc) {
catch { /* ignore */ }
}
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 链接
async function handleRegenerateLink() {