v-for="(item,index) of hot"    //数组遍历


v-for="(item,key,index) of cities"   //对象遍历
//key 是对象的属性     item对应的属性值

 key值

 <div class="area" v-for="(item,key) of cities" :key="key">  
        <div class="title border-topbottom">{{key}}</div>
        <div class="item-list">
          <div class="item border-bottom" v-for="city of item " :key="city.id">{{city.name}}</div>
        </div>
</div>

  

posted on 2018-09-28 16:29  chenlw101  阅读(275)  评论(0编辑  收藏  举报