diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index cc5fed4c2..9fb9c6774 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -28,7 +28,7 @@ {{item.label}} @@ -353,8 +353,8 @@ export default { icon: 'nz-icon nz-icon-logs' } ], - selectValue: '', - selectIcon: '', + selectValue: this.$t('project.metrics.metrics'), + selectIcon: 'nz-icon nz-icon-Metrics', fromData: { status: '' }, @@ -404,26 +404,14 @@ export default { this.selectMetricsLogs() }, methods: { - selectMetricsLogs (val, icon) { - if (this.selectValue === 'Metrics') { - this.selectValue = val + selectMetricsLogs (val, icon, label) { + if (val) { this.selectIcon = icon - this.showMetrics = val === 'Metrics' - this.showIntroduce = true - this.resetExpression() - } else if (this.selectValue === 'Logs') { this.selectValue = val - this.selectIcon = icon - this.showMetrics = val === 'Metrics' - this.showIntroduce = true - this.resetExpression() } else { - this.selectValue = 'Metrics' - this.selectIcon = 'nz-icon nz-icon-Metrics' - this.showMetrics = 'Metrics' - this.showIntroduce = true - this.resetExpression() + label = 'Metrics' } + this.changeType(label) }, changeType (value) { this.showMetrics = value === 'Metrics'