增加作品总章节状态显示
All checks were successful
Build / build-and-test (push) Successful in 36s

[Base]
更新依赖
This commit is contained in:
2025-05-28 13:35:57 +08:00
parent 7e0087a7db
commit 51b20c860f
4 changed files with 167 additions and 155 deletions

View File

@ -23,6 +23,7 @@ export const useWorkReadState = defineStore('workRead', () => {
const lang = ref(null)
const chapters = ref([])
const chapterIndex = ref(null)
const chapterStat = ref(null)
function setData(data) {
cid.value = data.chapterId
id.value = data.workId
@ -39,6 +40,7 @@ export const useWorkReadState = defineStore('workRead', () => {
lang.value = data.lang
chapters.value = data.chapters || []
chapterIndex.value = data.chapterIndex ?? null
chapterStat.value = data.stats.chapter
}
async function loadWork(target, targetc) {
const itarget = parseInt(target)
@ -81,6 +83,7 @@ export const useWorkReadState = defineStore('workRead', () => {
lang,
chapters,
chapterIndex,
chapterStat,
setData,
loadWork
}