flameresttable 1.0.10 → 1.0.11

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.10",
3
+ "version": "1.0.11",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -147,7 +147,7 @@
147
147
  class="flex-1 border border-slate-100 mr-5 w-full flex self-stretch">
148
148
 
149
149
  <div class="flex-1">
150
- {{ fileGetData(Table.columns[column].Popup.model, false)?.name }}
150
+ {{ getFileName(Table.columns[column].Popup.model) }}
151
151
  </div>
152
152
 
153
153
  <!-- Загрузчик-->
@@ -349,6 +349,21 @@ export default defineComponent({
349
349
 
350
350
  return null
351
351
 
352
+ },
353
+
354
+ getFileName(fileModel: any) {
355
+ const res = this.fileGetData(fileModel, false)
356
+ if (res?.name) {
357
+ if (typeof res.name === 'string' && res.name !== '') {
358
+ return res.name;
359
+ }
360
+ else {
361
+ if (res.file) {
362
+ const splitted = res.file.split('.');
363
+ return 'File.' + splitted[splitted.length - 1];
364
+ }
365
+ }
366
+ }
352
367
  }
353
368
  },
354
369