diff --git a/frontend/src/assets/style/arco-reset.less b/frontend/src/assets/style/arco-reset.less index 91daf235b0..df2788a601 100644 --- a/frontend/src/assets/style/arco-reset.less +++ b/frontend/src/assets/style/arco-reset.less @@ -240,6 +240,13 @@ } } +/** 按钮下拉框 **/ +.arco-btn-group { + .arco-btn-primary:first-child { + margin-right: 1px; + } +} + /** 输入框,选择器,文本域 **/ .arco-select { .arco-icon { diff --git a/frontend/src/views/api-test/components/executeButton.vue b/frontend/src/views/api-test/components/executeButton.vue index d5ed2f4e41..9c1b2716d3 100644 --- a/frontend/src/views/api-test/components/executeButton.vue +++ b/frontend/src/views/api-test/components/executeButton.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/views/api-test/management/components/management/case/createAndEditCaseDrawer.vue b/frontend/src/views/api-test/management/components/management/case/createAndEditCaseDrawer.vue index 6f1ff42d04..bc225f10ff 100644 --- a/frontend/src/views/api-test/management/components/management/case/createAndEditCaseDrawer.vue +++ b/frontend/src/views/api-test/management/components/management/case/createAndEditCaseDrawer.vue @@ -190,7 +190,7 @@ } else { await getApiDetail(); } - // 创建或者复制的时候,请求参数为接口定义的请求参数 + // 创建的时候,请求参数为接口定义的请求参数 detailForm.value = { ...cloneDeep(defaultDetail.value), ...(apiDetailInfo.value.protocol === 'HTTP' @@ -199,8 +199,11 @@ body: apiDetailInfo.value?.body ?? apiDetailInfo.value.request.body, rest: apiDetailInfo.value.rest ?? apiDetailInfo.value.request.rest, query: apiDetailInfo.value.query ?? apiDetailInfo.value.request.query, + authConfig: apiDetailInfo.value.authConfig ?? apiDetailInfo.value.request.authConfig, + otherConfig: apiDetailInfo.value.otherConfig ?? apiDetailInfo.value.request.otherConfig, } : {}), + children: apiDetailInfo.value.children ?? apiDetailInfo.value.request.children, url: apiDetailInfo.value.url ?? apiDetailInfo.value.request.url, }; // 复制 @@ -268,16 +271,9 @@ if (!isContinue) { handleSaveCaseCancel(); } - // 继续创建 - detailForm.value = { - ...cloneDeep(defaultDetail.value), - id: `case-${Date.now()}`, - headers: apiDetailInfo.value.headers ?? apiDetailInfo.value.request.headers, - body: apiDetailInfo.value.body ?? apiDetailInfo.value.request.body, - rest: apiDetailInfo.value.rest ?? apiDetailInfo.value.request.rest, - query: apiDetailInfo.value.query ?? apiDetailInfo.value.request.query, - url: apiDetailInfo.value.url ?? apiDetailInfo.value.request.url, - }; + // 保存并继续创建都以当前页面内容为基础,不需要还原 + detailForm.value.id = `case-${Date.now()}`; + detailForm.value.name = ''; drawerLoading.value = false; } }); diff --git a/frontend/src/views/api-test/management/components/management/case/index.vue b/frontend/src/views/api-test/management/components/management/case/index.vue index 18a07c3c36..221c32c8d0 100644 --- a/frontend/src/views/api-test/management/components/management/case/index.vue +++ b/frontend/src/views/api-test/management/components/management/case/index.vue @@ -87,7 +87,7 @@ } else { // 更新数据 const index = apiTabs.value.findIndex((item) => item.id === id); - apiTabs.value[index] = tabItemInfo; + apiTabs.value[index] = cloneDeep(tabItemInfo); activeApiTab.value = tabItemInfo; } diff --git a/frontend/src/views/api-test/management/components/moduleTree.vue b/frontend/src/views/api-test/management/components/moduleTree.vue index 0523d7c186..c008889f21 100644 --- a/frontend/src/views/api-test/management/components/moduleTree.vue +++ b/frontend/src/views/api-test/management/components/moduleTree.vue @@ -14,28 +14,39 @@ :placeholder="props.isModal ? t('apiTestManagement.moveSearchTip') : t('apiTestManagement.searchTip')" allow-clear /> - - {{ t('apiTestManagement.newApi') }} - - +
@@ -205,7 +216,7 @@ import useModal from '@/hooks/useModal'; import useAppStore from '@/store/modules/app'; import { mapTree } from '@/utils'; - import { hasAnyPermission } from '@/utils/permission'; + import { hasAllPermission, hasAnyPermission } from '@/utils/permission'; import { ModuleTreeNode } from '@/models/common';