some方法过滤

 

// 已经存在该tab时跳过
this.tabs.some(item => item.title === option.title) || this.tabs.push(option)

posted @ 2017-09-28 17:11  大西瓜的一片净土  阅读(148)  评论(0编辑  收藏  举报