ve2.0 v-for循環報錯的解決方案
阿新 • • 發佈:2018-03-01
center right || 2.0 blog for -i dex 分鐘
<li v-for="(item,index) in mokeData" class="page" :key="index"> <div class="page-left"> <p class="page-left-title">{{item.title}}</p> <p class="page-left-content">{{item.content}} </p> <div class="page-left-bottom"> <span>23分鐘之前</span> <span>要戒網</span> </div> </div> <div class="page-right" v-if="item.cover || item.cover1 || item.cover2"> <div class="cover" style="display: flex;align-items: center;"> <span><img :src="item.cover"alt=""></span> <div class="imgs" style="display: flex;"> <span><img :src="item.cover1" alt=""></span> <span><img :src="item.cover2" alt=""></span> </div> </div> </div> </li>
不綁定index會報錯
ve2.0 v-for循環報錯的解決方案