From 2fbad4602549cc0d48be9e9f1e792f5a1e37fd0b Mon Sep 17 00:00:00 2001 From: xufanglu <3146974+likev@users.noreply.github.com> Date: Thu, 18 Mar 2021 18:23:20 +0800 Subject: [PATCH 1/3] Update options-data.md from Vue.js 2.x you can not just watch an expression https://github.com/vuejs/vue/issues/844#issuecomment-271144849 --- src/api/options-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/options-data.md b/src/api/options-data.md index be72eb6f27..0c91310d26 100644 --- a/src/api/options-data.md +++ b/src/api/options-data.md @@ -177,7 +177,7 @@ - **Details:** - An object where keys are expressions to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options. + An object where keys are data properties or computed properties to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options. - **Example:** From b9ecdfcdfcb156e1a4b32a00a508c6c49ad459a5 Mon Sep 17 00:00:00 2001 From: xufanglu <3146974+likev@users.noreply.github.com> Date: Sat, 20 Mar 2021 17:13:57 +0800 Subject: [PATCH 2/3] Update src/api/options-data.md Co-authored-by: Ben Hong --- src/api/options-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/options-data.md b/src/api/options-data.md index 0c91310d26..cb7b45b5c2 100644 --- a/src/api/options-data.md +++ b/src/api/options-data.md @@ -177,7 +177,7 @@ - **Details:** - An object where keys are data properties or computed properties to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options. + An object where keys are reactive properties — examples include [data](/api/options-data.html#data-2) or [computed](/api/options-data.html#computed) properties — to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options. - **Example:** From d9790a82f62c1f4baf8380fc729e22824d115bf0 Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Sun, 4 Apr 2021 14:33:41 -0400 Subject: [PATCH 3/3] docs: improve phrasing --- src/api/options-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/options-data.md b/src/api/options-data.md index cb7b45b5c2..7c5425563f 100644 --- a/src/api/options-data.md +++ b/src/api/options-data.md @@ -177,7 +177,7 @@ - **Details:** - An object where keys are reactive properties — examples include [data](/api/options-data.html#data-2) or [computed](/api/options-data.html#computed) properties — to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options. + An object where keys are reactive properties to watch — examples include [data](/api/options-data.html#data-2) or [computed](/api/options-data.html#computed) properties — and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options. - **Example:**