@fmdeui/fmui 1.0.82 → 1.0.83
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/hooks/authFunction.d.ts +1 -1
- package/es/hooks/limitsFunction.d.ts +2 -1
- package/es/index.mjs +2 -2
- package/es/packages/hooks/authFunction.mjs +4 -4
- package/es/packages/hooks/index.mjs +2 -2
- package/es/packages/hooks/limitsFunction.mjs +11 -2
- package/index.js +17 -7
- package/index.min.js +6 -6
- package/index.min.mjs +6 -6
- package/index.mjs +15 -6
- package/lib/hooks/authFunction.d.ts +1 -1
- package/lib/hooks/limitsFunction.d.ts +2 -1
- package/lib/index.js +3 -2
- package/lib/packages/hooks/authFunction.js +4 -4
- package/lib/packages/hooks/index.js +3 -2
- package/lib/packages/hooks/limitsFunction.js +12 -2
- 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/{index.css → defaults.css} +0 -0
|
@@ -38,4 +38,4 @@ export declare function hAuths<T extends VNode>(el: T, value: Array<string>): T;
|
|
|
38
38
|
* @returns VNode
|
|
39
39
|
*/
|
|
40
40
|
export declare function hAuthAll<T extends VNode>(el: T, value: Array<string>): T;
|
|
41
|
-
export declare function
|
|
41
|
+
export declare function getRules(value: string, field: string, msg: string): string;
|
|
@@ -4,4 +4,5 @@ export declare function getlimit(value: string): any;
|
|
|
4
4
|
* @param value 表单字段路径
|
|
5
5
|
* @returns 表单字段属性
|
|
6
6
|
*/
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function getFormItemProp(path: string, field: string): boolean;
|
|
8
|
+
export declare function getFormItemLabel(path: string, field: string, defaultValue: string): string;
|
package/es/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ export { Local, Session } from './packages/utils/storage.mjs';
|
|
|
16
16
|
export { NextLoading } from './packages/utils/loading.mjs';
|
|
17
17
|
export { StringToObj } from './packages/utils/json-utils.mjs';
|
|
18
18
|
export { accessTokenKey, axiosInstance, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, decryptJWT, getHeader, getJWTDate, getToken, reLoadLoginAccessToken, refreshAccessTokenKey, request2, default as service, sleep, tansParams } from './packages/utils/request.mjs';
|
|
19
|
-
export { auth, authAll, auths,
|
|
19
|
+
export { auth, authAll, auths, getRules, hAuth, hAuthAll, hAuths } from './packages/hooks/authFunction.mjs';
|
|
20
20
|
export { base64ToFile, blobToFile, dataURLtoBlob, fileToBase64, urlToBase64 } from './packages/utils/base64Conver.mjs';
|
|
21
21
|
export { buildLocaleContext, buildTranslator, translate, useLocale } from './packages/hooks/useLocale.mjs';
|
|
22
22
|
export { clone, isObjectValueEqual, judgementSameArr, removeDuplicate } from './packages/utils/arrayOperation.mjs';
|
|
@@ -30,7 +30,7 @@ export { flowLoading } from './packages/utils/flowLoading.mjs';
|
|
|
30
30
|
export { formatAxis, formatDate, formatPast, getWeek } from './packages/utils/formatTime.mjs';
|
|
31
31
|
export { gcj02ToBd09, wgs84ToBd09, wgs84ToGcj02 } from './packages/utils/gpsConvertor.mjs';
|
|
32
32
|
export { getFileUrl, showFileUrl } from './packages/utils/uploadfileurl.mjs';
|
|
33
|
-
export {
|
|
33
|
+
export { getFormItemLabel, getFormItemProp, getlimit } from './packages/hooks/limitsFunction.mjs';
|
|
34
34
|
export { getpower, powerAuthDel } from './packages/hooks/powerFunction.mjs';
|
|
35
35
|
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';
|
|
36
36
|
export { loadSysInfo, updateFavicon } from './packages/hooks/sysInfo.mjs';
|
|
@@ -30,7 +30,7 @@ function hAuths(el, value) {
|
|
|
30
30
|
function hAuthAll(el, value) {
|
|
31
31
|
return withDirectives(el, [[resolveDirective("auth-all"), value]]);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function getRules(value, field, msg) {
|
|
34
34
|
const stores = useUserInfo();
|
|
35
35
|
const item = stores.userInfos.formDes.find((item2) => item2.path === value);
|
|
36
36
|
let rels = [];
|
|
@@ -38,12 +38,12 @@ function fdRules(value, field) {
|
|
|
38
38
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
39
39
|
if (xitem) {
|
|
40
40
|
if (xitem.isRequired == 1)
|
|
41
|
-
rels.push({ required: true, message:
|
|
41
|
+
rels.push({ required: true, message: msg, trigger: "blur" });
|
|
42
42
|
if (xitem.isFromValid == 1)
|
|
43
|
-
rels.push({ pattern: /^[1-9]\d*$/, message:
|
|
43
|
+
rels.push({ pattern: /^[1-9]\d*$/, message: msg, trigger: "blur" });
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
return rels;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export { auth, authAll, auths,
|
|
49
|
+
export { auth, authAll, auths, getRules, hAuth, hAuthAll, hAuths };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { buildLocaleContext, buildTranslator, translate, useLocale } from './useLocale.mjs';
|
|
2
|
-
export { auth, authAll, auths,
|
|
2
|
+
export { auth, authAll, auths, getRules, hAuth, hAuthAll, hAuths } from './authFunction.mjs';
|
|
3
3
|
export { getpower, powerAuthDel } from './powerFunction.mjs';
|
|
4
4
|
export { useVxeTable } from './useVxeTableOptionsHook.mjs';
|
|
5
5
|
export { loadSysInfo, updateFavicon } from './sysInfo.mjs';
|
|
@@ -7,4 +7,4 @@ export { cmpId, depId, getOpOrg, groupId, hasPrivilege, hasRoleCode, isAdmin, is
|
|
|
7
7
|
export { useDateTimeShortCust } from './dateTimeShortCust.mjs';
|
|
8
8
|
export { destroyIdleTimeout, initIdleTimeout, updateIdleTimeout } from './idleTimeout.mjs';
|
|
9
9
|
export { provideFormEvents, useFormEvents } from './composables/useDialogEvents.mjs';
|
|
10
|
-
export {
|
|
10
|
+
export { getFormItemLabel, getFormItemProp, getlimit } from './limitsFunction.mjs';
|
|
@@ -7,7 +7,7 @@ function getlimit(value) {
|
|
|
7
7
|
if (matched) return matched.limit;
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function getFormItemProp(path, field) {
|
|
11
11
|
const stores = useUserInfo();
|
|
12
12
|
const item = stores.userInfos.formDes.find((item2) => item2.path === path);
|
|
13
13
|
if (item && item.formDes.length > 0) {
|
|
@@ -16,5 +16,14 @@ function getFrmItemProp(path, field) {
|
|
|
16
16
|
}
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
|
+
function getFormItemLabel(path, field, defaultValue) {
|
|
20
|
+
const stores = useUserInfo();
|
|
21
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === path);
|
|
22
|
+
if (item && item.formDes.length > 0) {
|
|
23
|
+
const xitem = item.formDes.find((v) => v.field === field);
|
|
24
|
+
if (xitem) return xitem.title && xitem.title != "" ? xitem.title : defaultValue;
|
|
25
|
+
}
|
|
26
|
+
return defaultValue;
|
|
27
|
+
}
|
|
19
28
|
|
|
20
|
-
export {
|
|
29
|
+
export { getFormItemLabel, getFormItemProp, getlimit };
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.83 */
|
|
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('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('vue-router'), 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', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'vue-router', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
@@ -19937,7 +19937,7 @@
|
|
|
19937
19937
|
function hAuthAll(el, value) {
|
|
19938
19938
|
return vue.withDirectives(el, [[vue.resolveDirective("auth-all"), value]]);
|
|
19939
19939
|
}
|
|
19940
|
-
function
|
|
19940
|
+
function getRules(value, field, msg) {
|
|
19941
19941
|
const stores = useUserInfo();
|
|
19942
19942
|
const item = stores.userInfos.formDes.find((item2) => item2.path === value);
|
|
19943
19943
|
let rels = [];
|
|
@@ -19945,9 +19945,9 @@
|
|
|
19945
19945
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
19946
19946
|
if (xitem) {
|
|
19947
19947
|
if (xitem.isRequired == 1)
|
|
19948
|
-
rels.push({ required: true, message:
|
|
19948
|
+
rels.push({ required: true, message: msg, trigger: "blur" });
|
|
19949
19949
|
if (xitem.isFromValid == 1)
|
|
19950
|
-
rels.push({ pattern: /^[1-9]\d*$/, message:
|
|
19950
|
+
rels.push({ pattern: /^[1-9]\d*$/, message: msg, trigger: "blur" });
|
|
19951
19951
|
}
|
|
19952
19952
|
}
|
|
19953
19953
|
return rels;
|
|
@@ -20491,7 +20491,7 @@
|
|
|
20491
20491
|
if (matched) return matched.limit;
|
|
20492
20492
|
return null;
|
|
20493
20493
|
}
|
|
20494
|
-
function
|
|
20494
|
+
function getFormItemProp(path, field) {
|
|
20495
20495
|
const stores = useUserInfo();
|
|
20496
20496
|
const item = stores.userInfos.formDes.find((item2) => item2.path === path);
|
|
20497
20497
|
if (item && item.formDes.length > 0) {
|
|
@@ -20500,6 +20500,15 @@
|
|
|
20500
20500
|
}
|
|
20501
20501
|
return false;
|
|
20502
20502
|
}
|
|
20503
|
+
function getFormItemLabel(path, field, defaultValue) {
|
|
20504
|
+
const stores = useUserInfo();
|
|
20505
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === path);
|
|
20506
|
+
if (item && item.formDes.length > 0) {
|
|
20507
|
+
const xitem = item.formDes.find((v) => v.field === field);
|
|
20508
|
+
if (xitem) return xitem.title && xitem.title != "" ? xitem.title : defaultValue;
|
|
20509
|
+
}
|
|
20510
|
+
return defaultValue;
|
|
20511
|
+
}
|
|
20503
20512
|
|
|
20504
20513
|
const _hoisted_1$s = { key: 0 };
|
|
20505
20514
|
const _hoisted_2$i = { key: 0 };
|
|
@@ -30679,7 +30688,6 @@
|
|
|
30679
30688
|
exports.downloadStreamFile = downloadStreamFile;
|
|
30680
30689
|
exports.en = en;
|
|
30681
30690
|
exports.exportExcel = exportExcel;
|
|
30682
|
-
exports.fdRules = fdRules;
|
|
30683
30691
|
exports.feature = feature;
|
|
30684
30692
|
exports.fileToBase64 = fileToBase64;
|
|
30685
30693
|
exports.flowLoading = flowLoading;
|
|
@@ -30690,10 +30698,12 @@
|
|
|
30690
30698
|
exports.getCountryCode = getCountryCode;
|
|
30691
30699
|
exports.getFileName = getFileName;
|
|
30692
30700
|
exports.getFileUrl = getFileUrl;
|
|
30693
|
-
exports.
|
|
30701
|
+
exports.getFormItemLabel = getFormItemLabel;
|
|
30702
|
+
exports.getFormItemProp = getFormItemProp;
|
|
30694
30703
|
exports.getHeader = getHeader;
|
|
30695
30704
|
exports.getJWTDate = getJWTDate;
|
|
30696
30705
|
exports.getOpOrg = getOpOrg;
|
|
30706
|
+
exports.getRules = getRules;
|
|
30697
30707
|
exports.getToken = getToken;
|
|
30698
30708
|
exports.getWeek = getWeek;
|
|
30699
30709
|
exports.getlimit = getlimit;
|