2020年4月23日

vue-组件之间互相出发事件

摘要: 1.子组件出发父组件事件 子组件触发:@click="$emit('cancel')" 父组件传入:@cancel="showModal=false" 2.父组件触发子组件事件 父组件:<child ref="mychild"></child> this.$refs.mychild.parentHa 阅读全文

posted @ 2020-04-23 10:04 秃了头也不退休 阅读(1534) 评论(0) 推荐(0) 编辑

导航