| | |
| | | } |
| | | } |
| | | |
| | | export function formatDate(value) { |
| | | if (!value){ |
| | | return "---" |
| | | }else{ |
| | | let date = new Date(value); |
| | | let month = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1); |
| | | let day = (date.getDate()+1 < 10 ? '0'+(date.getDate()+1) : date.getDate()+1); |
| | | let hours = date.getHours(); |
| | | if (hours < 10) |
| | | hours = "0" + hours; |
| | | let minutes = date.getMinutes(); |
| | | if (minutes < 10) |
| | | minutes = "0" + minutes; |
| | | let time = date.getFullYear() + "-" + month + "-" + day + |
| | | " " + hours +":" + minutes ; |
| | | // + hours + ":" + minutes |
| | | return time; |
| | | } |
| | | } |
| | | |
| | | /* 数字 格式化*/ |
| | | export function numberFormatter(num, digits) { |
| | | const si = [ |