From f983ffcaa475cfbc5eca1d355f63d9d8c82eeee6 Mon Sep 17 00:00:00 2001 From: sc Date: Thu, 13 Jan 2022 10:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=20v-time=20=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E6=94=AF=E6=8C=8110=E4=BD=8D=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directives/time.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/directives/time.js b/src/directives/time.js index 7f1c3e13..ed9b6b9f 100644 --- a/src/directives/time.js +++ b/src/directives/time.js @@ -61,7 +61,10 @@ var Time = { export default { mounted(el, binding) { - const { value, modifiers} = binding + let { value, modifiers} = binding + if(value.toString().length == 10){ + value = value * 1000 + } if (modifiers.tip) { el.innerHTML = Time.getFormateTime(value) el.__timeout__ = setInterval(() => {