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 4bff071e42..ccf20cd5f3 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -647,6 +647,10 @@ export default { this.handleSaveCaseWithEvent ); }, + beforeRouteLeave(to, from, next) { + document.title = localStorage.getItem("default-document-title"); + next(); + }, mounted() { this.getSelectOptions(); @@ -970,6 +974,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; } @@ -1066,6 +1071,7 @@ export default { this.form.id = null; testCase.casePublic = false; } + document.title = testCase.name; this.currentTestCaseInfo = testCase; this.setFormData(testCase); this.setTestCaseExtInfo(testCase);