no message

Former-commit-id: 749c159b54ea39951ddad455ca99256a55745644
Former-commit-id: 2dda6f7f898b9fc36d236eb478a615d9cd03ba1f
Former-commit-id: a21343caef3ca2939d104cbdba14780da79381ef
This commit is contained in:
李杨
2018-02-09 19:52:42 +08:00
parent c997f662e8
commit 554162775c
2 changed files with 14 additions and 11 deletions

View File

@@ -30,11 +30,12 @@ export default function csv(columns, datas, options, noHeader = false) {
if (columns) {
columnOrder = columns.map(v => {
console.log(v)
if (typeof v === 'string') return v;
if (!noHeader) {
column.push(typeof v.title !== 'undefined' ? v.title : v.key);
column.push(typeof v.label !== 'undefined' ? v.label : v.prop);
}
return v.key;
return v.prop;
});
if (column.length > 0) appendLine(content, column, options);
} else {