mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-11-30 02:37:57 +08:00
fix: new websocket tab jump to mock
This commit is contained in:
parent
860ffce8f9
commit
174b38f9b8
@ -87,9 +87,8 @@ export class ApiTabOperateService {
|
||||
*
|
||||
* @returns tabItem
|
||||
*/
|
||||
newDefaultTab(key = 'http-test') {
|
||||
const pathHash = ['http-test', 'http-edit', 'http-detail', 'overview', 'ws-test', 'http-mock'];
|
||||
const tabItem = Object.assign({}, eoDeepCopy(this.BASIC_TABS[pathHash.findIndex((it) => it === key)]));
|
||||
newDefaultTab(path?) {
|
||||
const tabItem = Object.assign({}, eoDeepCopy(this.BASIC_TABS.find(val=>val.pathname===path)||this.BASIC_TABS[0]));
|
||||
tabItem.params = {};
|
||||
tabItem.uuid = tabItem.params.pageID = Date.now();
|
||||
Object.assign(tabItem, { isLoading: false });
|
||||
|
@ -56,7 +56,7 @@
|
||||
<nz-dropdown-menu #addMenu="nzDropdownMenu">
|
||||
<ul nz-menu>
|
||||
<li nz-menu-item (click)="newTab()">HTTP</li>
|
||||
<li nz-menu-item (click)="newTab('ws-test')">Websocket</li>
|
||||
<li nz-menu-item (click)="newTab('/home/api/ws/test')">Websocket</li>
|
||||
</ul>
|
||||
</nz-dropdown-menu>
|
||||
<a nz-dropdown [nzDropdownMenu]="menu">
|
||||
|
Loading…
Reference in New Issue
Block a user