增强 v-time 指令支持10位时间戳

This commit is contained in:
sc 2022-01-13 10:21:07 +08:00
parent 012e9f1166
commit f983ffcaa4
1 changed files with 4 additions and 1 deletions

View File

@ -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(() => {