From fcd7d17ef111e591119b6b1dccab32f0edff1740 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Sat, 6 May 2023 18:49:42 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormFields/DatetimeRangePicker.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/FormFields/DatetimeRangePicker.vue b/src/components/FormFields/DatetimeRangePicker.vue index ff96adeba..cb1487b28 100644 --- a/src/components/FormFields/DatetimeRangePicker.vue +++ b/src/components/FormFields/DatetimeRangePicker.vue @@ -41,23 +41,23 @@ export default { shortcuts: [ { text: this.$t('common.DateLast24Hours'), - onClick: (picker) => this.handleShortcutClick(picker, 1) + onClick: (picker) => this.onShortcutClick(picker, 1) }, { text: this.$t('common.DateLastWeek'), - onClick: (picker) => this.handleShortcutClick(picker, 7) + onClick: (picker) => this.onShortcutClick(picker, 7) }, { text: this.$t('common.DateLastMonth'), - onClick: (picker) => this.handleShortcutClick(picker, 30) + onClick: (picker) => this.onShortcutClick(picker, 30) }, { text: this.$t('common.DateLast3Months'), - onClick: (picker) => this.handleShortcutClick(picker, 90) + onClick: (picker) => this.onShortcutClick(picker, 90) }, { text: this.$t('common.DateLastHarfYear'), - onClick: (picker) => this.handleShortcutClick(picker, 183) + onClick: (picker) => this.onShortcutClick(picker, 183) }, { text: this.$t('common.DateLastYear'), - onClick: (picker) => this.handleShortcutClick(picker, 365) + onClick: (picker) => this.onShortcutClick(picker, 365) } ] } @@ -73,7 +73,7 @@ export default { this.$emit('dateChange', val) } }, - handleShortcutClick(picker, day) { + onShortcutClick(picker, day) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * day)