template syntax sugar for dynamic modelModifiers. #9722
renatodeleao
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In wrapper components,
modelModifiers
might need to be applied conditionally based on some prop or else.The
v-model
syntax doesn't allow that directly in the template. The alternative is to use themodelModifiers
prop directly, but we could "sweeten" template syntax the same way it was done withv-model.modifierName
for static modifiers in the first place.Proposal
Whatever is passed into
someConditionalModifier
needs to be checked, for string or objectobject
pass as is tomodelModifiers
{ [string]: true }
object internallyv-model:my-prop.[modifier]
which would be transformed into amyPropModifiers
Additional info
Cheers! ✌️
Beta Was this translation helpful? Give feedback.
All reactions