@fmdeui/fmui 1.0.129 → 1.0.131
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 +15 -3
- package/es/utils/uploadfileurl.d.ts +2 -1
- package/index.js +16 -3
- package/index.min.js +7 -7
- package/index.min.mjs +7 -7
- package/index.mjs +16 -4
- package/lib/index.js +1 -0
- package/lib/packages/utils/index.js +1 -0
- package/lib/packages/utils/uploadfileurl.js +15 -2
- 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}/version.css +0 -0
- /package/{es/component.css → lib/defaults.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, showFileUrlByType } 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, showFileUrlByType } 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';
|
|
@@ -35,12 +35,24 @@ const showFileUrlByType = (url) => {
|
|
|
35
35
|
return url;
|
|
36
36
|
}
|
|
37
37
|
} else {
|
|
38
|
+
return "/" + fileType;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const getFileDownloadUrl = (url) => {
|
|
42
|
+
if (url == "" || url == null || url == void 0) {
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
const match = url.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/);
|
|
46
|
+
const ftype = match ? match[1].toLowerCase() : "";
|
|
47
|
+
let fileType = getFileTypeByPath(ftype);
|
|
48
|
+
if (fileType != "") {
|
|
38
49
|
if (window.__env__.VITE_IMG_URL) {
|
|
39
|
-
return window.__env__.VITE_IMG_URL +
|
|
50
|
+
return window.__env__.VITE_IMG_URL + url;
|
|
40
51
|
} else {
|
|
41
|
-
return
|
|
52
|
+
return url;
|
|
42
53
|
}
|
|
43
54
|
}
|
|
55
|
+
return "";
|
|
44
56
|
};
|
|
45
57
|
const getFileTypeByPath = (Suffix) => {
|
|
46
58
|
switch (Suffix) {
|
|
@@ -84,4 +96,4 @@ const getFileTypeByPath = (Suffix) => {
|
|
|
84
96
|
}
|
|
85
97
|
};
|
|
86
98
|
|
|
87
|
-
export { getFileUrl, showFileUrl, showFileUrlByType };
|
|
99
|
+
export { getFileDownloadUrl, getFileUrl, showFileUrl, showFileUrlByType };
|
|
@@ -6,4 +6,5 @@ declare const getFileUrl: (row: any) => string;
|
|
|
6
6
|
*/
|
|
7
7
|
declare const showFileUrl: (url: any) => any;
|
|
8
8
|
declare const showFileUrlByType: (url: any) => any;
|
|
9
|
-
|
|
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.131 */
|
|
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) :
|
|
@@ -2271,12 +2271,24 @@
|
|
|
2271
2271
|
return url;
|
|
2272
2272
|
}
|
|
2273
2273
|
} else {
|
|
2274
|
+
return "/" + fileType;
|
|
2275
|
+
}
|
|
2276
|
+
};
|
|
2277
|
+
const getFileDownloadUrl = (url) => {
|
|
2278
|
+
if (url == "" || url == null || url == void 0) {
|
|
2279
|
+
return "";
|
|
2280
|
+
}
|
|
2281
|
+
const match = url.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/);
|
|
2282
|
+
const ftype = match ? match[1].toLowerCase() : "";
|
|
2283
|
+
let fileType = getFileTypeByPath(ftype);
|
|
2284
|
+
if (fileType != "") {
|
|
2274
2285
|
if (window.__env__.VITE_IMG_URL) {
|
|
2275
|
-
return window.__env__.VITE_IMG_URL +
|
|
2286
|
+
return window.__env__.VITE_IMG_URL + url;
|
|
2276
2287
|
} else {
|
|
2277
|
-
return
|
|
2288
|
+
return url;
|
|
2278
2289
|
}
|
|
2279
2290
|
}
|
|
2291
|
+
return "";
|
|
2280
2292
|
};
|
|
2281
2293
|
const getFileTypeByPath = (Suffix) => {
|
|
2282
2294
|
switch (Suffix) {
|
|
@@ -33858,6 +33870,7 @@
|
|
|
33858
33870
|
exports.getBdate = getBdate;
|
|
33859
33871
|
exports.getCountryCode = getCountryCode;
|
|
33860
33872
|
exports.getEdate = getEdate;
|
|
33873
|
+
exports.getFileDownloadUrl = getFileDownloadUrl;
|
|
33861
33874
|
exports.getFileName = getFileName;
|
|
33862
33875
|
exports.getFileUrl = getFileUrl;
|
|
33863
33876
|
exports.getFormItemLabel = getFormItemLabel;
|