feat: ai code
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user