Skip to content

feat(compiler-sfc): supports reference a variable in withDefaults - #6459

Closed
sxzz wants to merge 2 commits into
vuejs:mainfrom
sxzz:feat/with-defaults-ref
Closed

sxzz wants to merge 2 commits into
vuejs:mainfrom
sxzz:feat/with-defaults-ref

Conversation

@sxzz

@sxzz sxzz commented Aug 12, 2022

Copy link
Copy Markdown
Member
  • Support
import defaults from './some'
withDefaults(defineProps<{ foo: string }>(), defaults)

Existing plugin: https://github.com/Zolyn/vite-plugin-vue-with-defaults-imports
Inspired by @Zolyn

@netlify

netlify Bot commented Nov 9, 2022

Copy link
Copy Markdown

Deploy Preview for vuejs-coverage failed.

Name Link
🔨 Latest commit adfb68a
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/63d2b3833ee45800095e44ff

@yyx990803

yyx990803 commented Mar 28, 2023

Copy link
Copy Markdown
Member

We are deprecating withDefaults() in favor of reactive props destructure, so let's avoid complicating the codebase for it.

@yyx990803 yyx990803 closed this Mar 28, 2023
@sxzz
sxzz deleted the feat/with-defaults-ref branch March 28, 2023 03:22
@yyx990803

Copy link
Copy Markdown
Member

Landed in fe61944

IAmSSH pushed a commit to IAmSSH/core that referenced this pull request May 14, 2023
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.

3 participants