- //change is the event of the radio-group tag
- <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('The changed value is:' + value)
- }
- }
- }
Vue el-radio listens to the instance of the selected change
おすすめ
転載: blog.csdn.net/weixin_43167662/article/details/130055459
ランキング