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,
modelModifiersmight need to be applied conditionally based on some prop or else.The
v-modelsyntax doesn't allow that directly in the template. The alternative is to use themodelModifiersprop directly, but we could "sweeten" template syntax the same way it was done withv-model.modifierNamefor static modifiers in the first place.Proposal
Whatever is passed into
someConditionalModifierneeds to be checked, for string or objectobjectpass as is tomodelModifiers{ [string]: true }object internallyv-model:my-prop.[modifier]which would be transformed into amyPropModifiersAdditional info
Cheers! ✌️
Beta Was this translation helpful? Give feedback.
All reactions