,<template>
    <label class="web-radio-label">
        <input checked="{'checked' : label==1}" type="radio" :value="label" :name="value" @change="ischeck"/>
        <span clas="web-radio" :style="{color: isChecked?'#409eff': ''}">备选项</span>
    </label>
</template>

<script>
export default {
    name: "web-radio",
    props:{
        value:{
            type: String,
            default: "1"
        },
        label: {
            type:String,
            default: "1"
        }
    },
    data(){
        return {
            isChecked: false
        }
    },
    methods: {
        ischeck(){
            this.isChecked = !this.isChecked;
            console.log(this.label,this.isChecked)
        }
    },
}
</script>

<style scoped>
    .web-radio-label{
        color: #606266;
        font-weight: 500;
        line-height: 1;
        position: relative;
        cursor: pointer;
        display: inline-block;
        white-space: nowrap;
        outline: none;
        font-size: 14px;
        margin-right: 30px;
        -moz-user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
    }
    .web-radio{
        color: #606266;
        font-weight: 500;
        line-height: 1;
        position: relative;
        cursor: pointer;
        display: inline-block;
        white-space: nowrap;
        outline: none;
        font-size: 14px;
    }
</style>