From ca3880ca0b2bf773384a5d07b22e0b15952c09bd Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 1 Mar 2023 16:20:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E7=BC=96=E8=BE=91=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E6=96=B0=E5=A2=9ETAB=E9=A1=B5=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdk-parent/frontend/src/business/app-layout/index.vue | 1 + .../frontend/src/business/case/components/TestCaseEdit.vue | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/framework/sdk-parent/frontend/src/business/app-layout/index.vue b/framework/sdk-parent/frontend/src/business/app-layout/index.vue index ef91597087..700be26125 100644 --- a/framework/sdk-parent/frontend/src/business/app-layout/index.vue +++ b/framework/sdk-parent/frontend/src/business/app-layout/index.vue @@ -143,6 +143,7 @@ export default { let title = response.data[4].paramValue; if (title) { + localStorage.setItem("default-document-title", title); document.title = title; } if (response.data[0].paramValue) { diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index fb0b4c02e7..b8c7aa96a6 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -646,6 +646,10 @@ export default { this.handleSaveCaseWithEvent ); }, + beforeRouteLeave(to, from, next) { + document.title = localStorage.getItem("default-document-title"); + next(); + }, mounted() { this.getSelectOptions(); @@ -969,6 +973,7 @@ export default { this.operationType = 'add'; // add + document.title = this.$t('test_track.case.create_case'); if (this.moduleOptions.length > 0) { this.form.module = this.moduleOptions[0].id; } @@ -1065,6 +1070,7 @@ export default { this.form.id = null; testCase.casePublic = false; } + document.title = testCase.name; this.currentTestCaseInfo = testCase; this.setFormData(testCase); this.setTestCaseExtInfo(testCase);