第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

vue雙v-for數(shù)據(jù)如何分別點(diǎn)擊添加active

vue雙v-for數(shù)據(jù)如何分別點(diǎn)擊添加active

回首憶惘然 2018-08-26 14:53:50
 <div class='class-list'          v-for='(value, key) in list'          :key='key'>         <h3>{{value.title}}</h3>         <span            class='class-item'              :class='{active: index === isActive}'             v-for='(item,index) in value.items'              :key='item'             @click='handleSortItemClick(index,value)'         >{{item}}         </span>     </div>數(shù)據(jù)結(jié)構(gòu)是這樣的"list": {    "trade": {        "title":"行業(yè)分類",        "items":["不限","家電","3C","汽車","食品","電氣/照明","日化/化工","醫(yī)療/醫(yī)藥","五金","家具/木材","其他"]     },    "fn":{        "title":"功能分類",        "items":["不限","組裝","檢測(cè)","分揀","包裝","焊錫","涂裝","焊接","沖壓","注塑","搬運(yùn)","其他"]     },    "area":{        "title":"區(qū)域",        "items":["不限","上海市","廣東省","湖北省","江蘇省","浙江省","重慶市","天津市","山東省","北京市"]     } }在點(diǎn)擊事件里怎么寫才能寫出三個(gè)分類分別添加active,而不相互影響,如果分別寫三個(gè)循環(huán)是可以達(dá)到結(jié)果預(yù)期,不過代碼蠢自己都看不下去了 求大神們幫忙看看
查看完整描述

1 回答

?
慕容708150

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超4個(gè)贊

scss 
.class-list{

&:first-child{
    &.active{
        h3{
        }
        span{
        }
    }
}
&:nth-child(2){
    &.active{
        h3{
        }
        span{
        }
    }
    }
&:last-child{
    &.active{
        h3{
        }
        span{
        }
    }
}

}


查看完整回答
反對(duì) 回復(fù) 2018-08-27
  • 1 回答
  • 0 關(guān)注
  • 1594 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)