Skip to content

为什么我无法在子组件为异步steup的时候,获取到子组件的方法 #9294

Discussion options

You must be logged in to vote
<script setup>
import { ref } from 'vue'

// 写到 await 的上面
let change = ref(null)
defineExpose({test: () => {change.value = 'change'}})

await wait();
async function wait () {}

</script>

see #4930

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by 2507483326
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants