We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1cb0d1 commit 0df12c5Copy full SHA for 0df12c5
src/v2/api/index.md
@@ -587,7 +587,7 @@ type: api
587
588
### watch
589
590
-- **类型**:`{ [key: string]: string | Function | Object }`
+- **类型**:`{ [key: string]: string | Function | Object | Array }`
591
592
- **详细**:
593
@@ -601,7 +601,12 @@ type: api
601
a: 1,
602
b: 2,
603
c: 3,
604
- d: 4
+ d: 4,
605
+ e: {
606
+ f: {
607
+ g: 5
608
+ }
609
610
},
611
watch: {
612
a: function (val, oldVal) {
@@ -618,7 +623,13 @@ type: api
618
623
d: {
619
624
handler: function (val, oldVal) { /* ... */ },
620
625
immediate: true
621
- }
626
+ },
627
+ e: [
628
+ function handle1 (val, oldVal) { /* ... */ },
629
+ function handle2 (val, oldVal) { /* ... */ }
630
+ ],
631
+ // watch vm.e.f's value: {g: 5}
632
+ 'e.f': function (val, oldVal) { /* ... */ }
622
633
}
634
})
635
vm.a = 2 // => new: 2, old: 1
0 commit comments