Commit b8080b2b by 傅凯

修复处理函数日期判断不对缺陷

parent 2f40df9c
......@@ -30,7 +30,9 @@ export default class Utils{
if(!obj[key])
target[nkey] = obj[key];
else if(obj[key] instanceof Array)
target[nkey] = obj[key];
target[nkey] = obj[key];
else if(obj[key] instanceof Date)
target[nkey] = obj[key];
else if(typeof obj[key] == "object")
Utils.flatObject(obj[key],target,nkey); //递归赋值
else
......@@ -60,7 +62,7 @@ export default class Utils{
{
let leafProp = keyArr[keyArr.length - 1];
if(tempobj.hasOwnProperty(leafProp))
tempobj[leafProp]=obj[key];
tempobj[leafProp]=vo[key];
}
}
return target;
......
......@@ -10,6 +10,11 @@ export function findCodeLabel(codes,val)
}
export function dateFormat (date, format) {
if(!date)
return date
if(typeof date == 'string')
date = new Date(date)
let _format = format || 'yyyy-MM-dd';
const d = date;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment