Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

refactor: streamline props and emits definition in doc-content component

wizardcheneb2dc534ad2c
diff --git a/frontend/src/components/doc-content.vue b/frontend/src/components/doc-content.vue
index ca4a0a71c..15baa2e5b 100644
--- a/frontend/src/components/doc-content.vue
+++ b/frontend/src/components/doc-content.vue
@@ -45,6 +45,8 @@ mermaid.initialize({
topPadding: 50
}
});
+const props = defineProps(["visible", "details", "knowledgeType", "sourceInfo"]);
+const emit = defineEmits(["closeDoc", "getDoc", "questionDeleted"]);
marked.use({
mangle: false,
@@ -205,9 +207,6 @@ renderer.code = function (code, infostring) {
</div>
`;
};
-const props = defineProps(["visible", "details", "knowledgeType", "sourceInfo"]);
-const emit = defineEmits(["closeDoc", "getDoc", "questionDeleted"]);
-
// 监听 chunks 变化,自动更新合并内容
watch(() => props.details?.md, (newChunks) => {
if (newChunks && newChunks.length > 0) {