naive-ui 2.37.1 → 2.37.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -3
- package/dist/index.prod.js +1 -1
- package/es/data-table/src/utils.mjs +3 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/data-table/src/utils.js +5 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -127,9 +127,10 @@ function formatCsvCell(value) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
export function generateCsv(columns, data) {
|
|
130
|
-
const
|
|
130
|
+
const exportableColumns = columns.filter(column => column.type !== 'expand' && column.type !== 'selection');
|
|
131
|
+
const header = exportableColumns.map(col => col.title).join(',');
|
|
131
132
|
const rows = data.map(row => {
|
|
132
|
-
return
|
|
133
|
+
return exportableColumns.map(col => formatCsvCell(row[col.key])).join(',');
|
|
133
134
|
});
|
|
134
135
|
return [header, ...rows].join('\n');
|
|
135
136
|
}
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.37.
|
|
1
|
+
declare const _default: "2.37.2";
|
|
2
2
|
export default _default;
|
package/es/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.37.
|
|
1
|
+
export default '2.37.2';
|
|
@@ -159,9 +159,12 @@ function formatCsvCell(value) {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
function generateCsv(columns, data) {
|
|
162
|
-
const
|
|
162
|
+
const exportableColumns = columns.filter((column) => column.type !== 'expand' && column.type !== 'selection');
|
|
163
|
+
const header = exportableColumns.map((col) => col.title).join(',');
|
|
163
164
|
const rows = data.map((row) => {
|
|
164
|
-
return
|
|
165
|
+
return exportableColumns
|
|
166
|
+
.map((col) => formatCsvCell(row[col.key]))
|
|
167
|
+
.join(',');
|
|
165
168
|
});
|
|
166
169
|
return [header, ...rows].join('\n');
|
|
167
170
|
}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.37.
|
|
1
|
+
declare const _default: "2.37.2";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/web-types.json
CHANGED