问答详情
源自:-

在点击下一页、上一页和目录跳转的时候,进度百分比还是0

这块算是这个这个课程结束后后留下的问题吧,要去啃epubjs的文档才行

提问者:Gauss_ 2018-09-05 18:52

个回答

  • Sam
    2018-09-05 21:41:13
    已采纳

    这块功能需要自己动手实现,大致思路是在渲染后的继续获取定位信息,并进行百分比换算

    this.rendition.display().then(() => {
        // 获取定位信息
        const currentLocation = this.rendition.currentLocation()
        // 计算百分比
        // ...
    })


  • 面包与理想
    2019-01-17 16:57:14

    this.rendition.currentLocation()获取是不是空?楼主解决了?