Hi, not working cahange emmit in el-radio-group :(
http://jsfiddle.net/yymoroz3/s5xz40yx/
html:
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui/lib/index.js"></script>
<div id="app">
<el-radio-group :value="radio3" @change="changeValue">
<el-radio-button label="New York"></el-radio-button>
<el-radio-button label="Washington"></el-radio-button>
<el-radio-button label="Los Angeles"></el-radio-button>
<el-radio-button label="Chicago"></el-radio-button>
</el-radio-group>
<div style="margin: 15px 0;"></div>
<el-radio-group v-model="radio4" @change="changeValue">
<el-radio-button label="New York"></el-radio-button>
<el-radio-button label="Washington" ></el-radio-button>
<el-radio-button label="Los Angeles"></el-radio-button>
<el-radio-button label="Chicago"></el-radio-button>
</el-radio-group>
js:
var Main = {
data () {
return {
radio3: 'New York',
radio4: 'New York',
};
},
methods: {
changeValue(data) {
console.log('not working to radio3 :/');
this.radio3 = data;
},
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
If you are binding value with :value="XXX"
instead of v-model="XXX"
, you should handle its change in input
event: http://jsfiddle.net/leopoldthecuber/s5xz40yx/5/
http://jsfiddle.net/s5xz40yx/4/
you should change @change to @input
https://github.com/ElemeFE/element/issues/1632#issuecomment-265739660
Thank you!
It is a bug, why not fix it ?
Please change it in your Documentation.
Most helpful comment
http://jsfiddle.net/s5xz40yx/4/
you should change @change to @input
https://github.com/ElemeFE/element/issues/1632#issuecomment-265739660