s2e24 watching for changes setTimeout
This commit is contained in:
parent
8ac77e11d5
commit
d3bdeee2a3
8
app.js
8
app.js
|
@ -10,6 +10,14 @@ var app = new Vue({
|
||||||
return this.counter >= 5 ? ">=5" : "<5"
|
return this.counter >= 5 ? ">=5" : "<5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
counter(value){
|
||||||
|
var vm = this;
|
||||||
|
setTimeout(function(){
|
||||||
|
vm.counter = 0;
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
output(){
|
output(){
|
||||||
console.log("computed");
|
console.log("computed");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user