//Food组件(是一个一般组件,就是弹出来那个食物的图片)
父组件中调用子组件对象的方法:
1.要得到子组件对象
通过给子组件 指定ref="Food"
2.在子组件中定义自己的方法:
3.在需要调用的地方:
父向子传递使用props