@fmdeui/fmui 1.0.106 → 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.
@@ -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';
@@ -33,7 +33,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  return;
34
34
  }
35
35
  if (props.bType == "number") {
36
- const num = parseInt(val, 10);
36
+ let trimstr = String(val).replace(/[^\d]/g, "");
37
+ const num = parseInt(trimstr, 10);
37
38
  const validNum = Number.isNaN(num) ? props.defaultValue : num;
38
39
  modelValue.value = validNum;
39
40
  emit("handleInput", validNum);
@@ -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.106 */
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 };
@@ -26890,7 +26903,8 @@
26890
26903
  return;
26891
26904
  }
26892
26905
  if (props.bType == "number") {
26893
- const num = parseInt(val, 10);
26906
+ let trimstr = String(val).replace(/[^\d]/g, "");
26907
+ const num = parseInt(trimstr, 10);
26894
26908
  const validNum = Number.isNaN(num) ? props.defaultValue : num;
26895
26909
  modelValue.value = validNum;
26896
26910
  emit("handleInput", validNum);
@@ -32011,6 +32025,7 @@
32011
32025
  exports.getOpOrg = getOpOrg;
32012
32026
  exports.getRules = getRules;
32013
32027
  exports.getShowColumn = getShowColumn;
32028
+ exports.getShowColumnWidth = getShowColumnWidth;
32014
32029
  exports.getSubFormFields = getSubFormFields;
32015
32030
  exports.getToken = getToken;
32016
32031
  exports.getWeek = getWeek;