//change是radio-group标签的事件

<div>
  <el-radio-group v-model="radioSex" @change="changeHandler">
    <el-radio class="radio" label="man"></el-radio>
    <el-radio class="radio" label="woman"></el-radio> 
  </el-radio-group>
</div>

export default {
    name: 'Radio',
    data () {
      return {
        radioSex: 'man'
      }
    },
    methods: {
        changeHandler(value) {
            console.log('改变之后的值是:' + value)
        }
    }
  }

 

转载于:https://www.cnblogs.com/yysbolg/p/11095798.html

Logo

前往低代码交流专区

更多推荐