refactor: streamline props and emits definition in doc-content component
- Moved the definition of props and emits to a more appropriate location within the doc-content component for better readability and organization. - Removed duplicate prop and emit definitions to enhance code clarity. This update improves the structure of the component, making it easier to maintain and understand.main
parent
4a9977b11f
commit
eb2dc534ad
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue