巴扎黑2017-04-17 16:39:42
The key of
ref is the same as the key you filled in. It will not be automatically converted into camel case. If you want to use camel case, just use ref="camelCase"
and it will be fine
巴扎黑2017-04-17 16:39:42
HTML features are not case sensitive. Therefore, when using a template other than a string template, camelCased (camel case) named props need to be converted to the corresponding kebab-case (dash separated) names:
<child my-message="hello!"></child>
What needs kebab-case is the html feature prop, not the value you bind later. You have bound the 'menu-wrapper' name to the ref of the node. Of course, you must reference it through this.$refs.menu-wrapper