父组件调用子组件的方法 子组件: <child id="child> methods:{ getF(){ console.log('我是子组件中的方法') } } 父组件:通过this.selectComponent(id) 获取子组件 this.selectComponent('#child').getF();