This commit is contained in:
syuilo 2018-06-12 02:18:29 +09:00
parent fd0c21bc51
commit 983cc26f9d

View file

@ -49,7 +49,8 @@ export default Vue.extend({
polylinePoints: '',
polygonPoints: '',
headX: null,
headY: null
headY: null,
clock: null
};
},
watch: {
@ -59,6 +60,12 @@ export default Vue.extend({
},
created() {
this.draw();
// VueWatch
this.clock = setInterval(this.draw, 1000);
},
beforeDestroy() {
clearInterval(this.clock);
},
methods: {
draw() {