为什么拉动进度条的时候,进度条可以变化,页面也会跟着跳转,但是cfi显示未定义
来源:5-5 阅读进度功能实现(保存阅读进度功能)

慕设计3149553
2022-09-25
refreshLocation(){
//获取当前位置
const currentLocation = this.currentBook.rendition.currentLocation()
const startCfi = currentLocation.start.cfi
// 获取当前位置所在的百分比
const progress = this.currentBook.locations.percentageFromCfi(currentLocation.start.cfi)
this.setProgress(Math.floor(progress*100))
this.setSection(currentLocation.start.index)
//保存进度
saveLocation(this.fileName,startCfi)
},
写回答
4回答
-
扬_灵
2022-09-29
同学你好,你可以试一下下图写法
00 -
扬_灵
2022-09-28
同学你好,项目打开出现别的问题
012022-09-28 -
扬_灵
2022-09-27
同学你好,请问你这个阅读怎么进去
022022-09-27 -
扬_灵
2022-09-26
同学你好,你可以看一下这个方法是不是每个地方都调用了,如果都调用了,还有问题,你可以把你的代码上传到gitee或者GitHub,我们本地帮你测试一下
032022-09-26