@fmdeui/fmui 1.0.128 → 1.0.129
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/es/index.mjs +1 -1
- package/es/packages/utils/index.mjs +1 -1
- package/es/packages/utils/uploadfileurl.mjs +66 -1
- package/es/utils/uploadfileurl.d.ts +2 -1
- package/index.js +58 -1
- package/index.min.js +7 -7
- package/index.min.mjs +6 -6
- package/index.mjs +58 -2
- package/lib/index.js +1 -0
- package/lib/packages/utils/index.js +1 -0
- package/lib/packages/utils/uploadfileurl.js +66 -0
- package/lib/utils/uploadfileurl.d.ts +2 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- /package/{lib → es}/component.css +0 -0
- /package/{es → lib}/version.css +0 -0
package/es/index.mjs
CHANGED
|
@@ -30,7 +30,7 @@ export { feature, useSysApi } from './packages/api/sys/index.mjs';
|
|
|
30
30
|
export { flowLoading } from './packages/utils/flowLoading.mjs';
|
|
31
31
|
export { formatAxis, formatDate, formatPast, getBdate, getEdate, getWeek } from './packages/utils/formatTime.mjs';
|
|
32
32
|
export { gcj02ToBd09, wgs84ToBd09, wgs84ToGcj02 } from './packages/utils/gpsConvertor.mjs';
|
|
33
|
-
export { getFileUrl, showFileUrl } from './packages/utils/uploadfileurl.mjs';
|
|
33
|
+
export { getFileUrl, showFileUrl, showFileUrlByType } from './packages/utils/uploadfileurl.mjs';
|
|
34
34
|
export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getShowColumnWidth, getSubFormFields, getlimit, showTabelColumn } from './packages/hooks/limitsFunction.mjs';
|
|
35
35
|
export { getpower, powerAuthDel } from './packages/hooks/powerFunction.mjs';
|
|
36
36
|
export { judgementIdCard, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl } from './packages/utils/toolsValidate.mjs';
|
|
@@ -13,7 +13,7 @@ export { gcj02ToBd09, wgs84ToBd09, wgs84ToGcj02 } from './gpsConvertor.mjs';
|
|
|
13
13
|
export { StringToObj } from './json-utils.mjs';
|
|
14
14
|
export { NextLoading } from './loading.mjs';
|
|
15
15
|
import './md5Signature.mjs';
|
|
16
|
-
export { getFileUrl, showFileUrl } from './uploadfileurl.mjs';
|
|
16
|
+
export { getFileUrl, showFileUrl, showFileUrlByType } from './uploadfileurl.mjs';
|
|
17
17
|
export { accessTokenKey, axiosInstance, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, decryptJWT, getHeader, getJWTDate, getToken, reLoadLoginAccessToken, refreshAccessTokenKey, request2, default as service, sleep, tansParams } from './request.mjs';
|
|
18
18
|
export { saulVModel } from './saulVModel.mjs';
|
|
19
19
|
export { AppItem, getAppItemData, getAppItemText } from './gloabdata.mjs';
|
|
@@ -18,5 +18,70 @@ const showFileUrl = (url) => {
|
|
|
18
18
|
return url;
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
+
const showFileUrlByType = (url) => {
|
|
22
|
+
if (url == "" || url == null || url == void 0) {
|
|
23
|
+
return "";
|
|
24
|
+
}
|
|
25
|
+
if (url == "logo.png" || url.includes("base64,") > 0) {
|
|
26
|
+
return url;
|
|
27
|
+
}
|
|
28
|
+
const match = url.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/);
|
|
29
|
+
const ftype = match ? match[1].toLowerCase() : "";
|
|
30
|
+
let fileType = getFileTypeByPath(ftype);
|
|
31
|
+
if (fileType == "") {
|
|
32
|
+
if (window.__env__.VITE_IMG_URL) {
|
|
33
|
+
return window.__env__.VITE_IMG_URL + url;
|
|
34
|
+
} else {
|
|
35
|
+
return url;
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
if (window.__env__.VITE_IMG_URL) {
|
|
39
|
+
return window.__env__.VITE_IMG_URL + fileType;
|
|
40
|
+
} else {
|
|
41
|
+
return fileType;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const getFileTypeByPath = (Suffix) => {
|
|
46
|
+
switch (Suffix) {
|
|
47
|
+
case "doc":
|
|
48
|
+
case "docx":
|
|
49
|
+
return "filetype/word.png";
|
|
50
|
+
break;
|
|
51
|
+
case "xls":
|
|
52
|
+
case "xlsx":
|
|
53
|
+
return "filetype/Excel.png";
|
|
54
|
+
break;
|
|
55
|
+
case "ppt":
|
|
56
|
+
case "pptx":
|
|
57
|
+
return "filetype/ppt.png";
|
|
58
|
+
break;
|
|
59
|
+
case "pdf":
|
|
60
|
+
return "filetype/pdf.png";
|
|
61
|
+
break;
|
|
62
|
+
case "txt":
|
|
63
|
+
return "filetype/txt.png";
|
|
64
|
+
break;
|
|
65
|
+
case "mp3":
|
|
66
|
+
return "filetype/mp3.png";
|
|
67
|
+
break;
|
|
68
|
+
case "mp4":
|
|
69
|
+
case "avi":
|
|
70
|
+
case "wmv":
|
|
71
|
+
return "filetype/video.png";
|
|
72
|
+
break;
|
|
73
|
+
case "zip":
|
|
74
|
+
case "rar":
|
|
75
|
+
case "7z":
|
|
76
|
+
case "gz":
|
|
77
|
+
case "bz2":
|
|
78
|
+
case "tar":
|
|
79
|
+
return "filetype/zip.png";
|
|
80
|
+
break;
|
|
81
|
+
default:
|
|
82
|
+
return "";
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
21
86
|
|
|
22
|
-
export { getFileUrl, showFileUrl };
|
|
87
|
+
export { getFileUrl, showFileUrl, showFileUrlByType };
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.129 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('vue-router'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', 'vue-router', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
@@ -2254,6 +2254,62 @@
|
|
|
2254
2254
|
return url;
|
|
2255
2255
|
}
|
|
2256
2256
|
};
|
|
2257
|
+
const showFileUrlByType = (url) => {
|
|
2258
|
+
if (url == "" || url == null || url == void 0) {
|
|
2259
|
+
return "";
|
|
2260
|
+
}
|
|
2261
|
+
if (url == "logo.png" || url.includes("base64,") > 0) {
|
|
2262
|
+
return url;
|
|
2263
|
+
}
|
|
2264
|
+
const match = url.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/);
|
|
2265
|
+
const ftype = match ? match[1].toLowerCase() : "";
|
|
2266
|
+
let fileType = getFileTypeByPath(ftype);
|
|
2267
|
+
if (fileType == "") {
|
|
2268
|
+
if (window.__env__.VITE_IMG_URL) {
|
|
2269
|
+
return window.__env__.VITE_IMG_URL + url;
|
|
2270
|
+
} else {
|
|
2271
|
+
return url;
|
|
2272
|
+
}
|
|
2273
|
+
} else {
|
|
2274
|
+
if (window.__env__.VITE_IMG_URL) {
|
|
2275
|
+
return window.__env__.VITE_IMG_URL + fileType;
|
|
2276
|
+
} else {
|
|
2277
|
+
return fileType;
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
};
|
|
2281
|
+
const getFileTypeByPath = (Suffix) => {
|
|
2282
|
+
switch (Suffix) {
|
|
2283
|
+
case "doc":
|
|
2284
|
+
case "docx":
|
|
2285
|
+
return "filetype/word.png";
|
|
2286
|
+
case "xls":
|
|
2287
|
+
case "xlsx":
|
|
2288
|
+
return "filetype/Excel.png";
|
|
2289
|
+
case "ppt":
|
|
2290
|
+
case "pptx":
|
|
2291
|
+
return "filetype/ppt.png";
|
|
2292
|
+
case "pdf":
|
|
2293
|
+
return "filetype/pdf.png";
|
|
2294
|
+
case "txt":
|
|
2295
|
+
return "filetype/txt.png";
|
|
2296
|
+
case "mp3":
|
|
2297
|
+
return "filetype/mp3.png";
|
|
2298
|
+
case "mp4":
|
|
2299
|
+
case "avi":
|
|
2300
|
+
case "wmv":
|
|
2301
|
+
return "filetype/video.png";
|
|
2302
|
+
case "zip":
|
|
2303
|
+
case "rar":
|
|
2304
|
+
case "7z":
|
|
2305
|
+
case "gz":
|
|
2306
|
+
case "bz2":
|
|
2307
|
+
case "tar":
|
|
2308
|
+
return "filetype/zip.png";
|
|
2309
|
+
default:
|
|
2310
|
+
return "";
|
|
2311
|
+
}
|
|
2312
|
+
};
|
|
2257
2313
|
|
|
2258
2314
|
const Local = {
|
|
2259
2315
|
// 查看 v2.4.3版本更新日志
|
|
@@ -33863,6 +33919,7 @@
|
|
|
33863
33919
|
exports.setJsCdn = setJsCdn;
|
|
33864
33920
|
exports.setupI18n = setupI18n;
|
|
33865
33921
|
exports.showFileUrl = showFileUrl;
|
|
33922
|
+
exports.showFileUrlByType = showFileUrlByType;
|
|
33866
33923
|
exports.showTabelColumn = showTabelColumn;
|
|
33867
33924
|
exports.signalR = signalR;
|
|
33868
33925
|
exports.signatureByKSort = signatureByKSort;
|