vuejs / jsx-vue2

monorepo for Babel / Vue JSX related packages
https://jsx-vue2-playground.netlify.app/
1.47k stars 96 forks source link

`value` attribute is missing from input[radio]-field when using vModel #231

Open hasanen opened 3 years ago

hasanen commented 3 years ago

Hey

We have a problem with getting value attribute visible with radio buttons with vModel. For example following code

<input name="test" vModel={this.testing} type="radio" value="a" />

generates

<input name="test" type="radio">

But if we leave the vModel out

<input name="test" type="radio" value="a" />

we get

<input name="test" type="radio" value="a">

I tried to look on the code in here https://github.com/vuejs/jsx/blob/5368c63ec768c070cfc259a506d9de43cb930bdb/packages/babel-sugar-v-model/src/index.js#L447-L461 but I don't have enough of knowledge to spot the bug.

We're using version 1.2.3 of @vue/babel-sugar-v-model.