From 553d4c4844e0032ee4f93b1a4919c51ff2e7a5a3 Mon Sep 17 00:00:00 2001 From: BAIQI <443543832@qq.com> Date: Sat, 1 Jul 2023 18:41:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=A8=E4=BD=BF=E7=94=A8=E5=B9=B3=E5=8F=B0=E5=81=9A=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=97=B6chrome=E7=BB=8F=E5=B8=B8=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027497 --user=白奇 【接口测试】 github#25304在使用平台做测试时chrome经常出现崩溃问题 https://www.tapd.cn/55049933/s/1388672 --- api-test/frontend/package.json | 1 + .../automation/scenario/EditApiScenario.vue | 19 +++++++++++++------ .../scenario/component/ApiComponent.vue | 8 +++++--- api-test/frontend/src/main.js | 2 ++ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/api-test/frontend/package.json b/api-test/frontend/package.json index 4d07b74428..0b155de161 100644 --- a/api-test/frontend/package.json +++ b/api-test/frontend/package.json @@ -17,6 +17,7 @@ "@fortawesome/free-regular-svg-icons": "^5.12.0", "@fortawesome/free-solid-svg-icons": "^5.12.0", "@fortawesome/vue-fontawesome": "^0.1.9", + "@ba1q1/vue-easy-tree": "^1.0.4", "axios": "^0.27.2", "diffable-html": "^4.0.0", "echarts": "^5.0.2", diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue index 17ba6b3f02..3425f44f9b 100644 --- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue @@ -270,13 +270,16 @@ - - -
- +
+ - +
+ + + + @@ -566,7 +574,6 @@ import { buttons, setComponent } from './menu/Menu'; import { parseEnvironment } from '@/business/environment/model/EnvironmentModel'; import { ELEMENT_TYPE, STEP, TYPE_TO_C } from './Setting'; import { KeyValue } from '@/business/definition/model/ApiTestModel'; - import { getCurrentProjectID, getCurrentUser } from 'metersphere-frontend/src/utils/token'; import { getUUID, objToStrMap, strMapToObj } from 'metersphere-frontend/src/utils'; import { hasLicense, hasPermissions } from 'metersphere-frontend/src/utils/permission'; diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue index 22a5529e72..18c0f493d4 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue @@ -62,6 +62,7 @@ !loading && !request.testing && request.debug && + request.requestResult && request.requestResult[0] && request.requestResult[0].responseResult && request.requestResult[0].status === 'FAKE_ERROR' @@ -71,15 +72,16 @@ - {{ request.requestResult[0].success && reqSuccess ? 'Success' : 'Error' }} + {{ request.requestResult && request.requestResult[0].success && reqSuccess ? 'Success' : 'Error' }} diff --git a/api-test/frontend/src/main.js b/api-test/frontend/src/main.js index 3af11cf8c0..33cf607dae 100644 --- a/api-test/frontend/src/main.js +++ b/api-test/frontend/src/main.js @@ -21,6 +21,7 @@ import VuePapaParse from 'vue-papa-parse'; import VueShepherd from 'vue-shepherd'; // 新手引导 import 'metersphere-frontend/src/assets/shepherd/shepherd-theme.css'; import { gotoCancel, gotoNext } from "metersphere-frontend/src/utils"; +import VueEasyTree from "@ba1q1/vue-easy-tree"; Vue.config.productionTip = false; @@ -44,6 +45,7 @@ Vue.use(VueFab); // Vue.use(formCreate); Vue.use(VuePapaParse); Vue.use(VueShepherd); +Vue.use(VueEasyTree); Vue.prototype.gotoCancel = gotoCancel; Vue.prototype.gotoNext = gotoNext;