fix(接口测试): 修复新建扩展协议的api再新建用例报错的缺陷

--bug=1040367 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040367
This commit is contained in:
teukkk 2024-05-07 11:25:36 +08:00 committed by 刘瑞斌
parent 6421d1ebf0
commit 22e2ea7fe0
2 changed files with 8 additions and 2 deletions

View File

@ -204,10 +204,10 @@
query: apiDetailInfo.value.query ?? apiDetailInfo.value.request.query, query: apiDetailInfo.value.query ?? apiDetailInfo.value.request.query,
authConfig: apiDetailInfo.value.authConfig ?? apiDetailInfo.value.request.authConfig, authConfig: apiDetailInfo.value.authConfig ?? apiDetailInfo.value.request.authConfig,
otherConfig: apiDetailInfo.value.otherConfig ?? apiDetailInfo.value.request.otherConfig, otherConfig: apiDetailInfo.value.otherConfig ?? apiDetailInfo.value.request.otherConfig,
url: apiDetailInfo.value.url ?? apiDetailInfo.value.request.url,
} }
: {}), : {}),
children: apiDetailInfo.value.children ?? apiDetailInfo.value.request.children, children: apiDetailInfo.value.children ?? apiDetailInfo.value.request.children,
url: apiDetailInfo.value.url ?? apiDetailInfo.value.request.url,
}; };
// //
if (isCopy) { if (isCopy) {

View File

@ -40,10 +40,16 @@
hasAnyPermission(['PROJECT_API_DEFINITION:READ+IMPORT']) hasAnyPermission(['PROJECT_API_DEFINITION:READ+IMPORT'])
" "
type="primary" type="primary"
@click="handleSelect('import')"
> >
{{ t('apiTestManagement.importApi') }} {{ t('apiTestManagement.importApi') }}
</a-button> </a-button>
<a-button v-else v-permission="['PROJECT_API_DEFINITION:READ+ADD']" type="primary"> <a-button
v-else
v-permission="['PROJECT_API_DEFINITION:READ+ADD']"
type="primary"
@click="handleSelect('newApi')"
>
{{ t('apiTestManagement.newApi') }} {{ t('apiTestManagement.newApi') }}
</a-button> </a-button>
</template> </template>