iviews Radio组件如何获取key而不是value

iviews RadioGroup 官网里介绍Radio组件获取的值都是name属性没有value

例如:

<template>
    <Space wrap size="large">
        <RadioGroup v-model="button1" type="button" size="large">
            <Radio label="北京"></Radio>
            <Radio label="上海"></Radio>
            <Radio label="深圳"></Radio>
            <Radio label="杭州"></Radio>
        </RadioGroup>
    </Space>
</template>
<script>
    export default {
        data () {
            return {
                button1: '北京',
               
            }
        }
    }
</script>

如何获取value?关键在如下红色部分

<RadioGroup v-model="testType" type="button" button-style="solid">
         <Radio v-for="(item,index)  in bigTypes" :label="item.blockId" :model-value="item.blockId" :key="index">
                         <span>{{item.blockName}}</span>
         </Radio>
</RadioGroup>

 

posted @ 2022-09-11 16:19  万笑佛  阅读(120)  评论(0编辑  收藏  举报