//父传字 const car=ref("给子的数据") //子接收 defineProps(["car"]) function Callpage(){ console.log("test") } function save(){ emit("btSave",要返回的值) } //暴露方法给父调用 defineExpose({Callpage}) //返回给父组件值 const emit=defineEmits(["btSave"]) //父 const savetemp =ref("") function test(res){ console.log(res) savetemp.value.Callpage() }
下一篇:PHP健身微信小程序系统源码