1. 第一种方法
父组件调用
假设 接口方法 handle() { ........... 对应的需求代码 },
子组件
根据业务 需求
假设 子组件 接口方法成功之后 调用父组件 handle 方法
APIall.then((res) => { this.$emit("resetload"); // 重新加载接口数据 });
this.$emit("resetload");
2. 直接 使用 this.$ref.handle() 方法使用 前提父组件上有 ref 方法
借鉴文章https://blog.csdn.net/qq_32766999/article/details/126030742