cosey 0.3.7 → 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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, onBeforeMount, createBlock, openBlock, resolveDynamicComponent, unref } from 'vue';
|
|
1
|
+
import { defineComponent, ref, reactive, onBeforeMount, createBlock, openBlock, resolveDynamicComponent, unref, withModifiers } from 'vue';
|
|
2
2
|
import { tableQueryProps, omittedTableQueryProps, tableQueryExposeKeys } from './table-query.js';
|
|
3
3
|
import { reactiveOmit } from '@vueuse/core';
|
|
4
4
|
import { cloneDeep } from 'lodash-es';
|
|
@@ -45,7 +45,11 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
45
45
|
...formQueryProps,
|
|
46
46
|
ref: formQueryRef,
|
|
47
47
|
model: formModel,
|
|
48
|
-
|
|
48
|
+
onKeyup: withModifiers(event => {
|
|
49
|
+
if (event.key === "Enter") {
|
|
50
|
+
onEnter();
|
|
51
|
+
}
|
|
52
|
+
}, ["prevent"])
|
|
49
53
|
}, () => {
|
|
50
54
|
return props.schemes.map(item => {
|
|
51
55
|
const {
|
|
@@ -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
package/utils/excel/index.js
CHANGED
|
@@ -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
|
})
|