Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
437 views
in Technique[技术] by (71.8m points)

epubjs每个主题颜色一页只能更换一次,需要翻页才能换下一次

初始化主题是没问题的,会显示出来,我通过themes.register注册了四个样式,但是四个样式一页只能换一次,四个样式都换过以后,需要翻页后才能themes.select才会更换样式 希望可以指导一下,万分感谢

初始化

themes.forEach(theme => {
   this.rendition.themes.register(theme.name, theme.style)
})
this.rendition.themes.select(defaultTheme)

点击更换

setTheme (index) {
      const name = this.themeList[index].name
      this.setDefaultTheme(name).then(() => {
        this.rendition.themes.select(this.defaultTheme)
      })
      setTheme(this.fileName, name)
    }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

用0.3.71版本


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...