Добавил правильный on-resize
This commit is contained in:
@@ -103,6 +103,9 @@ class App extends Vue {
|
|||||||
document.addEventListener('keydown', (event) => {
|
document.addEventListener('keydown', (event) => {
|
||||||
this.keyHook(event);
|
this.keyHook(event);
|
||||||
});
|
});
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
this.$root.$emit('resize');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ class Reader extends Vue {
|
|||||||
|
|
||||||
toolBarToggle() {
|
toolBarToggle() {
|
||||||
this.commit('reader/setToolBarActive', !this.toolBarActive);
|
this.commit('reader/setToolBarActive', !this.toolBarActive);
|
||||||
|
this.$root.$emit('resize');
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonClick(button) {
|
buttonClick(button) {
|
||||||
|
|||||||
@@ -38,9 +38,7 @@ class TextPage extends Vue {
|
|||||||
this.$emit('book-pos-changed', {bookPos: newValue});
|
this.$emit('book-pos-changed', {bookPos: newValue});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
window.addEventListener('resize', () => {
|
this.$root.$on('resize', () => {this.$nextTick(this.onResize)});
|
||||||
this.onResize();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
Reference in New Issue
Block a user