Replies: 3 comments 6 replies
-
|
If this sounds like a reasonable solution, I am happy to submit a PR. |
Beta Was this translation helpful? Give feedback.
-
|
A workaround I see in the wild is creating Vue components wrapping the custom elements, and creating its own version of For example, this is how the great And here you can see how it's used for |
Beta Was this translation helpful? Give feedback.
-
|
Another potential solution would be to adding three new modifiers to the Setting either of these modifiers would bypass the dynamic resolve for the type defined by the modifier. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am building a library with custom elements. Vue does a great job with custom elements, but the one issue I've run into is with supporting
v-model.Setting
app.config.compilerOptions.isCustomElementworks well for text input components where I can emit aninputevent and use avalueprop, but I am unable to support checkboxes and radio buttons sinceV_MODEL_DYNAMICis looking forevent.target.valueinstead ofevent.target.checked.The workaround here is to set a
typeon the host element like this:While this works, it's another item for users to remember that I'd prefer for them to be able to configure globally in their app. I have tried setting
typeon the host element when the component mounts, butv-modelseems to have already initialized.Potential solution
isCustomElementcould return an optionaltypethattransformModelcould use to select the correctv-model.For example:
Beta Was this translation helpful? Give feedback.
All reactions