mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 07:23:34 +01:00
fix(webreader): incorrect page when going to next book
This commit is contained in:
parent
7898190ac4
commit
13760c5ef3
1 changed files with 7 additions and 10 deletions
|
|
@ -128,9 +128,13 @@ export default Vue.extend({
|
|||
},
|
||||
immediate: true,
|
||||
},
|
||||
currentPage(val, old) {
|
||||
this.$debug('[watch:currentPage]', `old:${old}`, `new:${val}`)
|
||||
this.$emit('update:page', val)
|
||||
carouselPage(val, old) {
|
||||
this.$debug('[watch:carouselPage', `old:${old}`, `new:${val}`)
|
||||
if (this.carouselPage >= 0 && this.carouselPage < this.spreads.length && this.spreads.length > 0) {
|
||||
this.$emit('update:page', this.spreads[this.carouselPage][0].number)
|
||||
} else {
|
||||
this.$emit('update:page', 1)
|
||||
}
|
||||
},
|
||||
page(val, old) {
|
||||
this.$debug('[watch:page]', `old:${old}`, `new:${val}`)
|
||||
|
|
@ -178,13 +182,6 @@ export default Vue.extend({
|
|||
currentSlide(): number {
|
||||
return this.carouselPage + 1
|
||||
},
|
||||
currentPage(): number {
|
||||
this.$debug('[currentPage]', `carouselPage:${this.carouselPage}`, `spreads.length:${this.spreads.length}`)
|
||||
if (this.carouselPage >= 0 && this.carouselPage < this.spreads.length && this.spreads.length > 0) {
|
||||
return this.spreads[this.carouselPage][0].number
|
||||
}
|
||||
return 1
|
||||
},
|
||||
slidesCount(): number {
|
||||
return this.spreads.length
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue