Vue sets the class of the object button according to the different values selected by the checkbox

clipboard.png
set the class (buybtn-1,buybtn-2,buybtn-3,buybtn-4) of the object button according to the style selected by the radio box

<button type="button" class="hide" title="" ></button>
<div class="form-row">
    <label class="radio-inline">
        <input type="radio" v-model="buyBtnStyle" name="BBS" id="inlineRadio1" value="buyBtn1"> 1
    </label>
    <label class="radio-inline">
        <input type="radio" v-model="buyBtnStyle" name="BBS" id="inlineRadio2" value="buyBtn2"> 2
    </label>
    <label class="radio-inline">
        <input type="radio" v-model="buyBtnStyle" name="BBS" id="inlineRadio3" value="buyBtn3"> 3
    </label>
    <label class="radio-inline">
        <input type="radio" v-model="buyBtnStyle" name="BBS" id="inlineRadio4" value="buyBtn4"> 4
    </label>
</div>
Mar.18,2021

suggest to refer to the official website ide/class-and-style.html-sharp%E5%AF%B9%E8%B1%A1%E8%AF%AD%E6%B3%95" rel=" nofollow noreferrer "> Class binds to Style


<div :style="{'margin-top': index === 0 ? 0 : 6.5 + 'px'}" :class="{'img_gray': thirdQty === 0}"></div>
data(){
    return {
        index: 0,
        thirdQty: 0
    }
}

<button type="button" :class="['hide',buyBtnStyle]" title="" ></button>
<div class="form-row">
    <label class="radio-inline" v-for="(item,index) in [{value:'buyBtn-1',name:'1'},{value:'buyBtn-2',name:'2'}]" :key="index">
        <input type="radio" v-model="buyBtnStyle" name="BBS" :value="item.value"> {{item.name}}
    </label>
</div>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e36ae9-649ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e36ae9-649ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?