File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,20 @@ class Test extends Vue {
1313 this . $isServer ;
1414 }
1515
16+ // test property reification
17+ $refs : {
18+ vue : Vue ,
19+ element : HTMLInputElement ,
20+ vues : Vue [ ] ,
21+ elements : HTMLInputElement [ ]
22+ }
23+ testReification ( ) {
24+ this . $refs . vue . $data ;
25+ this . $refs . element . value ;
26+ this . $refs . vues [ 0 ] . $data ;
27+ this . $refs . elements [ 0 ] . value ;
28+ }
29+
1630 testMethods ( ) {
1731 this . $mount ( "#app" , false ) ;
1832 this . $forceUpdate ( ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export declare class Vue {
1919 readonly $parent : Vue ;
2020 readonly $root : Vue ;
2121 readonly $children : Vue [ ] ;
22- readonly $refs : { [ key : string ] : Vue } ;
22+ readonly $refs : { [ key : string ] : Vue | Element | Vue [ ] | Element [ ] } ;
2323 readonly $slots : { [ key : string ] : VNode [ ] } ;
2424 readonly $isServer : boolean ;
2525
You can’t perform that action at this time.
0 commit comments