有的呀,直接复制的老师仓库里的代码
```
display (location) {
console.log(location)
if (this.$refs.preview) {
if (!this.rendition) {
console.log(window.innerWidth, window.innerHeight)
this.rendition = this.book.renderTo('preview', {
width: window.innerWidth > 640 ? 640 : window.innerWidth,
height: window.innerHeight,
methods: 'default'
})
}
if (!location) {
return this.rendition.display()
} else {
return this.rendition.display(location)
}
}
},
```
可是epubjs渲染出来的DOM .epub-view 高度为0.不知道什么情况,对比了BookReader里面的代码,感觉也没哪里遗漏呀,可是preview就是显示不出来