From 2965076601968f270b02ddc0cc2334b4a70b0b80 Mon Sep 17 00:00:00 2001 From: guqing <1484563614@qq.com> Date: Wed, 17 Jul 2019 15:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=8F=91=E8=A1=A8=E6=97=B6=E9=97=B4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/post/PostEdit.vue | 4 ++++ src/views/sheet/SheetEdit.vue | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 0793e8e6..698b4703 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -288,6 +288,10 @@ export default { }, computed: { pickerDefaultValue() { + if (this.postToStage.createTime) { + var date = new Date(this.postToStage.createTime) + return moment(date, 'YYYY-MM-DD HH:mm:ss') + } return moment(new Date(), 'YYYY-MM-DD HH:mm:ss') } }, diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index 399dcedd..0d1e4c92 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -57,6 +57,18 @@ 关闭 + + + { @@ -274,6 +296,12 @@ export default { this.$message.error('图片上传失败:' + responseObject.message) } }) + }, + onChange(value, dateString) { + this.sheetToStage.createTime = value.valueOf() + }, + onOk(value) { + this.sheetToStage.createTime = value.valueOf() } } }