From 696f72ce2581a8becafd37089ab6f56fcc06f3f6 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 18 Jan 2019 14:12:40 +0100 Subject: [PATCH] Add comments about $watch behavior with a function (#1946) --- src/v2/api/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 1e501b13a..667a5181a 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -1488,6 +1488,9 @@ updated: 2018-12-26 // 関数 vm.$watch( function () { + // everytime the expression `this.a + this.b` yields a different result, + // the handler will be called. It's as if we were watching a computed + // property without defining the computed property itself return this.a + this.b }, function (newVal, oldVal) {