debounce slider

This commit is contained in:
=
2020-07-06 16:51:37 +02:00
parent 78a5a2a7cd
commit 4df18c64a3
3 changed files with 9 additions and 3 deletions
+5
View File
@@ -16304,6 +16304,11 @@
"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==",
"dev": true
},
"ts-debounce": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-2.0.1.tgz",
"integrity": "sha512-+TztZrH7GnAD5CKxUohIAqIVHLrtivsYT7tZCLeRTCaBMSsfgYwprhA00kB/m0ezvYheOXJQqPfarAvgoayb7A=="
},
"ts-loader": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.2.1.tgz",
+2 -1
View File
@@ -34,7 +34,8 @@
"vue-smooth-dnd": "0.8.1",
"vue2-ace-editor": "0.0.15",
"vue2-datepicker": "3.4.1",
"vuex": "3.1.3"
"vuex": "3.1.3",
"ts-debounce": "2.0.1"
},
"devDependencies": {
"@babel/plugin-proposal-export-default-from": "7.8.3",
@@ -1,7 +1,7 @@
import Vue from "vue";
import Component from "vue-class-component";
import { Prop } from 'vue-property-decorator';
import { debounce } from "ts-debounce";
@Component({ name: "slider" })
export default class Slider extends Vue {
@@ -22,7 +22,7 @@ export default class Slider extends Vue {
}
set actualvalue(v: number) {
this.value.setpointHMI = v;
debounce(() => this.value.setpointHMI = v, 500)
}
get step() {