【修改】增加图标 修改删除10个的关键字 修改日期显示格式
This commit is contained in:
+9
-1
@@ -4,6 +4,7 @@
|
||||
* @param fmt
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export function formatDate (value, fmt) {
|
||||
const regPos = /^\d+(\.\d+)?$/
|
||||
if (regPos.test(value)) {
|
||||
@@ -41,6 +42,13 @@ export function formatDate2 (value, fmt) {
|
||||
let hours = dateObject.getHours();
|
||||
let minutes = dateObject.getMinutes();
|
||||
let seconds = dateObject.getSeconds();
|
||||
function timeAdd0(str) {
|
||||
if(str<=9){
|
||||
str='0'+str;
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
console.log(seconds)
|
||||
return `${year}-${month}-${day} ${timeAdd0(hours)}:${timeAdd0(minutes)}:${timeAdd0(seconds)}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user