@fmdeui/fmui 1.0.78 → 1.0.79
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 -0
- package/es/hooks/limitsFunction.d.ts +6 -0
- package/es/index.mjs +2 -2
- package/es/packages/directive/authDirective.mjs +21 -0
- package/es/packages/hooks/authFunction.mjs +11 -1
- package/es/packages/hooks/index.mjs +2 -2
- package/es/packages/hooks/limitsFunction.mjs +7 -1
- package/es/packages/stores/userInfo.mjs +1 -0
- package/index.js +41 -1
- package/index.min.js +6 -6
- package/index.min.mjs +6 -6
- package/index.mjs +40 -2
- package/lib/hooks/authFunction.d.ts +1 -0
- package/lib/hooks/limitsFunction.d.ts +6 -0
- package/lib/index.js +2 -0
- package/lib/packages/directive/authDirective.js +21 -0
- package/lib/packages/hooks/authFunction.js +11 -0
- package/lib/packages/hooks/index.js +2 -0
- package/lib/packages/hooks/limitsFunction.js +7 -0
- package/lib/packages/stores/userInfo.js +1 -0
- 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/{index.css → version.css} +0 -0
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, hAuth, hAuthAll, hAuths } from './packages/hooks/authFunction.mjs';
|
|
19
|
+
export { auth, authAll, auths, fdRules, 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 { getlimit } from './packages/hooks/limitsFunction.mjs';
|
|
33
|
+
export { getFrmItemProp, 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';
|
|
@@ -27,6 +27,27 @@ function authDirective(app) {
|
|
|
27
27
|
if (!flag) el.parentNode.removeChild(el);
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
app.directive("hdtable", {
|
|
31
|
+
mounted(el, binding) {
|
|
32
|
+
const stores = useUserInfo();
|
|
33
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === binding.value);
|
|
34
|
+
if (item && item.isTable == 0) el.parentNode.removeChild(el);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
app.directive("hpquery", {
|
|
38
|
+
mounted(el, binding) {
|
|
39
|
+
const stores = useUserInfo();
|
|
40
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === binding.value);
|
|
41
|
+
if (item && item.isQuery == 0) el.parentNode.removeChild(el);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
app.directive("hpaddupdate", {
|
|
45
|
+
mounted(el, binding) {
|
|
46
|
+
const stores = useUserInfo();
|
|
47
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === binding.value);
|
|
48
|
+
if (item && item.isAddUpdate == 0) el.parentNode.removeChild(el);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
30
51
|
}
|
|
31
52
|
|
|
32
53
|
export { authDirective };
|
|
@@ -30,5 +30,15 @@ function hAuths(el, value) {
|
|
|
30
30
|
function hAuthAll(el, value) {
|
|
31
31
|
return withDirectives(el, [[resolveDirective("auth-all"), value]]);
|
|
32
32
|
}
|
|
33
|
+
function fdRules(value) {
|
|
34
|
+
const stores = useUserInfo();
|
|
35
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === value);
|
|
36
|
+
let rels = [];
|
|
37
|
+
if (item && item.isRequired == 1)
|
|
38
|
+
rels.push({ required: true, message: "\u8BF7\u9009\u62E9", trigger: "blur" });
|
|
39
|
+
if (item && item.isFromValid == 1)
|
|
40
|
+
rels.push({ pattern: /^[1-9]\d*$/, message: "\u8BF7\u9009\u62E9\u6240\u5C5E\u64CD\u4F5C\u90E8", trigger: "blur" });
|
|
41
|
+
return rels;
|
|
42
|
+
}
|
|
33
43
|
|
|
34
|
-
export { auth, authAll, auths, hAuth, hAuthAll, hAuths };
|
|
44
|
+
export { auth, authAll, auths, fdRules, hAuth, hAuthAll, hAuths };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { buildLocaleContext, buildTranslator, translate, useLocale } from './useLocale.mjs';
|
|
2
|
-
export { auth, authAll, auths, hAuth, hAuthAll, hAuths } from './authFunction.mjs';
|
|
2
|
+
export { auth, authAll, auths, fdRules, 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 { getlimit } from './limitsFunction.mjs';
|
|
10
|
+
export { getFrmItemProp, getlimit } from './limitsFunction.mjs';
|
|
@@ -7,5 +7,11 @@ function getlimit(value) {
|
|
|
7
7
|
if (matched) return matched.limit;
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
|
+
function getFrmItemProp(value) {
|
|
11
|
+
const stores = useUserInfo();
|
|
12
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === value);
|
|
13
|
+
if (item) return item.isRequired == 1 || item.isFromValid > 0;
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
10
16
|
|
|
11
|
-
export { getlimit };
|
|
17
|
+
export { getFrmItemProp, getlimit };
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.79 */
|
|
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) :
|
|
@@ -3813,6 +3813,7 @@
|
|
|
3813
3813
|
roles: d.roles,
|
|
3814
3814
|
powers: d.powers,
|
|
3815
3815
|
limits: d.limit,
|
|
3816
|
+
formDesc: d.formDesc,
|
|
3816
3817
|
authApiList: d.apis,
|
|
3817
3818
|
lastChangePasswordTime: d.lastChangePasswordTime,
|
|
3818
3819
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
@@ -3922,6 +3923,27 @@
|
|
|
3922
3923
|
if (!flag) el.parentNode.removeChild(el);
|
|
3923
3924
|
}
|
|
3924
3925
|
});
|
|
3926
|
+
app.directive("hdtable", {
|
|
3927
|
+
mounted(el, binding) {
|
|
3928
|
+
const stores = useUserInfo();
|
|
3929
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === binding.value);
|
|
3930
|
+
if (item && item.isTable == 0) el.parentNode.removeChild(el);
|
|
3931
|
+
}
|
|
3932
|
+
});
|
|
3933
|
+
app.directive("hpquery", {
|
|
3934
|
+
mounted(el, binding) {
|
|
3935
|
+
const stores = useUserInfo();
|
|
3936
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === binding.value);
|
|
3937
|
+
if (item && item.isQuery == 0) el.parentNode.removeChild(el);
|
|
3938
|
+
}
|
|
3939
|
+
});
|
|
3940
|
+
app.directive("hpaddupdate", {
|
|
3941
|
+
mounted(el, binding) {
|
|
3942
|
+
const stores = useUserInfo();
|
|
3943
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === binding.value);
|
|
3944
|
+
if (item && item.isAddUpdate == 0) el.parentNode.removeChild(el);
|
|
3945
|
+
}
|
|
3946
|
+
});
|
|
3925
3947
|
}
|
|
3926
3948
|
|
|
3927
3949
|
function wavesDirective(app) {
|
|
@@ -19903,6 +19925,16 @@
|
|
|
19903
19925
|
function hAuthAll(el, value) {
|
|
19904
19926
|
return vue.withDirectives(el, [[vue.resolveDirective("auth-all"), value]]);
|
|
19905
19927
|
}
|
|
19928
|
+
function fdRules(value) {
|
|
19929
|
+
const stores = useUserInfo();
|
|
19930
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === value);
|
|
19931
|
+
let rels = [];
|
|
19932
|
+
if (item && item.isRequired == 1)
|
|
19933
|
+
rels.push({ required: true, message: "\u8BF7\u9009\u62E9", trigger: "blur" });
|
|
19934
|
+
if (item && item.isFromValid == 1)
|
|
19935
|
+
rels.push({ pattern: /^[1-9]\d*$/, message: "\u8BF7\u9009\u62E9\u6240\u5C5E\u64CD\u4F5C\u90E8", trigger: "blur" });
|
|
19936
|
+
return rels;
|
|
19937
|
+
}
|
|
19906
19938
|
|
|
19907
19939
|
function getpower(value) {
|
|
19908
19940
|
const stores = useUserInfo();
|
|
@@ -20442,6 +20474,12 @@
|
|
|
20442
20474
|
if (matched) return matched.limit;
|
|
20443
20475
|
return null;
|
|
20444
20476
|
}
|
|
20477
|
+
function getFrmItemProp(value) {
|
|
20478
|
+
const stores = useUserInfo();
|
|
20479
|
+
const item = stores.userInfos.formDesc.find((item2) => item2.path === value);
|
|
20480
|
+
if (item) return item.isRequired == 1 || item.isFromValid > 0;
|
|
20481
|
+
return false;
|
|
20482
|
+
}
|
|
20445
20483
|
|
|
20446
20484
|
const _hoisted_1$s = { key: 0 };
|
|
20447
20485
|
const _hoisted_2$i = { key: 0 };
|
|
@@ -30621,6 +30659,7 @@
|
|
|
30621
30659
|
exports.downloadStreamFile = downloadStreamFile;
|
|
30622
30660
|
exports.en = en;
|
|
30623
30661
|
exports.exportExcel = exportExcel;
|
|
30662
|
+
exports.fdRules = fdRules;
|
|
30624
30663
|
exports.feature = feature;
|
|
30625
30664
|
exports.fileToBase64 = fileToBase64;
|
|
30626
30665
|
exports.flowLoading = flowLoading;
|
|
@@ -30631,6 +30670,7 @@
|
|
|
30631
30670
|
exports.getCountryCode = getCountryCode;
|
|
30632
30671
|
exports.getFileName = getFileName;
|
|
30633
30672
|
exports.getFileUrl = getFileUrl;
|
|
30673
|
+
exports.getFrmItemProp = getFrmItemProp;
|
|
30634
30674
|
exports.getHeader = getHeader;
|
|
30635
30675
|
exports.getJWTDate = getJWTDate;
|
|
30636
30676
|
exports.getOpOrg = getOpOrg;
|