子组件 修改父组件的属性值

父组件调用子组件

 <base_picker v-show="show2" :sendList="show2" @sendMessage="message"></base_picker>
子组件 用 props 获取父组件传递的值
使用 $emit 将修改的值传递给父组件

 props:['sendList','lable_list'],

  methods:{
    sendMsg() {
      this.$emit('sendMessage', false)
    },
    ok_http(){
      
    }
  }
进行事件更新展示
methods:{
 message(val){
        this.show2=val
    },

}
原文地址:https://www.cnblogs.com/wangshishuai/p/11459061.html