cosey 0.3.9 → 0.3.10
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.
|
@@ -139,12 +139,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
139
139
|
if (!Array.isArray(sums[0])) {
|
|
140
140
|
sums = [sums];
|
|
141
141
|
}
|
|
142
|
-
data.push(...sums.map(sum => {
|
|
143
|
-
return columns.
|
|
144
|
-
|
|
145
|
-
return row;
|
|
146
|
-
}, {});
|
|
147
|
-
}));
|
|
142
|
+
data.push(...sums.map(sum => sum.filter((_, index) => {
|
|
143
|
+
return columns[index].type === "selection" ? false : true;
|
|
144
|
+
}).map(item => getVNodeText(item))));
|
|
148
145
|
}
|
|
149
146
|
return data;
|
|
150
147
|
});
|
package/package.json
CHANGED
package/utils/excel/index.js
CHANGED
|
@@ -133,12 +133,17 @@ async function exportExcel(scheme, data, options) {
|
|
|
133
133
|
const fColumns = flatColumns(columns);
|
|
134
134
|
const ooa = Array.isArray(data) ? data : data[name];
|
|
135
135
|
let aoa = ooa.map(
|
|
136
|
-
(obj, index) => fColumns.map((column) => {
|
|
137
|
-
if (
|
|
138
|
-
|
|
136
|
+
(obj, index) => fColumns.map((column, colIndex) => {
|
|
137
|
+
if (index < ooa.length - footerCount) {
|
|
138
|
+
if (column.type === "index") {
|
|
139
|
+
return index + 1;
|
|
140
|
+
} else {
|
|
141
|
+
const value = obj[column.prop];
|
|
142
|
+
return transform ? transform(obj, column, value, index) : value;
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
return obj[colIndex];
|
|
139
146
|
}
|
|
140
|
-
const value = obj[column.prop];
|
|
141
|
-
return transform && index < ooa.length - footerCount ? transform(obj, column, value, index) : value;
|
|
142
147
|
})
|
|
143
148
|
);
|
|
144
149
|
let headAoa = [];
|