diff --git a/app.js b/app.js index c3f91c2..9f8251e 100644 --- a/app.js +++ b/app.js @@ -10,6 +10,14 @@ var app = new Vue({ return this.counter >= 5 ? ">=5" : "<5" } }, + watch: { + counter(value){ + var vm = this; + setTimeout(function(){ + vm.counter = 0; + }, 2000) + } + }, computed: { output(){ console.log("computed");