细纲生成按大纲规划的每卷章数出章,大纲页可编辑计划章数
- volumes 表新增 chapter_count 列(增量迁移),应用大纲时落库保存 - 细纲生成目标章数优先级:大纲计划章数 > 卷内已有章节数 > 默认 10 - outline 路由支持手动设置 chapter_count;大纲页每卷卡片新增「计划章数」输入框
This commit is contained in:
@@ -48,6 +48,7 @@ export interface Volume {
|
||||
title: string
|
||||
summary: string
|
||||
sort: number
|
||||
chapter_count: number | null
|
||||
}
|
||||
|
||||
export interface Beat {
|
||||
|
||||
@@ -48,8 +48,19 @@ export default function OutlineView({
|
||||
<AutoSaveText value={v.title} onSave={(t) => saveVolume(v.id, { title: t })} placeholder="卷名" bordered={false} style={{ fontWeight: 700, fontSize: 15 }} />
|
||||
</div>
|
||||
<AutoSaveText value={v.summary} onSave={(s) => saveVolume(v.id, { summary: s })} multiline minRows={2} placeholder="本卷大纲:核心冲突、关键事件、结尾钩子" style={{ color: '#555' }} />
|
||||
<div style={{ marginTop: 6, color: '#bbb', fontSize: 12 }}>
|
||||
本卷 {bundle.chapters.filter((c) => c.volume_id === v.id).length} 章(生成细纲后自动创建)
|
||||
<div style={{ marginTop: 6, color: '#bbb', fontSize: 12, display: 'flex', alignItems: 'center', gap: 4, flexWrap: 'wrap' }}>
|
||||
<span>本卷已有 {bundle.chapters.filter((c) => c.volume_id === v.id).length} 章 · 计划章数</span>
|
||||
<AutoSaveText
|
||||
value={v.chapter_count ? String(v.chapter_count) : ''}
|
||||
onSave={(t) => {
|
||||
const n = parseInt(t, 10)
|
||||
saveVolume(v.id, { chapter_count: Number.isFinite(n) && n > 0 ? n : null })
|
||||
}}
|
||||
placeholder="自动"
|
||||
size="small"
|
||||
style={{ width: 64 }}
|
||||
/>
|
||||
<span>(生成细纲时按此数量出章;留空则按已有章节数,都没有时默认 10)</span>
|
||||
</div>
|
||||
</Card>
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user