我用的自己下载的电子书资源,貌似出现了section对应的只有一级目录的,无论
refreshLocation () {
const currentLocation = this.currentBook.rendition.currentLocation()
const startCfi = currentLocation.start.cfi
const progress = this.currentBook.locations.percentageFromCfi(startCfi)
console.log('refresh', currentLocation)
this.setSection(currentLocation.start.index)
this.setProgress(Math.floor(progress * 100))
saveLocation(this.fileName, startCfi)
},//这里获取到的section
还是点击下一章或者上一章,都是切换的一级章节,导致与目录无法一一对应,让点击目录高亮和章节显示都有bug
github地址:https://github.com/shlroland/EBOOK