Closed johnsoncodehk closed 5 months ago
Add defineProp macro for single prop definition
defineProp
Basic Usage:
<script setup> // declare prop `count` with default value `0` const count = defineProp(0) // declare required prop `disabled` const disabled = defineProp(undefined, true) // access prop value console.log(count.value, disabled.value) </script>
Full Rendered Proposal
Discussion Thread
Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.
Summary
Add
defineProp
macro for single prop definitionBasic Usage:
Links
Full Rendered Proposal
Discussion Thread
Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.