Рефакторинг
This commit is contained in:
@@ -28,7 +28,7 @@ export default @Component({
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
sliderValue: function(newValue) {
|
sliderValue: function(newValue) {
|
||||||
this.debouncedEmitPosChange(newValue);
|
this.$emit('book-pos-changed', {bookPos: newValue});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -39,10 +39,6 @@ class SetPositionPage extends Vue {
|
|||||||
created() {
|
created() {
|
||||||
this.commit = this.$store.commit;
|
this.commit = this.$store.commit;
|
||||||
this.reader = this.$store.state.reader;
|
this.reader = this.$store.state.reader;
|
||||||
|
|
||||||
this.debouncedEmitPosChange = _.debounce((newValue) => {
|
|
||||||
this.$emit('book-pos-changed', {bookPos: newValue});
|
|
||||||
}, 300);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
formatTooltip(val) {
|
formatTooltip(val) {
|
||||||
|
|||||||
Reference in New Issue
Block a user