feat:【antd】【ai】mindmap 的代码优化

This commit is contained in:
YunaiV
2025-10-26 15:16:09 +08:00
parent a35350d055
commit 4d388bdb04
8 changed files with 60 additions and 48 deletions

View File

@@ -19,12 +19,6 @@ const abortController = ref<AbortController>(); // // 写作进行中 abort 控
const rightRef = ref<InstanceType<typeof Right>>(); // 写作面板
/** 停止 stream 生成 */
function handleStopStream() {
abortController.value?.abort();
isWriting.value = false;
}
/** 提交写作 */
function handleSubmit(data: Partial<AiWriteApi.Write>) {
abortController.value = new AbortController();
@@ -55,6 +49,12 @@ function handleSubmit(data: Partial<AiWriteApi.Write>) {
});
}
/** 停止 stream 生成 */
function handleStopStream() {
abortController.value?.abort();
isWriting.value = false;
}
/** 点击示例触发 */
function handleExampleClick(type: keyof typeof WriteExample) {
writeResult.value = WriteExample[type].data;