style: 优化大纲管理页面UI展示,增加structure大纲完整结构展示
This commit is contained in:
@@ -88,8 +88,8 @@ class OutlineUpdate(BaseModel):
|
||||
"""更新大纲的请求模型"""
|
||||
title: Optional[str] = None
|
||||
content: Optional[str] = None
|
||||
structure: Optional[str] = Field(None, description="结构化大纲数据(JSON)")
|
||||
# order_index 不允许通过普通更新修改,只能通过 reorder_outlines 接口批量调整
|
||||
# structure 暂不支持修改
|
||||
|
||||
|
||||
class OutlineResponse(BaseModel):
|
||||
|
||||
@@ -592,12 +592,17 @@ export default function Chapters() {
|
||||
|
||||
if (!currentProject) return null;
|
||||
|
||||
// 获取人称的中文显示文本
|
||||
// 获取人称的中文显示文本(同时支持中英文值)
|
||||
const getNarrativePerspectiveText = (perspective?: string): string => {
|
||||
const texts: Record<string, string> = {
|
||||
// 英文值映射(向后兼容)
|
||||
'first_person': '第一人称(我)',
|
||||
'third_person': '第三人称(他/她)',
|
||||
'omniscient': '全知视角',
|
||||
// 中文值映射(项目设置使用)
|
||||
'第一人称': '第一人称(我)',
|
||||
'第三人称': '第三人称(他/她)',
|
||||
'全知视角': '全知视角',
|
||||
};
|
||||
return texts[perspective || ''] || '第三人称(默认)';
|
||||
};
|
||||
@@ -2419,9 +2424,9 @@ export default function Chapters() {
|
||||
allowClear
|
||||
disabled={isGenerating}
|
||||
>
|
||||
<Select.Option value="first_person">第一人称(我)</Select.Option>
|
||||
<Select.Option value="third_person">第三人称(他/她)</Select.Option>
|
||||
<Select.Option value="omniscient">全知视角</Select.Option>
|
||||
<Select.Option value="第一人称">第一人称(我)</Select.Option>
|
||||
<Select.Option value="第三人称">第三人称(他/她)</Select.Option>
|
||||
<Select.Option value="全知视角">全知视角</Select.Option>
|
||||
</Select>
|
||||
{temporaryNarrativePerspective && (
|
||||
<div style={{ color: 'var(--color-success)', fontSize: 12, marginTop: 4 }}>
|
||||
|
||||
+888
-99
File diff suppressed because it is too large
Load Diff
@@ -193,7 +193,7 @@ export interface OutlineCreate {
|
||||
export interface OutlineUpdate {
|
||||
title?: string;
|
||||
content?: string;
|
||||
// structure 暂不支持修改
|
||||
structure?: string; // 支持修改structure字段
|
||||
// order_index 只能通过 reorder 接口批量调整
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user