Element: Not working @change to el-radio-group

Created on 1 Mar 2017  ·  5Comments  ·  Source: ElemeFE/element

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')

Most helpful comment

All 5 comments

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/

Thank you!

It is a bug, why not fix it ?

Please change it in your Documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yorululu picture yorululu  ·  3Comments

akaylh picture akaylh  ·  3Comments

makunsusu picture makunsusu  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments

smallpath picture smallpath  ·  3Comments