Hanks10100 commented on issue #2228: [Android][iOS] [iOS] weex vue, 
this.$refs.xxx.ref, normal div is normal, but the div in components returns 
undefined
URL: https://github.com/apache/incubator-weex/issues/2228#issuecomment-477944041
 
 
   **It's an expected behavior.** Please refer to the official document of the 
`ref` attribute: https://vuejs.org/v2/api/#ref
   
   > The reference will be registered under the parent component’s $refs 
object. If used on a plain DOM element, the reference will be that element; if 
used on a child component, the reference will be component instance.
   
   The value of `this.$refs.xxx` depends where the `ref="xxx"` is.
   
   The `ref="demotwo"` is used on the weex element, so it contains the 
`this.$refs.demotwo.ref`.But the `ref="demo"` is used on the custom component 
of Vue, so the result of `this.$refs.demo` is a Vue component, not a weex 
element, it doesn't contains the `this.$refs.demo.ref` property.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to