diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue
index 7a2aba3360417b6f5bc06c8ca83ec4d8eed0e9bd..3c192dd29d74d4a0e504e78eb8137ed82d345b5c 100644
--- a/src/components/dialoguePanel/DialoguePanel.vue
+++ b/src/components/dialoguePanel/DialoguePanel.vue
@@ -271,10 +271,18 @@ const handleMarkNumberClick = (event: MouseEvent) => {
let markCounter = 0; // 为每个标记生成唯一索引
const processMarkedContent = (content: string) => {
markCounter = 0; // 重置计数器
- return content.replace(/\[\[(\d+)\]\]/g, (_match, value) => {
- const uniqueId = `mark_${props.cid}_${markCounter++}`;
- return `${value} `;
+
+ const result = content.replace(/\[\[(\d+)\]\]/g, (_match, value) => {
+ const uniqueId = `mark_${props.cid}_${markCounter}`;
+ markCounter++;
+
+ const displayNumber = parseInt(value, 10);
+ const fileIndex = displayNumber - 1;
+
+ return `${value} `;
});
+
+ return result;
};
// 🔑 监听activeMarkId变化,更新DOM元素的激活状态