mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02: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,
|
immediate: true,
|
||||||
},
|
},
|
||||||
currentPage(val, old) {
|
carouselPage(val, old) {
|
||||||
this.$debug('[watch:currentPage]', `old:${old}`, `new:${val}`)
|
this.$debug('[watch:carouselPage', `old:${old}`, `new:${val}`)
|
||||||
this.$emit('update:page', 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) {
|
page(val, old) {
|
||||||
this.$debug('[watch:page]', `old:${old}`, `new:${val}`)
|
this.$debug('[watch:page]', `old:${old}`, `new:${val}`)
|
||||||
|
|
@ -178,13 +182,6 @@ export default Vue.extend({
|
||||||
currentSlide(): number {
|
currentSlide(): number {
|
||||||
return this.carouselPage + 1
|
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 {
|
slidesCount(): number {
|
||||||
return this.spreads.length
|
return this.spreads.length
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue