摘要: 1.ref 在父组件中访问子组件实例,或者直接操作DOM元素时需要ref <input ref="ipt"> 通过this.$refs.ipt 得到此input $refs是非响应式的,不应该在模板中做数据绑定 2.自定义事件 $on $emit <!--使用v-on在html中监听--><my-c 阅读全文
posted @ 2018-04-22 09:59 慕东 阅读(134) 评论(0) 推荐(0)