feat: ai code

This commit is contained in:
xingyu4j
2025-10-22 14:52:42 +08:00
parent 7aacec3e69
commit 66647802af
26 changed files with 148 additions and 181 deletions

View File

@@ -27,7 +27,7 @@ defineExpose({
<h3 class="text-primary h-7 w-full text-center text-xl leading-7">
思维导图创作中心
</h3>
<div class="flex-grow overflow-y-auto">
<div class="mt-4 flex-grow overflow-y-auto">
<div>
<b>您的需求</b>
<Textarea

View File

@@ -73,7 +73,7 @@ watch(props, ({ generatedContent, isGenerating, isEnd, isStart }) => {
});
/** 更新思维导图的展示 */
const update = () => {
function update() {
try {
const { root } = transformer.transform(
processContent(props.generatedContent),
@@ -83,7 +83,7 @@ const update = () => {
} catch (error: any) {
console.error(error);
}
};
}
/** 处理内容 */
function processContent(text: string) {
const arr: string[] = [];