Skip to content

docs: add missing imports to defineModel parent examples - #3470

Open
Zoushen6 wants to merge 1 commit into
vuejs:mainfrom
Zoushen6:docs/define-model-example-imports-20260928
Open

Zoushen6 wants to merge 1 commit into
vuejs:mainfrom
Zoushen6:docs/define-model-example-imports-20260928

Conversation

@Zoushen6

Copy link
Copy Markdown

Description of Problem

The Parent.vue examples in the defineModel default-value warnings use
ref() and Child without importing them. Copying either example into an
SFC fails with ReferenceError: ref is not defined.

Proposed Solution

Import ref and Child in both examples, keeping the guide and API
reference consistent.

Additional Information

Validated both examples with Vue 3.5.32: the original snippets fail,
while the updated snippets render the child default value of 1 through
SSR without Vue warnings. Markdown/SFC parsing and git diff --check pass.

No site build or browser validation was run.

Import ref and Child in both parent examples so the documented default-value behavior can be reproduced.

Co-Authored-By: Codex <noreply@openai.com>
@netlify

netlify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit ae4e049
🔍 Latest deploy log https://app.netlify.com/projects/vuejs/deploys/6aba2fbd2f994b0007de7694
😎 Deploy Preview https://deploy-preview-3470--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 project configuration.

This branch has not been deployed

No deployments
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.

1 participant