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);