From 5903d75d307140cf8ac5c24d1bc85460afdc971d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=A5=95?= <1504642380@qq.com> Date: Sat, 10 Dec 2022 03:18:35 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/tmui/components/tm-comment/tm-comm?= =?UTF-8?q?ent.vue.=20=E6=96=B0=E5=A2=9E=E6=98=AF=E5=90=A6=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 小奕 <1504642380@qq.com> --- src/tmui/components/tm-comment/tm-comment.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/tmui/components/tm-comment/tm-comment.vue b/src/tmui/components/tm-comment/tm-comment.vue index 7540385..7218029 100644 --- a/src/tmui/components/tm-comment/tm-comment.vue +++ b/src/tmui/components/tm-comment/tm-comment.vue @@ -139,12 +139,21 @@ align:{ type:String, default:"right" //right,left - } + }, + // 自动格式化时间 + autoFormatTime: { + type: Boolean, + default: true, + } }) - //距离当前时间段。 - const _time = computed(()=>uni.$tm.u.getDateToNewData(props.time)) + // 距离当前时间段。 + const _time = computed(() => { + if (!props.autoFormatTime) + return props.time + return uni.$tm.u.getDateToNewData(props.time) + }) const _align = computed(()=>{ let agn = { -- Gitee