Store page width in localStorage
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
772be9d1d1
commit
d02ae9dbb4
|
@ -58,6 +58,10 @@ export default {
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
API.getVolumeInfo(this.$route.params.id, info => (this.info = info))
|
API.getVolumeInfo(this.$route.params.id, info => (this.info = info))
|
||||||
|
|
||||||
|
if (localStorage.pageWidth) {
|
||||||
|
this.pageWidth = parseInt(localStorage.pageWidth)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setPage (page) {
|
setPage (page) {
|
||||||
|
@ -92,6 +96,7 @@ export default {
|
||||||
changePageWidth (change) {
|
changePageWidth (change) {
|
||||||
if (this.pageWidth + change > 0 && this.pageWidth + change <= 100) {
|
if (this.pageWidth + change > 0 && this.pageWidth + change <= 100) {
|
||||||
this.pageWidth += change
|
this.pageWidth += change
|
||||||
|
localStorage.pageWidth = this.pageWidth
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Reference in a new issue