@fmdeui/fmui 1.0.85 → 1.0.86
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/limitsFunction.d.ts +5 -8
- package/es/packages/directive/authDirective.mjs +10 -9
- package/es/packages/hooks/limitsFunction.mjs +13 -8
- package/index.js +26 -22
- package/index.min.js +6 -6
- package/index.min.mjs +6 -6
- package/index.mjs +23 -19
- package/lib/hooks/limitsFunction.d.ts +5 -8
- package/lib/packages/directive/authDirective.js +10 -9
- package/lib/packages/hooks/limitsFunction.js +13 -8
- 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/{make-installer.css → index.css} +0 -0
- /package/lib/{component.css → defaults.css} +0 -0
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
export declare function getlimit(value: string): any;
|
|
2
2
|
/**
|
|
3
3
|
* 获取表单字段验证规则
|
|
4
|
-
* @param value 表单字段路径
|
|
5
4
|
* @param field 表单字段
|
|
6
5
|
* @param msg 验证提示
|
|
7
6
|
* @returns 验证规则
|
|
8
7
|
*/
|
|
9
|
-
export declare function getRules(
|
|
8
|
+
export declare function getRules(field: string, msg: string): string;
|
|
10
9
|
/**
|
|
11
10
|
* 获取表单字段属性
|
|
12
|
-
* @param
|
|
11
|
+
* @param field 表单字段
|
|
13
12
|
* @returns 表单字段属性
|
|
14
13
|
*/
|
|
15
|
-
export declare function getFormItemProp(
|
|
14
|
+
export declare function getFormItemProp(field: string): string;
|
|
16
15
|
/**
|
|
17
16
|
* 获取表单字段标签
|
|
18
|
-
* @param path 表单字段路径
|
|
19
17
|
* @param field 表单字段
|
|
20
18
|
* @param defaultValue 默认值
|
|
21
19
|
* @returns 表单字段标签
|
|
22
20
|
*/
|
|
23
|
-
export declare function getFormItemLabel(
|
|
21
|
+
export declare function getFormItemLabel(field: string, defaultValue: string): string;
|
|
24
22
|
/**
|
|
25
23
|
* 获取表格字段是否显示
|
|
26
|
-
* @param path 表格字段路径
|
|
27
24
|
* @param field 表格字段
|
|
28
25
|
* @returns 表格字段是否显示
|
|
29
26
|
*/
|
|
30
|
-
export declare function showTabelColumn(
|
|
27
|
+
export declare function showTabelColumn(field: string): boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useRoute } from 'vue-router';
|
|
1
2
|
import { useUserInfo } from '../stores/userInfo.mjs';
|
|
2
3
|
import { judgementSameArr } from '../utils/arrayOperation.mjs';
|
|
3
4
|
|
|
@@ -30,10 +31,10 @@ function authDirective(app) {
|
|
|
30
31
|
app.directive("hdtable", {
|
|
31
32
|
mounted(el, binding) {
|
|
32
33
|
const stores = useUserInfo();
|
|
33
|
-
const
|
|
34
|
-
const item = stores.userInfos.formDes.find((item2) => item2.path ===
|
|
34
|
+
const route = useRoute();
|
|
35
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
35
36
|
if (item && item.formDes.length > 0) {
|
|
36
|
-
const xitem = item.formDes.find((v) => v.field ===
|
|
37
|
+
const xitem = item.formDes.find((v) => v.field === binding.value);
|
|
37
38
|
if (xitem && xitem.isTable == 0) el.parentNode.removeChild(el);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -41,10 +42,10 @@ function authDirective(app) {
|
|
|
41
42
|
app.directive("hpquery", {
|
|
42
43
|
mounted(el, binding) {
|
|
43
44
|
const stores = useUserInfo();
|
|
44
|
-
const
|
|
45
|
-
const item = stores.userInfos.formDes.find((item2) => item2.path ===
|
|
45
|
+
const route = useRoute();
|
|
46
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
46
47
|
if (item && item.formDes.length > 0) {
|
|
47
|
-
const xitem = item.formDes.find((v) => v.field ===
|
|
48
|
+
const xitem = item.formDes.find((v) => v.field === binding.value);
|
|
48
49
|
if (xitem && xitem.isQuery == 0) el.parentNode.removeChild(el);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -52,10 +53,10 @@ function authDirective(app) {
|
|
|
52
53
|
app.directive("hpaddupdate", {
|
|
53
54
|
mounted(el, binding) {
|
|
54
55
|
const stores = useUserInfo();
|
|
55
|
-
const
|
|
56
|
-
const item = stores.userInfos.formDes.find((item2) => item2.path ===
|
|
56
|
+
const route = useRoute();
|
|
57
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
57
58
|
if (item && item.formDes.length > 0) {
|
|
58
|
-
const xitem = item.formDes.find((v) => v.field ===
|
|
59
|
+
const xitem = item.formDes.find((v) => v.field === binding.value);
|
|
59
60
|
if (xitem && xitem.isAddUpdate == 0) el.parentNode.removeChild(el);
|
|
60
61
|
}
|
|
61
62
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../stores/index.mjs';
|
|
2
|
+
import { useRoute } from 'vue-router';
|
|
2
3
|
import { useUserInfo } from '../stores/userInfo.mjs';
|
|
3
4
|
|
|
4
5
|
function getlimit(value) {
|
|
@@ -7,9 +8,10 @@ function getlimit(value) {
|
|
|
7
8
|
if (matched) return matched.limit;
|
|
8
9
|
return null;
|
|
9
10
|
}
|
|
10
|
-
function getRules(
|
|
11
|
+
function getRules(field, msg) {
|
|
11
12
|
const stores = useUserInfo();
|
|
12
|
-
const
|
|
13
|
+
const route = useRoute();
|
|
14
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
13
15
|
let rels = [];
|
|
14
16
|
if (item && item.formDes.length > 0) {
|
|
15
17
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
@@ -22,27 +24,30 @@ function getRules(value, field, msg) {
|
|
|
22
24
|
}
|
|
23
25
|
return rels;
|
|
24
26
|
}
|
|
25
|
-
function getFormItemProp(
|
|
27
|
+
function getFormItemProp(field) {
|
|
26
28
|
const stores = useUserInfo();
|
|
27
|
-
const
|
|
29
|
+
const route = useRoute();
|
|
30
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
28
31
|
if (item && item.formDes.length > 0) {
|
|
29
32
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
30
33
|
if (xitem) return xitem.isRequired == 1 || xitem.isFromValid > 0 ? field : "";
|
|
31
34
|
}
|
|
32
35
|
return "";
|
|
33
36
|
}
|
|
34
|
-
function getFormItemLabel(
|
|
37
|
+
function getFormItemLabel(field, defaultValue) {
|
|
35
38
|
const stores = useUserInfo();
|
|
36
|
-
const
|
|
39
|
+
const route = useRoute();
|
|
40
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
37
41
|
if (item && item.formDes.length > 0) {
|
|
38
42
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
39
43
|
if (xitem) return xitem.title && xitem.title != "" ? xitem.title : defaultValue;
|
|
40
44
|
}
|
|
41
45
|
return defaultValue;
|
|
42
46
|
}
|
|
43
|
-
function showTabelColumn(
|
|
47
|
+
function showTabelColumn(field) {
|
|
44
48
|
const stores = useUserInfo();
|
|
45
|
-
const
|
|
49
|
+
const route = useRoute();
|
|
50
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
46
51
|
if (item && item.formDes.length > 0) {
|
|
47
52
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
48
53
|
if (xitem) {
|
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.86 */
|
|
2
2
|
(function (global, factory) {
|
|
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('
|
|
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', '
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fmdeuifmui = {}, global.VxeUITable, global.VxeUIPluginRenderElement, global.VxeUIPluginExportXLSX, global.VxeUIExport, global.ExcelJS, global.ElementPlusIconsVue, global.Vue, global.ElementPlus, global._, global.Cookies, global.Pinia, global.VueUse, global.CryptoJS, global.XLSX, global.vueI18n, global.
|
|
6
|
-
})(this, (function (exports, VxeUITable, VxeUIPluginRenderElement, VxeUIPluginExportXLSX, VxeUI, ExcelJS, svg, vue, elementPlus, lodashEs, Cookies, pinia$1, core, CryptoJS, XLSXS, vueI18n,
|
|
3
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue-router'), 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('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
|
|
4
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue-router', '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', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fmdeuifmui = {}, global.vueRouter, global.VxeUITable, global.VxeUIPluginRenderElement, global.VxeUIPluginExportXLSX, global.VxeUIExport, global.ExcelJS, global.ElementPlusIconsVue, global.Vue, global.ElementPlus, global._, global.Cookies, global.Pinia, global.VueUse, global.CryptoJS, global.XLSX, global.vueI18n, global.Sortable, global.screenfull, global.Push, global.mitt, global.SignalR, global.axios));
|
|
6
|
+
})(this, (function (exports, vueRouter, VxeUITable, VxeUIPluginRenderElement, VxeUIPluginExportXLSX, VxeUI, ExcelJS, svg, vue, elementPlus, lodashEs, Cookies, pinia$1, core, CryptoJS, XLSXS, vueI18n, Sortable, screenfull, Push, mitt, SignalR, axios) { 'use strict';
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
var n = Object.create(null);
|
|
@@ -3926,10 +3926,10 @@
|
|
|
3926
3926
|
app.directive("hdtable", {
|
|
3927
3927
|
mounted(el, binding) {
|
|
3928
3928
|
const stores = useUserInfo();
|
|
3929
|
-
const
|
|
3930
|
-
const item = stores.userInfos.formDes.find((item2) => item2.path ===
|
|
3929
|
+
const route = vueRouter.useRoute();
|
|
3930
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
3931
3931
|
if (item && item.formDes.length > 0) {
|
|
3932
|
-
const xitem = item.formDes.find((v) => v.field ===
|
|
3932
|
+
const xitem = item.formDes.find((v) => v.field === binding.value);
|
|
3933
3933
|
if (xitem && xitem.isTable == 0) el.parentNode.removeChild(el);
|
|
3934
3934
|
}
|
|
3935
3935
|
}
|
|
@@ -3937,10 +3937,10 @@
|
|
|
3937
3937
|
app.directive("hpquery", {
|
|
3938
3938
|
mounted(el, binding) {
|
|
3939
3939
|
const stores = useUserInfo();
|
|
3940
|
-
const
|
|
3941
|
-
const item = stores.userInfos.formDes.find((item2) => item2.path ===
|
|
3940
|
+
const route = vueRouter.useRoute();
|
|
3941
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
3942
3942
|
if (item && item.formDes.length > 0) {
|
|
3943
|
-
const xitem = item.formDes.find((v) => v.field ===
|
|
3943
|
+
const xitem = item.formDes.find((v) => v.field === binding.value);
|
|
3944
3944
|
if (xitem && xitem.isQuery == 0) el.parentNode.removeChild(el);
|
|
3945
3945
|
}
|
|
3946
3946
|
}
|
|
@@ -3948,10 +3948,10 @@
|
|
|
3948
3948
|
app.directive("hpaddupdate", {
|
|
3949
3949
|
mounted(el, binding) {
|
|
3950
3950
|
const stores = useUserInfo();
|
|
3951
|
-
const
|
|
3952
|
-
const item = stores.userInfos.formDes.find((item2) => item2.path ===
|
|
3951
|
+
const route = vueRouter.useRoute();
|
|
3952
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
3953
3953
|
if (item && item.formDes.length > 0) {
|
|
3954
|
-
const xitem = item.formDes.find((v) => v.field ===
|
|
3954
|
+
const xitem = item.formDes.find((v) => v.field === binding.value);
|
|
3955
3955
|
if (xitem && xitem.isAddUpdate == 0) el.parentNode.removeChild(el);
|
|
3956
3956
|
}
|
|
3957
3957
|
}
|
|
@@ -20476,9 +20476,10 @@
|
|
|
20476
20476
|
if (matched) return matched.limit;
|
|
20477
20477
|
return null;
|
|
20478
20478
|
}
|
|
20479
|
-
function getRules(
|
|
20479
|
+
function getRules(field, msg) {
|
|
20480
20480
|
const stores = useUserInfo();
|
|
20481
|
-
const
|
|
20481
|
+
const route = vueRouter.useRoute();
|
|
20482
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
20482
20483
|
let rels = [];
|
|
20483
20484
|
if (item && item.formDes.length > 0) {
|
|
20484
20485
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
@@ -20491,27 +20492,30 @@
|
|
|
20491
20492
|
}
|
|
20492
20493
|
return rels;
|
|
20493
20494
|
}
|
|
20494
|
-
function getFormItemProp(
|
|
20495
|
+
function getFormItemProp(field) {
|
|
20495
20496
|
const stores = useUserInfo();
|
|
20496
|
-
const
|
|
20497
|
+
const route = vueRouter.useRoute();
|
|
20498
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
20497
20499
|
if (item && item.formDes.length > 0) {
|
|
20498
20500
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
20499
20501
|
if (xitem) return xitem.isRequired == 1 || xitem.isFromValid > 0 ? field : "";
|
|
20500
20502
|
}
|
|
20501
20503
|
return "";
|
|
20502
20504
|
}
|
|
20503
|
-
function getFormItemLabel(
|
|
20505
|
+
function getFormItemLabel(field, defaultValue) {
|
|
20504
20506
|
const stores = useUserInfo();
|
|
20505
|
-
const
|
|
20507
|
+
const route = vueRouter.useRoute();
|
|
20508
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
20506
20509
|
if (item && item.formDes.length > 0) {
|
|
20507
20510
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
20508
20511
|
if (xitem) return xitem.title && xitem.title != "" ? xitem.title : defaultValue;
|
|
20509
20512
|
}
|
|
20510
20513
|
return defaultValue;
|
|
20511
20514
|
}
|
|
20512
|
-
function showTabelColumn(
|
|
20515
|
+
function showTabelColumn(field) {
|
|
20513
20516
|
const stores = useUserInfo();
|
|
20514
|
-
const
|
|
20517
|
+
const route = vueRouter.useRoute();
|
|
20518
|
+
const item = stores.userInfos.formDes.find((item2) => item2.path === route.path);
|
|
20515
20519
|
if (item && item.formDes.length > 0) {
|
|
20516
20520
|
const xitem = item.formDes.find((v) => v.field === field);
|
|
20517
20521
|
if (xitem) {
|