Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(define-prop): support reactivity-transform #510

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

zhiyuanzmj
Copy link
Member

@zhiyuanzmj zhiyuanzmj commented Sep 22, 2023

Description

<script setup lang="ts">
// Kevin's Edition
const foo = defineProp<string>()
const bar = $defineProp('bar', { default: 'bar', required: true })
const baz = $(defineProp('baz', { default: 'baz' }))
console.log(foo.value, bar, baz)

// Johnson's Edition
const foo = defineProp<string>()
const bar = $defineProp(() => 'bar', true)
const baz = $(defineProp('baz'))
console.log(foo.value, bar, baz)
</script>

Linked Issues

closed: #511

Additional context

@stackblitz
Copy link

stackblitz bot commented Sep 22, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2023

🦋 Changeset detected

Latest commit: aab6d84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@vue-macros/volar Minor
@vue-macros/define-prop Patch
@vue-macros/common Patch
@vue-macros/nuxt Patch
unplugin-vue-macros Patch
@vue-macros/api Patch
@vue-macros/better-define Patch
@vue-macros/boolean-prop Patch
@vue-macros/chain-call Patch
@vue-macros/define-emit Patch
@vue-macros/define-models Patch
unplugin-vue-define-options Patch
@vue-macros/define-props-refs Patch
@vue-macros/define-props Patch
@vue-macros/define-render Patch
@vue-macros/define-slots Patch
@vue-macros/export-expose Patch
@vue-macros/export-props Patch
@vue-macros/export-render Patch
@vue-macros/hoist-static Patch
@vue-macros/jsx-directive Patch
@vue-macros/named-template Patch
@vue-macros/reactivity-transform Patch
@vue-macros/setup-block Patch
@vue-macros/setup-component Patch
@vue-macros/setup-sfc Patch
@vue-macros/short-bind Patch
@vue-macros/short-emits Patch
@vue-macros/short-vmodel Patch
@vue-macros/astro Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zhiyuanzmj zhiyuanzmj changed the title feat: add $defineProp feat(define-prop): support reactivity-transform Sep 22, 2023
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 21, 2024
Copy link

vercel bot commented May 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
vue-macros ❌ Failed (Inspect) May 21, 2024 8:36am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add $defineProp
1 participant