fix:1.修复章节规划预览窗口UI显示问题
2.修复部分端点删除章节后字数没有更新的问题
This commit is contained in:
@@ -127,3 +127,7 @@ body {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tabs-dropdown {
|
||||
z-index: 2000 !important;
|
||||
}
|
||||
|
||||
+221
-203
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,13 @@ import { useOutlineSync } from '../store/hooks';
|
||||
import { cardStyles } from '../components/CardStyles';
|
||||
import { SSEPostClient } from '../utils/sseClient';
|
||||
import { SSEProgressModal } from '../components/SSEProgressModal';
|
||||
import { outlineApi, chapterApi } from '../services/api';
|
||||
import { outlineApi, chapterApi, projectApi } from '../services/api';
|
||||
import type { OutlineExpansionResponse, BatchOutlineExpansionResponse } from '../types';
|
||||
|
||||
const { TextArea } = Input;
|
||||
|
||||
export default function Outline() {
|
||||
const { currentProject, outlines } = useStore();
|
||||
const { currentProject, outlines, setCurrentProject } = useStore();
|
||||
const [isGenerating, setIsGenerating] = useState(false);
|
||||
const [editForm] = Form.useForm();
|
||||
const [generateForm] = Form.useForm();
|
||||
@@ -142,8 +142,12 @@ export default function Outline() {
|
||||
try {
|
||||
await deleteOutline(id);
|
||||
message.success('删除成功');
|
||||
// 删除后刷新大纲列表,确保显示最新的顺序
|
||||
// 删除后刷新大纲列表和项目信息,更新字数显示
|
||||
await refreshOutlines();
|
||||
if (currentProject?.id) {
|
||||
const updatedProject = await projectApi.getProject(currentProject.id);
|
||||
setCurrentProject(updatedProject);
|
||||
}
|
||||
} catch {
|
||||
message.error('删除失败');
|
||||
}
|
||||
@@ -745,7 +749,12 @@ export default function Outline() {
|
||||
await Promise.all(deletePromises);
|
||||
|
||||
message.success(`已删除《${outlineTitle}》展开的所有 ${chapters.length} 个章节`);
|
||||
refreshOutlines();
|
||||
await refreshOutlines();
|
||||
// 刷新项目信息以更新字数显示
|
||||
if (currentProject?.id) {
|
||||
const updatedProject = await projectApi.getProject(currentProject.id);
|
||||
setCurrentProject(updatedProject);
|
||||
}
|
||||
} catch (error: any) {
|
||||
message.error(error.response?.data?.detail || '删除章节失败');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user