@fmdeui/fmui 1.0.105 → 1.0.107
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 +1 -0
- package/es/index.mjs +1 -1
- package/es/packages/components/fm-inputnumber/index.vue2.mjs +9 -6
- package/es/packages/hooks/index.mjs +1 -1
- package/es/packages/hooks/limitsFunction.mjs +14 -1
- package/index.js +24 -7
- package/index.min.js +6 -6
- package/index.min.mjs +6 -6
- package/index.mjs +24 -8
- package/lib/hooks/limitsFunction.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/packages/components/fm-inputnumber/index.vue2.js +9 -6
- package/lib/packages/hooks/index.js +1 -0
- package/lib/packages/hooks/limitsFunction.js +14 -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/{version.css → make-installer.css} +0 -0
- /package/lib/{version.css → component.css} +0 -0
|
@@ -27,3 +27,4 @@ export declare function getFormItemLabel(field: string, defaultValue: string): s
|
|
|
27
27
|
export declare function showTabelColumn(field: string): boolean;
|
|
28
28
|
export declare function getSubFormFields(flag: string): any;
|
|
29
29
|
export declare function getShowColumn(flag: string, field: string): boolean;
|
|
30
|
+
export declare function getShowColumnWidth(flag: string, field: string, defaultValue?: string, isJson?: boolean): any;
|
package/es/index.mjs
CHANGED
|
@@ -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 { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getSubFormFields, getlimit, showTabelColumn } from './packages/hooks/limitsFunction.mjs';
|
|
33
|
+
export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getShowColumnWidth, getSubFormFields, getlimit, showTabelColumn } 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,14 +27,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
const emit = __emit;
|
|
28
28
|
const handleInput = (val) => {
|
|
29
29
|
if (val === "" || val === null || val === void 0) {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const validNum = props.defaultValue !== -1 ? props.defaultValue : 0;
|
|
31
|
+
modelValue.value = validNum;
|
|
32
|
+
emit("handleInput", validNum);
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
35
|
if (props.bType == "number") {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
let trimstr = String(val).replace(/[^\d]/g, "");
|
|
37
|
+
const num = parseInt(trimstr, 10);
|
|
38
|
+
const validNum = Number.isNaN(num) ? props.defaultValue : num;
|
|
39
|
+
modelValue.value = validNum;
|
|
40
|
+
emit("handleInput", validNum);
|
|
38
41
|
return;
|
|
39
42
|
}
|
|
40
43
|
let cleaned = String(val).replace(/[^\d.]/g, "");
|
|
@@ -55,7 +58,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
58
|
cleaned = `${intPart}.${decPart.substring(0, 2)}`;
|
|
56
59
|
}
|
|
57
60
|
modelValue.value = cleaned;
|
|
58
|
-
emit("handleInput",
|
|
61
|
+
emit("handleInput", cleaned);
|
|
59
62
|
};
|
|
60
63
|
watch(() => modelValue.value, (newvalue, oldValue) => {
|
|
61
64
|
if (newvalue == "") {
|
|
@@ -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 { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getSubFormFields, getlimit, showTabelColumn } from './limitsFunction.mjs';
|
|
10
|
+
export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getShowColumnWidth, getSubFormFields, getlimit, showTabelColumn } from './limitsFunction.mjs';
|
|
@@ -74,5 +74,18 @@ function getShowColumn(flag, field) {
|
|
|
74
74
|
}
|
|
75
75
|
return true;
|
|
76
76
|
}
|
|
77
|
+
function getShowColumnWidth(flag, field, defaultValue = "", isJson = false) {
|
|
78
|
+
var _a, _b, _c, _d;
|
|
79
|
+
const stores = useUserInfo();
|
|
80
|
+
const route = useRoute();
|
|
81
|
+
const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === flag)) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
|
|
82
|
+
let width = defaultValue;
|
|
83
|
+
if (ItemField) {
|
|
84
|
+
if (ItemField.width) {
|
|
85
|
+
width = ItemField.width + ItemField.widthUnit;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return isJson ? width != "" ? { width } : "" : width;
|
|
89
|
+
}
|
|
77
90
|
|
|
78
|
-
export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getSubFormFields, getlimit, showTabelColumn };
|
|
91
|
+
export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getShowColumnWidth, getSubFormFields, getlimit, showTabelColumn };
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.107 */
|
|
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) :
|
|
@@ -20890,6 +20890,19 @@
|
|
|
20890
20890
|
}
|
|
20891
20891
|
return true;
|
|
20892
20892
|
}
|
|
20893
|
+
function getShowColumnWidth(flag, field, defaultValue = "", isJson = false) {
|
|
20894
|
+
var _a, _b, _c, _d;
|
|
20895
|
+
const stores = useUserInfo();
|
|
20896
|
+
const route = vueRouter.useRoute();
|
|
20897
|
+
const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === flag)) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
|
|
20898
|
+
let width = defaultValue;
|
|
20899
|
+
if (ItemField) {
|
|
20900
|
+
if (ItemField.width) {
|
|
20901
|
+
width = ItemField.width + ItemField.widthUnit;
|
|
20902
|
+
}
|
|
20903
|
+
}
|
|
20904
|
+
return isJson ? width != "" ? { width } : "" : width;
|
|
20905
|
+
}
|
|
20893
20906
|
|
|
20894
20907
|
const _hoisted_1$u = { key: 0 };
|
|
20895
20908
|
const _hoisted_2$j = { key: 0 };
|
|
@@ -26884,14 +26897,17 @@
|
|
|
26884
26897
|
const emit = __emit;
|
|
26885
26898
|
const handleInput = (val) => {
|
|
26886
26899
|
if (val === "" || val === null || val === void 0) {
|
|
26887
|
-
|
|
26888
|
-
|
|
26900
|
+
const validNum = props.defaultValue !== -1 ? props.defaultValue : 0;
|
|
26901
|
+
modelValue.value = validNum;
|
|
26902
|
+
emit("handleInput", validNum);
|
|
26889
26903
|
return;
|
|
26890
26904
|
}
|
|
26891
26905
|
if (props.bType == "number") {
|
|
26892
|
-
|
|
26893
|
-
|
|
26894
|
-
|
|
26906
|
+
let trimstr = String(val).replace(/[^\d]/g, "");
|
|
26907
|
+
const num = parseInt(trimstr, 10);
|
|
26908
|
+
const validNum = Number.isNaN(num) ? props.defaultValue : num;
|
|
26909
|
+
modelValue.value = validNum;
|
|
26910
|
+
emit("handleInput", validNum);
|
|
26895
26911
|
return;
|
|
26896
26912
|
}
|
|
26897
26913
|
let cleaned = String(val).replace(/[^\d.]/g, "");
|
|
@@ -26912,7 +26928,7 @@
|
|
|
26912
26928
|
cleaned = `${intPart}.${decPart.substring(0, 2)}`;
|
|
26913
26929
|
}
|
|
26914
26930
|
modelValue.value = cleaned;
|
|
26915
|
-
emit("handleInput",
|
|
26931
|
+
emit("handleInput", cleaned);
|
|
26916
26932
|
};
|
|
26917
26933
|
vue.watch(() => modelValue.value, (newvalue, oldValue) => {
|
|
26918
26934
|
if (newvalue == "") {
|
|
@@ -32009,6 +32025,7 @@
|
|
|
32009
32025
|
exports.getOpOrg = getOpOrg;
|
|
32010
32026
|
exports.getRules = getRules;
|
|
32011
32027
|
exports.getShowColumn = getShowColumn;
|
|
32028
|
+
exports.getShowColumnWidth = getShowColumnWidth;
|
|
32012
32029
|
exports.getSubFormFields = getSubFormFields;
|
|
32013
32030
|
exports.getToken = getToken;
|
|
32014
32031
|
exports.getWeek = getWeek;
|