fix:修复小说保存与列表刷新
- ShortNovelServiceImpl:累积 novel_delta 事件,novel_done 未携带 full_text 时用累积内容兜底 - ScriptLibraryView:onMounted 主动拉取最新剧本,解决生成后列表不刷新问题
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { computed, ref, watch, onMounted } from 'vue'
|
||||
import { useAppStore } from '../../stores/app.js'
|
||||
import { toggleFavoriteScript, checkFavoriteScript } from '../../services/epicScript.js'
|
||||
|
||||
@@ -148,6 +148,12 @@ const activeMenuId = ref('')
|
||||
const deleteTarget = ref(null)
|
||||
const deletingScript = ref(false)
|
||||
|
||||
// 每次打开历史列表(组件挂载)时主动拉取最新剧本,避免显示 store 旧缓存
|
||||
// 解决:生成完小说后打开历史列表看不到最新记录的问题
|
||||
onMounted(() => {
|
||||
store.fetchScripts()
|
||||
})
|
||||
|
||||
// 固定 5 个分类标签:全部 / 短篇 / 中篇 / 长篇 / 收藏夹
|
||||
const typeTabs = [
|
||||
{ label: '全部', value: 'all' },
|
||||
|
||||
Reference in New Issue
Block a user