摘要: VUE 是单向数据流 当我们需要对一个 prop 进行“双向绑定”时 vue 修饰符.sync 子组件:this.$emit('update:visible', visible), 使用update:my-prop-name 的模式触发事件 父组件: isVisible=val"> //简写 子组件: this.$emit("update:visible", true); ... 阅读全文
posted @ 2018-09-26 08:49 conglvse 阅读(9436) 评论(0) 推荐(0) 编辑