Fixed #222 - CurrentPageReport is initially wrong

pull/227/head
cagataycivici 2020-03-04 12:29:46 +03:00
parent 3d964410df
commit ea5a27fa13
1 changed files with 4 additions and 16 deletions

View File

@ -12,22 +12,10 @@
default: '({currentPage} of {totalPages})'
}
},
data() {
return {
text: ''
}
},
watch: {
page() {
this.text = this.template
.replace("{currentPage}", this.page + 1)
.replace("{totalPages}", this.pageCount);
}
},
mounted() {
this.text = this.template
.replace("{currentPage}", this.page + 1)
.replace("{totalPages}", this.pageCount);
computed: {
text() {
return this.template.replace("{currentPage}", this.page + 1).replace("{totalPages}", this.pageCount);
}
}
}
</script>