From 7e094cd83e0d8d2ba8999121a4b5e58f995c75b3 Mon Sep 17 00:00:00 2001 From: cxx Date: Mon, 6 May 2024 15:20:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20Bug=EF=BC=9A=E6=97=B6=E9=97=B4=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/component/common/dateTimePicker.html | 11 ++++------- app/view/component/tpl/formComponentList.html | 7 ++----- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/view/component/common/dateTimePicker.html b/app/view/component/common/dateTimePicker.html index 9271ca7..58cd2e1 100644 --- a/app/view/component/common/dateTimePicker.html +++ b/app/view/component/common/dateTimePicker.html @@ -61,13 +61,13 @@ Vue.component("date-time-picker", { }, watch: { date(){ - this.$emit('save-date-time', `${this.date} ${this.hour<10?'0'+this.hour:this.hour}:${this.minute<10?'0'+this.minute:this.minute}`) + this.saveDateTime() }, hour(){ - this.$emit('save-date-time', `${this.date} ${this.hour<10?'0'+this.hour:this.hour}:${this.minute<10?'0'+this.minute:this.minute}`) + this.saveDateTime() }, minute(){ - this.$emit('save-date-time', `${this.date} ${this.hour<10?'0'+this.hour:this.hour}:${this.minute<10?'0'+this.minute:this.minute}`) + this.saveDateTime() }, }, created() {}, @@ -87,15 +87,12 @@ Vue.component("date-time-picker", { return; } let datetime = dayjs(this.datetime) - console.log(datetime); this.date = `${datetime.year()}-${datetime.month()+1}-${datetime.date()}` this.hour = `${datetime.hour()}` this.minute = `${datetime.minute()}` - console.log(this.hour, this.minute); - // this.time = `${date.hour()<10?'0'+date.hour():date.hour()}:${date.minute()<10?'0'+date.minute():date.minute()}` }, saveDateTime(){ - + this.$emit('input', `${this.date} ${this.hour<10?'0'+this.hour:this.hour}:${this.minute<10?'0'+this.minute:this.minute}`) } } }) diff --git a/app/view/component/tpl/formComponentList.html b/app/view/component/tpl/formComponentList.html index 3908b73..eb8f9a0 100644 --- a/app/view/component/tpl/formComponentList.html +++ b/app/view/component/tpl/formComponentList.html @@ -69,7 +69,7 @@ - + @@ -103,7 +103,7 @@ Vue.component("form-component-list", { }, data() { return { - datetime:"2023-12-24 22:23", + } }, computed: { @@ -113,9 +113,6 @@ Vue.component("form-component-list", { }, methods: { - setDateTime(data){ - this.datetime = data - }, async calcWorkflow(){ await this.$emit('calc-workflow') }