赞
踩
computed: {
newIconIsShow: function() {
let _this = this
let item = this.itemInfo.articleList
let arr = []
for (let i = 0; i < item.length; i++) {
let res = compareTime(item[i].releaseTime, 99)
arr.push(res)
}
console.log(arr)
return arr
}
<div class="list-item" v-for="(item,index) in itemInfo.articleList" :key="index" @click="newsClick(item.id)">
<div class="item-left">
<p class="text_p">. {{item.title}}</p>
</div>
<div class="item-right">
<new-icon v-show="newIconIsShow[index]"></new-icon>
<span class="pubTime">{{item.releaseTime}}</span>
</div>
</div>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。