@fmdevui/fm-dev 1.0.46 → 1.0.48

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,8 +1,8 @@
1
1
  import { CustomAxiosRequestConfig } from '../utils/request';
2
- import { AxiosRequestConfig, AxiosResponse } from 'axios';
3
- export declare const useBaseApi: (module: string, options?: AxiosRequestConfig) => {
2
+ import { AxiosResponse } from 'axios';
3
+ export declare const useBaseApi: (module: string, options?: CustomAxiosRequestConfig) => {
4
4
  baseUrl: string;
5
- request: <T>(config: AxiosRequestConfig<T>, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
5
+ request: <T>(config: CustomAxiosRequestConfig, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
6
6
  pcomm: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
7
7
  post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
8
8
  gcomm: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
@@ -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();
@@ -8,5 +8,12 @@ const getFileUrl = (row) => {
8
8
  return `/${row.filePath}/${row.id}${row.suffix}`;
9
9
  }
10
10
  };
11
+ const showFileUrl = (url) => {
12
+ if (window.__env__.VITE_IMG_URL) {
13
+ return window.__env__.VITE_IMG_URL + url;
14
+ } else {
15
+ return url;
16
+ }
17
+ };
11
18
 
12
- export { getFileUrl };
19
+ 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.46 */
1
+ /*! fm-dev v1.0.48 */
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) :
@@ -22302,6 +22302,13 @@
22302
22302
  return `/${row.filePath}/${row.id}${row.suffix}`;
22303
22303
  }
22304
22304
  };
22305
+ const showFileUrl = (url) => {
22306
+ if (window.__env__.VITE_IMG_URL) {
22307
+ return window.__env__.VITE_IMG_URL + url;
22308
+ } else {
22309
+ return url;
22310
+ }
22311
+ };
22305
22312
 
22306
22313
  var clipboard$1 = {exports: {}};
22307
22314
 
@@ -52613,6 +52620,7 @@
52613
52620
  exports.service = service;
52614
52621
  exports.setIntroduction = setIntroduction;
52615
52622
  exports.setupI18n = setupI18n;
52623
+ exports.showFileUrl = showFileUrl;
52616
52624
  exports.signatureByKSort = signatureByKSort;
52617
52625
  exports.tansParams = tansParams;
52618
52626
  exports.urlToBase64 = urlToBase64;