1.子组件改变父组件的值
<father label="云盘快照" name="name2">
<son :props='rows' @change="changestate">
</son>
</father >
父组件method中 changestate(e){ this.operation = e; }
子组件method中 this.$emit( 'change',传的值this.data.xxx);
1.1.父组件改子组件的值
projectOpera()父组件方法{ this.$refs.child.operationList (子组件中的值)= true; }
2.父传子
父:components: {'b-div': b} // 注册,只能在当前a组件里使用 <b-div :propsname='datas(向子组件传递的参数)'></b-div>
子:<template> <div>{{propsname}}</div> </template>
export default{ props: ['propsname'],
data(){} }