@fmdevui/fm-dev 1.0.47 → 1.0.49

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,2 +1,8 @@
1
1
  declare const getFileUrl: (row: any) => string;
2
- export { getFileUrl, };
2
+ /**
3
+ *
4
+ * @param url 显示文件短地址
5
+ * @returns
6
+ */
7
+ declare const showFileUrl: (url: any) => any;
8
+ export { getFileUrl, showFileUrl, };
package/es/index.mjs CHANGED
@@ -30,7 +30,7 @@ export { formatAxis, formatDate, formatPast, getWeek } from './packages/core/uti
30
30
  export { useChangeColor } from './packages/core/utils/comm/theme.mjs';
31
31
  export { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, getFileName, openWindow } from './packages/core/utils/comm/download.mjs';
32
32
  export { signatureByKSort } from './packages/core/utils/comm/data-signature.mjs';
33
- export { getFileUrl } from './packages/core/utils/comm/uploadfileurl.mjs';
33
+ export { getFileUrl, showFileUrl } from './packages/core/utils/comm/uploadfileurl.mjs';
34
34
  export { default as commonFunction } from './packages/core/utils/comm/commonFunction.mjs';
35
35
  export { commonFunctionObj } from './packages/core/utils/comm/index.mjs';
36
36
  export { PUB } from './packages/core/utils/const/index.mjs';
@@ -31,7 +31,7 @@ export { formatAxis, formatDate, formatPast, getWeek } from './utils/comm/format
31
31
  export { useChangeColor } from './utils/comm/theme.mjs';
32
32
  export { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, getFileName, openWindow } from './utils/comm/download.mjs';
33
33
  export { signatureByKSort } from './utils/comm/data-signature.mjs';
34
- export { getFileUrl } from './utils/comm/uploadfileurl.mjs';
34
+ export { getFileUrl, showFileUrl } from './utils/comm/uploadfileurl.mjs';
35
35
  export { default as commonFunction } from './utils/comm/commonFunction.mjs';
36
36
  export { commonFunctionObj } from './utils/comm/index.mjs';
37
37
  export { PUB } from './utils/const/index.mjs';
@@ -3,7 +3,7 @@ export { formatAxis, formatDate, formatPast, getWeek } from './formatTime.mjs';
3
3
  export { useChangeColor } from './theme.mjs';
4
4
  export { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, getFileName, openWindow } from './download.mjs';
5
5
  export { signatureByKSort } from './data-signature.mjs';
6
- export { getFileUrl } from './uploadfileurl.mjs';
6
+ export { getFileUrl, showFileUrl } from './uploadfileurl.mjs';
7
7
  import commonFunction from './commonFunction.mjs';
8
8
 
9
9
  const commonFunctionObj = commonFunction();
@@ -2,11 +2,15 @@ const getFileUrl = (row) => {
2
2
  if (row.bucketName == "Local") {
3
3
  return `/${row.filePath}/${row.id}${row.suffix}`;
4
4
  } else {
5
- if (row.bucketName && row.bucketName != "")
6
- return `/${row.bucketName}/${row.filePath}/${row.id}${row.suffix}`;
7
- else
8
- return `/${row.filePath}/${row.id}${row.suffix}`;
5
+ return `/${row.filePath}/${row.id}${row.suffix}`;
6
+ }
7
+ };
8
+ const showFileUrl = (url) => {
9
+ if (window.__env__.VITE_IMG_URL) {
10
+ return window.__env__.VITE_IMG_URL + url;
11
+ } else {
12
+ return url;
9
13
  }
10
14
  };
11
15
 
12
- export { getFileUrl };
16
+ export { getFileUrl, showFileUrl };
@@ -10,5 +10,5 @@ export { formatAxis, formatDate, formatPast, getWeek } from './comm/formatTime.m
10
10
  export { useChangeColor } from './comm/theme.mjs';
11
11
  export { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, getFileName, openWindow } from './comm/download.mjs';
12
12
  export { signatureByKSort } from './comm/data-signature.mjs';
13
- export { getFileUrl } from './comm/uploadfileurl.mjs';
13
+ export { getFileUrl, showFileUrl } from './comm/uploadfileurl.mjs';
14
14
  export { default as commonFunction } from './comm/commonFunction.mjs';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.47 */
1
+ /*! fm-dev v1.0.49 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
@@ -22296,10 +22296,14 @@
22296
22296
  if (row.bucketName == "Local") {
22297
22297
  return `/${row.filePath}/${row.id}${row.suffix}`;
22298
22298
  } else {
22299
- if (row.bucketName && row.bucketName != "")
22300
- return `/${row.bucketName}/${row.filePath}/${row.id}${row.suffix}`;
22301
- else
22302
- return `/${row.filePath}/${row.id}${row.suffix}`;
22299
+ return `/${row.filePath}/${row.id}${row.suffix}`;
22300
+ }
22301
+ };
22302
+ const showFileUrl = (url) => {
22303
+ if (window.__env__.VITE_IMG_URL) {
22304
+ return window.__env__.VITE_IMG_URL + url;
22305
+ } else {
22306
+ return url;
22303
22307
  }
22304
22308
  };
22305
22309
 
@@ -52613,6 +52617,7 @@
52613
52617
  exports.service = service;
52614
52618
  exports.setIntroduction = setIntroduction;
52615
52619
  exports.setupI18n = setupI18n;
52620
+ exports.showFileUrl = showFileUrl;
52616
52621
  exports.signatureByKSort = signatureByKSort;
52617
52622
  exports.tansParams = tansParams;
52618
52623
  exports.urlToBase64 = urlToBase64;