flameresttable 1.0.70 → 1.0.72
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/package.json
CHANGED
package/src/Table/FlameTable.ts
CHANGED
|
@@ -224,7 +224,7 @@ export default class FlameTable<T> {
|
|
|
224
224
|
// Файл: скачиваем
|
|
225
225
|
if (typeof this.opts.customDownloadHandler === 'function') {
|
|
226
226
|
// Кастомный загрузчик
|
|
227
|
-
this.opts.customDownloadHandler((rows as any).data, exportFilename)
|
|
227
|
+
this.opts.customDownloadHandler((rows as any).data, exportFilename, (rows as any).MimeType)
|
|
228
228
|
}
|
|
229
229
|
else {
|
|
230
230
|
// Нативный загрузчик через браузер
|
package/src/Table/TableOpts.ts
CHANGED
|
@@ -46,7 +46,7 @@ export default class TableOpts {
|
|
|
46
46
|
/**
|
|
47
47
|
* Кастомный загрузчик файлов
|
|
48
48
|
*/
|
|
49
|
-
public customDownloadHandler: null | ((data:
|
|
49
|
+
public customDownloadHandler: null | ((data: Blob, filename: string, mime: string) => void) = null;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Добавить виртуальный столбец (не будет учтён в запросах, но будет передан на бек для кастомизации фильтров)
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
<!-- ДЕЙСТВИЯ С ОТМЕЧЕННЫМИ -->
|
|
50
50
|
<div class="fc">
|
|
51
51
|
<div>
|
|
52
|
+
<div class="inline-block">
|
|
53
|
+
<span v-if="state.exportStatus === 'exportprocess'" class="text-green-600 bg-green-50 px-2 py-1 mx-2">
|
|
54
|
+
{{ props.table.opts.lang === 'ru' ? 'Загрузка...' : 'Loading...' }}
|
|
55
|
+
</span>
|
|
56
|
+
</div>
|
|
52
57
|
<label>
|
|
53
58
|
<select class="minimal text-xs text-center text-slate-500" v-model="state.selectModel" @change="selectAction">
|
|
54
59
|
<option :value="0">{{ state.opts.lang === 'ru' ? 'ДЕЙСТВИЯ' : 'ACTIONS' }}</option>
|
|
@@ -106,7 +111,8 @@ const emit = defineEmits(['add'])
|
|
|
106
111
|
const state = reactive({
|
|
107
112
|
opts: props.table.opts,
|
|
108
113
|
Table: props.table,
|
|
109
|
-
selectModel: 0
|
|
114
|
+
selectModel: 0,
|
|
115
|
+
exportStatus: 'completed' as 'completed' | 'exportprocess' | 'error'
|
|
110
116
|
})
|
|
111
117
|
|
|
112
118
|
const selectAction = () => {
|