1、当前组件引入将要调用方法所属的组件
这里我的当前组件要调用OrderDetail这个组件的check()方法
import Detail from "./detail.vue";
该方法定义在OrderDetail的methods属性中
2、当前组件通过该组件methods属性直接调用该方法
// 也可以调用 created、data等
Detail.methods.check();
1、当前组件引入将要调用方法所属的组件
这里我的当前组件要调用OrderDetail这个组件的check()方法
import Detail from "./detail.vue";
该方法定义在OrderDetail的methods属性中
2、当前组件通过该组件methods属性直接调用该方法
// 也可以调用 created、data等
Detail.methods.check();