add chapter jump, change book image style,chapter description show

This commit is contained in:
Hu
2025-06-18 20:52:01 +08:00
parent 971a220018
commit 3ca6dcff44
4 changed files with 15 additions and 6 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules/
.history/
+3 -3
View File
@@ -1286,7 +1286,7 @@ const updateNovelInfo = async () => {
}
const editChapter = (chapter) => {
ElMessage.info('跳转到章节编辑页面')
router.push(`/writer?novelId=${selectedNovel.value.id}&chapterId=${chapter.id}`)
}
const generateDescription = async () => {
@@ -1473,7 +1473,7 @@ onMounted(() => {
.novels-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(14em, 1fr));
gap: 20px;
margin-bottom: 20px;
}
@@ -1497,7 +1497,7 @@ onMounted(() => {
.novel-cover {
position: relative;
height: 200px;
height:17em;
overflow: hidden;
border-radius: 8px 8px 0 0;
}
+3 -1
View File
@@ -549,7 +549,9 @@ onMounted(() => {
.settings-tabs {
min-height: 600px;
}
:deep(.settings-content .el-tabs__header){
padding-left: 1em;
}
.card-header {
display: flex;
justify-content: space-between;
+7 -2
View File
@@ -66,7 +66,7 @@
{{ getChapterStatusText(chapter.status) }}
</el-tag>
</div>
<p v-if="chapter.description" class="chapter-desc">{{ chapter.description }}</p>
<p v-if="chapter.description" class="chapter-desc">{{ chapter.description?chapter.description.slice(0, 50)+'...':'暂无章节描述'}}</p>
</div>
<div class="chapter-actions">
<el-dropdown @command="(cmd) => handleChapterAction(cmd, chapter)">
@@ -2338,7 +2338,7 @@ ${getOptimizeInstructions(optimizeType.value)}
console.log(`开始AI${optimizeTypeText}:`, prompt.substring(0, 200) + '...')
const aiResponse = await apiService.generateTextStream(prompt, {
maxTokens: Math.max(currentContent.length * 1.2, 1000),
maxTokens: Math.max(parseInt(currentContent.length * 1.2), 1000),
temperature: 0.3, // 优化时使用较低的温度,保持内容稳定
type: 'polish'
}, (chunk, fullContent) => {
@@ -5887,6 +5887,11 @@ const initNovel = () => {
ElMessage.error('缺少小说ID参数')
router.push('/novels')
}
// 跳转到章节
const chapterId = parseInt(route.query.chapterId)
if (chapterId) {
selectChapter(chapters.value.find(c => c.id === chapterId))
}
}
// 生命周期