Use document.title to display tab count and update info

This commit is contained in:
NI
2019-09-27 09:39:18 +08:00
parent 512e410221
commit 3b8483f9c5
3 changed files with 62 additions and 4 deletions

View File

@@ -440,6 +440,8 @@ export default {
this.windows.connect = false;
this.addToTab(data);
this.$emit("tab-opened", this.tab.tabs);
},
async addToTab(data) {
await this.switchTab(
@@ -498,6 +500,8 @@ export default {
}
this.removeFromTab(index);
this.$emit("tab-closed", this.tab.tabs);
},
tabStopped(index, reason) {
if (reason === null) {
@@ -507,7 +511,9 @@ export default {
}
},
tabUpdated(index) {
this.tab.tabs[index].indicator.updated = this.tab.current !== index;
this.$emit("tab-updated", this.tab.tabs);
this.tab.tabs[index].indicator.updated = index !== this.tab.current;
}
}
};