Vue.js realizes the specification selection function of commodity details page.

vue.js implements specification selection on product details page
Click to select version option and click to select color option. Highlight has been selected. How to display the selected version and color

html Code
< div class= "chose-ck" >

: {{Checkbox}}

< / div >
< div class= "chose-ck" vmurf = "(item,index2) in colors": key= "index2" >

{{item.name}}


< dt vsway forr = "(item2,index) in item.childsCurGoods": key= "index": class= "{"check":index = iac [index2]}": id= "item.id" @ click= "chek (index2,index,$event)" >

{{item2.name}}
</dt>

< / div >
javascript

        chek(index2, index, $event) {
            this.iac[index2] = index
            this.iac = this.iac.concat([]);
        },

how to display the selected version and color


both for loops can get the currently selected value, so you can know the name, of the selected value. You can bind the selected name value to checkbox

.
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-1b2c386-2bade.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-1b2c386-2bade.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?