@fmdeui/fmui 1.0.105 → 1.0.106

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,14 +27,16 @@ 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
- modelValue.value = props.defaultValue !== -1 ? props.defaultValue : 0;
31
- emit("handleInput", modelValue.value);
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
  const num = parseInt(val, 10);
36
- modelValue.value = Number.isNaN(num) ? props.defaultValue : num;
37
- emit("handleInput", modelValue.value);
37
+ const validNum = Number.isNaN(num) ? props.defaultValue : num;
38
+ modelValue.value = validNum;
39
+ emit("handleInput", validNum);
38
40
  return;
39
41
  }
40
42
  let cleaned = String(val).replace(/[^\d.]/g, "");
@@ -55,7 +57,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
55
57
  cleaned = `${intPart}.${decPart.substring(0, 2)}`;
56
58
  }
57
59
  modelValue.value = cleaned;
58
- emit("handleInput", modelValue.value);
60
+ emit("handleInput", cleaned);
59
61
  };
60
62
  watch(() => modelValue.value, (newvalue, oldValue) => {
61
63
  if (newvalue == "") {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fmdeui-fmui v1.0.105 */
1
+ /*! fmdeui-fmui v1.0.106 */
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) :
@@ -26884,14 +26884,16 @@
26884
26884
  const emit = __emit;
26885
26885
  const handleInput = (val) => {
26886
26886
  if (val === "" || val === null || val === void 0) {
26887
- modelValue.value = props.defaultValue !== -1 ? props.defaultValue : 0;
26888
- emit("handleInput", modelValue.value);
26887
+ const validNum = props.defaultValue !== -1 ? props.defaultValue : 0;
26888
+ modelValue.value = validNum;
26889
+ emit("handleInput", validNum);
26889
26890
  return;
26890
26891
  }
26891
26892
  if (props.bType == "number") {
26892
26893
  const num = parseInt(val, 10);
26893
- modelValue.value = Number.isNaN(num) ? props.defaultValue : num;
26894
- emit("handleInput", modelValue.value);
26894
+ const validNum = Number.isNaN(num) ? props.defaultValue : num;
26895
+ modelValue.value = validNum;
26896
+ emit("handleInput", validNum);
26895
26897
  return;
26896
26898
  }
26897
26899
  let cleaned = String(val).replace(/[^\d.]/g, "");
@@ -26912,7 +26914,7 @@
26912
26914
  cleaned = `${intPart}.${decPart.substring(0, 2)}`;
26913
26915
  }
26914
26916
  modelValue.value = cleaned;
26915
- emit("handleInput", modelValue.value);
26917
+ emit("handleInput", cleaned);
26916
26918
  };
26917
26919
  vue.watch(() => modelValue.value, (newvalue, oldValue) => {
26918
26920
  if (newvalue == "") {