Поправка
This commit is contained in:
@@ -18,7 +18,7 @@ import bookManager from '../share/bookManager';
|
|||||||
export default @Component({
|
export default @Component({
|
||||||
watch: {
|
watch: {
|
||||||
bookPos: function(newValue) {
|
bookPos: function(newValue) {
|
||||||
this.$emit('book-pos-changed', {bookPos: newValue});
|
this.debouncedEmitPosChange(newValue);
|
||||||
this.drawPage();
|
this.drawPage();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -36,6 +36,10 @@ class TextPage extends Vue {
|
|||||||
this.dispatch = this.$store.dispatch;
|
this.dispatch = this.$store.dispatch;
|
||||||
this.config = this.$store.state.config;
|
this.config = this.$store.state.config;
|
||||||
this.reader = this.$store.state.reader;
|
this.reader = this.$store.state.reader;
|
||||||
|
|
||||||
|
this.debouncedEmitPosChange = _.debounce((newValue) => {
|
||||||
|
this.$emit('book-pos-changed', {bookPos: newValue});
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
showBook() {
|
showBook() {
|
||||||
|
|||||||
Reference in New Issue
Block a user