cosey 0.3.8 → 0.3.9

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.
@@ -110,7 +110,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
110
110
  };
111
111
  const exportColumns = computed(() => {
112
112
  return renderedColumns.value?.filter(column => {
113
- return !isNullish(column.prop || column.property) && (column.prop || column.property) !== "" || column.columns && column.columns.length > 0;
113
+ return !isNullish(column.prop || column.property) && (column.prop || column.property) !== "" || column.columns && column.columns.length > 0 || column.type === "index";
114
114
  });
115
115
  });
116
116
  watch([() => props.columns, () => props.actionColumn], () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -134,6 +134,9 @@ async function exportExcel(scheme, data, options) {
134
134
  const ooa = Array.isArray(data) ? data : data[name];
135
135
  let aoa = ooa.map(
136
136
  (obj, index) => fColumns.map((column) => {
137
+ if (column.type === "index") {
138
+ return index + 1;
139
+ }
137
140
  const value = obj[column.prop];
138
141
  return transform && index < ooa.length - footerCount ? transform(obj, column, value, index) : value;
139
142
  })