@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.
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.47 */
1
+ /*! fm-dev v1.0.49 */
2
2
  import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, withModifiers, resolveDynamicComponent, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, markRaw, toRaw as toRaw$1, hasInjectionContext, unref, isReactive as isReactive$1, toRef, getCurrentScope, onScopeDispose, toRefs, resolveDirective } from 'vue';
3
3
  import crypto from 'crypto';
4
4
  import require$$0 from 'url';
@@ -22301,10 +22301,14 @@ const getFileUrl = (row) => {
22301
22301
  if (row.bucketName == "Local") {
22302
22302
  return `/${row.filePath}/${row.id}${row.suffix}`;
22303
22303
  } else {
22304
- if (row.bucketName && row.bucketName != "")
22305
- return `/${row.bucketName}/${row.filePath}/${row.id}${row.suffix}`;
22306
- else
22307
- return `/${row.filePath}/${row.id}${row.suffix}`;
22304
+ return `/${row.filePath}/${row.id}${row.suffix}`;
22305
+ }
22306
+ };
22307
+ const showFileUrl = (url) => {
22308
+ if (window.__env__.VITE_IMG_URL) {
22309
+ return window.__env__.VITE_IMG_URL + url;
22310
+ } else {
22311
+ return url;
22308
22312
  }
22309
22313
  };
22310
22314
 
@@ -52551,4 +52555,4 @@ const version = "1.0.0";
52551
52555
 
52552
52556
  const install = installer.install;
52553
52557
 
52554
- export { AccountTypeEnum, FmDragImg, FmLogin, FmNoticeBar, FmTransfer, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast, getCountryCode, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setIntroduction, setupI18n, signatureByKSort, tansParams, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
52558
+ export { AccountTypeEnum, FmDragImg, FmLogin, FmNoticeBar, FmTransfer, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast, getCountryCode, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setIntroduction, setupI18n, showFileUrl, signatureByKSort, tansParams, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
@@ -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/lib/index.js CHANGED
@@ -139,6 +139,7 @@ exports.getFileName = download.getFileName;
139
139
  exports.openWindow = download.openWindow;
140
140
  exports.signatureByKSort = dataSignature.signatureByKSort;
141
141
  exports.getFileUrl = uploadfileurl.getFileUrl;
142
+ exports.showFileUrl = uploadfileurl.showFileUrl;
142
143
  exports.commonFunction = commonFunction.default;
143
144
  exports.commonFunctionObj = index$f.commonFunctionObj;
144
145
  exports.PUB = index$g.PUB;
@@ -139,6 +139,7 @@ exports.getFileName = download.getFileName;
139
139
  exports.openWindow = download.openWindow;
140
140
  exports.signatureByKSort = dataSignature.signatureByKSort;
141
141
  exports.getFileUrl = uploadfileurl.getFileUrl;
142
+ exports.showFileUrl = uploadfileurl.showFileUrl;
142
143
  exports.commonFunction = commonFunction.default;
143
144
  exports.commonFunctionObj = index$e.commonFunctionObj;
144
145
  exports.PUB = index$f.PUB;
@@ -48,5 +48,6 @@ exports.getFileName = download.getFileName;
48
48
  exports.openWindow = download.openWindow;
49
49
  exports.signatureByKSort = dataSignature.signatureByKSort;
50
50
  exports.getFileUrl = uploadfileurl.getFileUrl;
51
+ exports.showFileUrl = uploadfileurl.showFileUrl;
51
52
  exports.commonFunction = commonFunction.default;
52
53
  exports.commonFunctionObj = commonFunctionObj;
@@ -4,11 +4,16 @@ const getFileUrl = (row) => {
4
4
  if (row.bucketName == "Local") {
5
5
  return `/${row.filePath}/${row.id}${row.suffix}`;
6
6
  } else {
7
- if (row.bucketName && row.bucketName != "")
8
- return `/${row.bucketName}/${row.filePath}/${row.id}${row.suffix}`;
9
- else
10
- return `/${row.filePath}/${row.id}${row.suffix}`;
7
+ return `/${row.filePath}/${row.id}${row.suffix}`;
8
+ }
9
+ };
10
+ const showFileUrl = (url) => {
11
+ if (window.__env__.VITE_IMG_URL) {
12
+ return window.__env__.VITE_IMG_URL + url;
13
+ } else {
14
+ return url;
11
15
  }
12
16
  };
13
17
 
14
18
  exports.getFileUrl = getFileUrl;
19
+ exports.showFileUrl = showFileUrl;
@@ -69,4 +69,5 @@ exports.getFileName = download.getFileName;
69
69
  exports.openWindow = download.openWindow;
70
70
  exports.signatureByKSort = dataSignature.signatureByKSort;
71
71
  exports.getFileUrl = uploadfileurl.getFileUrl;
72
+ exports.showFileUrl = uploadfileurl.showFileUrl;
72
73
  exports.commonFunction = commonFunction.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [
File without changes