Vue实现未读消息小红点
点击查询时调用接口if (tab.label == "通知") {this.$request.get(this.$store.state.Url + "xxx", {id: this.obj.planId,}).then((res) => {res.map((item) => {this.xxx= item.xxx;});
·
点击查询时调用接口
if (tab.label == "通知") {
this.$request
.get(this.$store.state.Url + "xxx", {
id: this.obj.planId,
})
.then((res) => {
res.map((item) => {
this.xxx= item.xxx;
});
});
}
<div class="noticeList">
<div class="">
<div
class="noticeName"
v-for="(item, index) in notice"
:key="index"
@click="noticeDetail(item)"
>
<h3>{{ item.xxx }}</h3>
<h3 v-if="item.readed == 1" style="color: #28b1ad">已读</h3>
<h3 v-if="item.readed == 0" style="color: #eb6100">未读</h3>
</div>
</div>
</div>
更多推荐
已为社区贡献1条内容
所有评论(0)