diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 5e99f20c28..c95fc5ece7 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -592,7 +592,7 @@ type: api ### watch -- **Type:** `{ [key: string]: string | Function | Object }` +- **Type:** `{ [key: string]: string | Function | Object | Array}` - **Details:** @@ -606,7 +606,12 @@ type: api a: 1, b: 2, c: 3, - d: 4 + d: 4, + e: { + f: { + g: 5 + } + } }, watch: { a: function (val, oldVal) { @@ -623,7 +628,13 @@ type: api d: { handler: function (val, oldVal) { /* ... */ }, immediate: true - } + }, + e: [ + function handle1 (val, oldVal) { /* ... */ }, + function handle2 (val, oldVal) { /* ... */ } + ], + // watch vm.e.f's value: {g: 5} + 'e.f': function (val, oldVal) { /* ... */ } } }) vm.a = 2 // => new: 2, old: 1