diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue index 5a568345f..bb66572bb 100644 --- a/nezha-fronted/src/components/common/header.vue +++ b/nezha-fronted/src/components/common/header.vue @@ -176,6 +176,7 @@ export default { } this.$store.commit('toCreateEndpoint', true); } else if (item.type == 5) { + this.$store.commit('projectRightBoxShow', false); this.$store.commit('toCreateAlertConfig', true); } }, 120); diff --git a/nezha-fronted/src/components/page/alert/config.vue b/nezha-fronted/src/components/page/alert/config.vue index 21f500ca6..510797014 100644 --- a/nezha-fronted/src/components/page/alert/config.vue +++ b/nezha-fronted/src/components/page/alert/config.vue @@ -452,7 +452,7 @@ export default { toAdd: function() { this.cleanAlertRule(); this.rightBox.isEdit = true; - this.rightBox.title = this.$t("alert.config.createalertConfig"); + this.rightBox.title = this.$t("alert.config.createAlertConfig"); this.rightBox.show = true; }, detail: function(u) { @@ -587,6 +587,7 @@ export default { }, watch: { sProject(n, o) { + this.$store.commit('toCreateAlertConfig', false); this.toAdd(); } } diff --git a/nezha-fronted/src/components/page/project/project.vue b/nezha-fronted/src/components/page/project/project.vue index 14f01417a..3dd31c55b 100644 --- a/nezha-fronted/src/components/page/project/project.vue +++ b/nezha-fronted/src/components/page/project/project.vue @@ -1246,7 +1246,7 @@ export default { this.assetSearch.dropdownShow = false; } }, - mounted: function() { + created: function() { window.addEventListener('click', () => { this.esc(1); this.$store.commit('projectRightBoxShow', false);