How to access App.vue from another component?

后端 未结 2 1249
青春惊慌失措
青春惊慌失措 2020-12-21 17:29

in my app written with VueJs 2, I have into the Vue.app this code:

export default {
  name: \'app\',
  data () {
    return {
      title: \'Gestione fornito         


        
2条回答
  •  不知归路
    2020-12-21 18:06

    • Use props to communicate data from parent to child.

    • Emit events to communicate from child to parent

    Parent.vue

        
    
        
    

    Child.vue

    
    
    
    • if you feel communicating through props results in tight coupling, then the more convenient approach would be using eventBus

提交回复
热议问题