@fmdeui/fmui 1.0.128 → 1.0.130
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 +82 -1
- package/es/utils/uploadfileurl.d.ts +3 -1
- package/index.js +75 -1
- package/index.min.js +7 -7
- package/index.min.mjs +7 -7
- package/index.mjs +74 -2
- package/lib/index.js +2 -0
- package/lib/packages/utils/index.js +2 -0
- package/lib/packages/utils/uploadfileurl.js +83 -0
- package/lib/utils/uploadfileurl.d.ts +3 -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/es/{version.css → index.css} +0 -0
- /package/lib/{component.css → make-installer.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 { getFileDownloadUrl, 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 { getFileDownloadUrl, 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,86 @@ 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 getFileDownloadUrl = (url) => {
|
|
46
|
+
if (url == "" || url == null || url == void 0) {
|
|
47
|
+
return "";
|
|
48
|
+
}
|
|
49
|
+
const match = url.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/);
|
|
50
|
+
const ftype = match ? match[1].toLowerCase() : "";
|
|
51
|
+
let fileType = getFileTypeByPath(ftype);
|
|
52
|
+
if (fileType != "") {
|
|
53
|
+
if (window.__env__.VITE_IMG_URL) {
|
|
54
|
+
return window.__env__.VITE_IMG_URL + url;
|
|
55
|
+
} else {
|
|
56
|
+
return url;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return "";
|
|
60
|
+
};
|
|
61
|
+
const getFileTypeByPath = (Suffix) => {
|
|
62
|
+
switch (Suffix) {
|
|
63
|
+
case "doc":
|
|
64
|
+
case "docx":
|
|
65
|
+
return "filetype/word.png";
|
|
66
|
+
break;
|
|
67
|
+
case "xls":
|
|
68
|
+
case "xlsx":
|
|
69
|
+
return "filetype/Excel.png";
|
|
70
|
+
break;
|
|
71
|
+
case "ppt":
|
|
72
|
+
case "pptx":
|
|
73
|
+
return "filetype/ppt.png";
|
|
74
|
+
break;
|
|
75
|
+
case "pdf":
|
|
76
|
+
return "filetype/pdf.png";
|
|
77
|
+
break;
|
|
78
|
+
case "txt":
|
|
79
|
+
return "filetype/txt.png";
|
|
80
|
+
break;
|
|
81
|
+
case "mp3":
|
|
82
|
+
return "filetype/mp3.png";
|
|
83
|
+
break;
|
|
84
|
+
case "mp4":
|
|
85
|
+
case "avi":
|
|
86
|
+
case "wmv":
|
|
87
|
+
return "filetype/video.png";
|
|
88
|
+
break;
|
|
89
|
+
case "zip":
|
|
90
|
+
case "rar":
|
|
91
|
+
case "7z":
|
|
92
|
+
case "gz":
|
|
93
|
+
case "bz2":
|
|
94
|
+
case "tar":
|
|
95
|
+
return "filetype/zip.png";
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
return "";
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
21
102
|
|
|
22
|
-
export { getFileUrl, showFileUrl };
|
|
103
|
+
export { getFileDownloadUrl, getFileUrl, showFileUrl, showFileUrlByType };
|
|
@@ -5,4 +5,6 @@ declare const getFileUrl: (row: any) => string;
|
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
7
|
declare const showFileUrl: (url: any) => any;
|
|
8
|
-
|
|
8
|
+
declare const showFileUrlByType: (url: any) => any;
|
|
9
|
+
declare const getFileDownloadUrl: (url: any) => any;
|
|
10
|
+
export { getFileUrl, showFileUrl, showFileUrlByType, getFileDownloadUrl, };
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.130 */
|
|
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,78 @@
|
|
|
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 getFileDownloadUrl = (url) => {
|
|
2282
|
+
if (url == "" || url == null || url == void 0) {
|
|
2283
|
+
return "";
|
|
2284
|
+
}
|
|
2285
|
+
const match = url.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/);
|
|
2286
|
+
const ftype = match ? match[1].toLowerCase() : "";
|
|
2287
|
+
let fileType = getFileTypeByPath(ftype);
|
|
2288
|
+
if (fileType != "") {
|
|
2289
|
+
if (window.__env__.VITE_IMG_URL) {
|
|
2290
|
+
return window.__env__.VITE_IMG_URL + url;
|
|
2291
|
+
} else {
|
|
2292
|
+
return url;
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
return "";
|
|
2296
|
+
};
|
|
2297
|
+
const getFileTypeByPath = (Suffix) => {
|
|
2298
|
+
switch (Suffix) {
|
|
2299
|
+
case "doc":
|
|
2300
|
+
case "docx":
|
|
2301
|
+
return "filetype/word.png";
|
|
2302
|
+
case "xls":
|
|
2303
|
+
case "xlsx":
|
|
2304
|
+
return "filetype/Excel.png";
|
|
2305
|
+
case "ppt":
|
|
2306
|
+
case "pptx":
|
|
2307
|
+
return "filetype/ppt.png";
|
|
2308
|
+
case "pdf":
|
|
2309
|
+
return "filetype/pdf.png";
|
|
2310
|
+
case "txt":
|
|
2311
|
+
return "filetype/txt.png";
|
|
2312
|
+
case "mp3":
|
|
2313
|
+
return "filetype/mp3.png";
|
|
2314
|
+
case "mp4":
|
|
2315
|
+
case "avi":
|
|
2316
|
+
case "wmv":
|
|
2317
|
+
return "filetype/video.png";
|
|
2318
|
+
case "zip":
|
|
2319
|
+
case "rar":
|
|
2320
|
+
case "7z":
|
|
2321
|
+
case "gz":
|
|
2322
|
+
case "bz2":
|
|
2323
|
+
case "tar":
|
|
2324
|
+
return "filetype/zip.png";
|
|
2325
|
+
default:
|
|
2326
|
+
return "";
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
2257
2329
|
|
|
2258
2330
|
const Local = {
|
|
2259
2331
|
// 查看 v2.4.3版本更新日志
|
|
@@ -33802,6 +33874,7 @@
|
|
|
33802
33874
|
exports.getBdate = getBdate;
|
|
33803
33875
|
exports.getCountryCode = getCountryCode;
|
|
33804
33876
|
exports.getEdate = getEdate;
|
|
33877
|
+
exports.getFileDownloadUrl = getFileDownloadUrl;
|
|
33805
33878
|
exports.getFileName = getFileName;
|
|
33806
33879
|
exports.getFileUrl = getFileUrl;
|
|
33807
33880
|
exports.getFormItemLabel = getFormItemLabel;
|
|
@@ -33863,6 +33936,7 @@
|
|
|
33863
33936
|
exports.setJsCdn = setJsCdn;
|
|
33864
33937
|
exports.setupI18n = setupI18n;
|
|
33865
33938
|
exports.showFileUrl = showFileUrl;
|
|
33939
|
+
exports.showFileUrlByType = showFileUrlByType;
|
|
33866
33940
|
exports.showTabelColumn = showTabelColumn;
|
|
33867
33941
|
exports.signalR = signalR;
|
|
33868
33942
|
exports.signatureByKSort = signatureByKSort;
|