父组件调用子组件

 <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
    },

}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2020-04-07
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案