flameresttable 1.0.71 → 1.0.73

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flameresttable",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -65,6 +65,11 @@ export default class FlameTable<T> {
65
65
  */
66
66
  public RowsSelected: Array<T> = [];
67
67
 
68
+ /**
69
+ * Состояние экспорта
70
+ */
71
+ public exportStatus: 'completed' | 'exportprocess' | string = 'completed';
72
+
68
73
  /**
69
74
  * Проинициализировать модели
70
75
  */
@@ -221,6 +226,8 @@ export default class FlameTable<T> {
221
226
 
222
227
  else {
223
228
 
229
+ this.exportStatus = 'completed';
230
+
224
231
  // Файл: скачиваем
225
232
  if (typeof this.opts.customDownloadHandler === 'function') {
226
233
  // Кастомный загрузчик
@@ -504,6 +511,8 @@ export default class FlameTable<T> {
504
511
 
505
512
  }
506
513
 
514
+ this.exportStatus = 'exportprocess';
515
+
507
516
  // Делаем запрос на отдачу
508
517
  this.update(customFilter, customFilter.export.filename ?? null);
509
518
 
@@ -49,6 +49,11 @@
49
49
  <!-- ДЕЙСТВИЯ С ОТМЕЧЕННЫМИ -->
50
50
  <div class="fc">
51
51
  <div>
52
+ <div class="inline-block">
53
+ <span v-if="state.Table.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,7 @@ 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,
110
115
  })
111
116
 
112
117
  const selectAction = () => {
@@ -115,10 +120,10 @@ const selectAction = () => {
115
120
  case 0:
116
121
  break;
117
122
  case 1:
118
- state.Table.exportToXLS(true);
123
+ state.Table.exportToXLS(true, null, null, null, state);
119
124
  break;
120
125
  case 2:
121
- state.Table.exportToXLS();
126
+ state.Table.exportToXLS(false, null, null, null, state);
122
127
  break;
123
128
  }
124
129
 
Binary file