From c39a00b4dba2b19a8dce99d49891135126ba1a6d Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 12 Aug 2022 17:11:52 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2128=20fix=EF=BC=9A=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=9C=80=E8=BF=91=E4=BD=BF=E7=94=A8=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=97=A0=E6=B3=95=E9=87=8D=E5=A4=8D=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/timePicker.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nezha-fronted/src/components/common/timePicker.vue b/nezha-fronted/src/components/common/timePicker.vue index 53f721130..8a346c842 100644 --- a/nezha-fronted/src/components/common/timePicker.vue +++ b/nezha-fronted/src/components/common/timePicker.vue @@ -329,12 +329,17 @@ export default { } }, historyChange (item) { - this.oldSearchTime[0] = this.momentTz(item.start) - this.oldSearchTime[1] = this.momentTz(item.end) this.isCustom = true + this.searchTime[0] = this.momentTz(item.start) + this.searchTime[1] = this.momentTz(item.end) + this.showTime = this.nowTimeType = { + id: 0, + text: this.searchTime[0] + ' ' + this.$t('dashboard.panel.to') + ' ' + this.searchTime[1], + value: -1 + } this.showDropdown() - this.$emit('change', this.searchTime) this.setSearchTime('', '', this.searchTime) + this.$emit('change', this.searchTime) }, getRangeHistoryArr () { const arr = this.rangeHistory.slice(0, 3)