<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会报错