Skip to content

Conversation

ayugioh2003
Copy link
Contributor

@ayugioh2003 ayugioh2003 commented Nov 7, 2024

Description of Problem

In the child component’s <script setup>, if defineExpose is called before an await operation, the parent component will not be able to access the exposed properties and methods.

refs

Proposed Solution

Add an explanation in the template-refs.md document to provide users with a workaround for this issue. If a PR later resolves this issue, update this document accordingly.

Additional Information

I spent several hours on this issue. If the document provides this solution, it will help many people

Copy link

netlify bot commented Nov 7, 2024

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 24b041f
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/6756d23a19e81600080773ca
😎 Deploy Preview https://deploy-preview-3097--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@NataliaTepluhina NataliaTepluhina merged commit dd5e8c8 into vuejs:main Dec 9, 2024
5 checks passed
szymonlicau referenced this pull request in vuejs-translations/docs-pl Dec 9, 2024
…097)

* docs: template-refs defineExpose before await

* Update src/guide/essentials/template-refs.md

---------

Co-authored-by: Natalia Tepluhina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants