fix(接口管理): 修复点击用例列表id详情也会执行问题
--bug=1037856 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037856
This commit is contained in:
parent
12fd168029
commit
55c51401fd
|
@ -912,6 +912,7 @@
|
||||||
}
|
}
|
||||||
async function openCaseDetailDrawer(id: string) {
|
async function openCaseDetailDrawer(id: string) {
|
||||||
await getCaseDetailInfo(id);
|
await getCaseDetailInfo(id);
|
||||||
|
caseExecute.value = false;
|
||||||
caseDetailDrawerVisible.value = true;
|
caseDetailDrawerVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openCaseTab(apiInfo: ApiCaseDetail | string) {
|
async function openCaseTab(apiInfo: ApiCaseDetail | string) {
|
||||||
|
caseExecute.value = false;
|
||||||
const isLoadedTabIndex = apiTabs.value.findIndex(
|
const isLoadedTabIndex = apiTabs.value.findIndex(
|
||||||
(e) => e.id === (typeof apiInfo === 'string' ? apiInfo : apiInfo.id)
|
(e) => e.id === (typeof apiInfo === 'string' ? apiInfo : apiInfo.id)
|
||||||
);
|
);
|
||||||
|
@ -115,7 +116,15 @@
|
||||||
|
|
||||||
async function openCaseTabAndExecute(apiInfo: ApiCaseDetail | string) {
|
async function openCaseTabAndExecute(apiInfo: ApiCaseDetail | string) {
|
||||||
caseExecute.value = true;
|
caseExecute.value = true;
|
||||||
await openCaseTab(apiInfo);
|
const isLoadedTabIndex = apiTabs.value.findIndex(
|
||||||
|
(e) => e.id === (typeof apiInfo === 'string' ? apiInfo : apiInfo.id)
|
||||||
|
);
|
||||||
|
if (isLoadedTabIndex > -1) {
|
||||||
|
// 如果点击的请求在tab中已经存在,则直接切换到该tab
|
||||||
|
activeApiTab.value = apiTabs.value[isLoadedTabIndex] as RequestParam;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await openOrUpdateCaseTab(true, typeof apiInfo === 'string' ? apiInfo : apiInfo.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const caseTableRef = ref<InstanceType<typeof caseTable>>();
|
const caseTableRef = ref<InstanceType<typeof caseTable>>();
|
||||||
|
|
Loading…
Reference in New Issue