初次默认选中数组最多的tab

initTab: true,
tabs: [],
activeTab: 0,

if (this.initTab) {
  let maxUnread = -1;
  let activeTabIndex = -1;
  for (let i = 0; i < this.tabs.length;i++) {
   if (this.tabs[i].unread > maxUnread) {
	  maxUnread = this.tabs[i].unread;
	  activeTabIndex = i;
   }
 }

 if (activeTabIndex !== -1) {
  this.activeTab = this.tabs[activeTabIndex].label;
 }
}