ref 被用来给元素或子组件注册引用信息。 引用信息将会注册在父组件的 $refs 对象上。 <!-- `vm.$refs.p` ,组件中是this.$refs.p --><p ref="p">hello</p><!-- `vm.$refs.child` 组件中是this.$refs.child --><child-component ref="child"></child-component>