Using v-model on <input> in client-oriented render function in SSR doesn't work if type attribute is dynamic
Version
3.2.33
Reproduction link
Steps to reproduce
- In a component template, use an
<input>
that has a dynamictype
attribute and usesv-model
:<input :type="foo" v-model="bar">
- Compile this component to a client-oriented render function
- Use this compiled component in an SSR app, passing in
{ foo: 'text', bar: 'hello' }
What is expected?
The input should render as <input type="text" value="hello">
What is actually happening?
The input renders without a value: <input type="text">
This happens because vModelDynamic
in src/directives/vModel.ts
doesn't have an SSR equivalent, even though it would be possible to implement one.