fix: switch language will add tab

This commit is contained in:
scarqin 2022-09-13 14:18:28 +08:00
parent 2d737e558f
commit 489c4a9c44

View File

@ -52,11 +52,13 @@ export class ApiTabOperateService {
//Tab from url //Tab from url
try { try {
//If current url did't match exist tab,throw error //If current url did't match exist tab,throw error
this.generateTabFromUrl(this.router.url); const existTab = this.getSameContentTab(this.generateTabFromUrl(this.router.url));
this.operateTabAfterRouteChange({ if (existTab) {
url: this.router.url, this.operateTabAfterRouteChange({
}); url: this.router.url,
return; });
return;
}
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }