yh-mobile-components 1.4.3 → 1.4.6

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/form/yhmInput.vue CHANGED
@@ -61,8 +61,8 @@ const emits = defineEmits<{
61
61
  function changeHandler(val) {
62
62
  if (props.type === "number" && props.precision && !isNaN(props.precision)) {
63
63
  let valArr = val.split(".");
64
- if (valArr[1] && valArr[1].length && valArr[1].length > 2) {
65
- val = `${valArr[0]}.${valArr[1].substring(0, 2)}`;
64
+ if (valArr[1] && valArr[1].length && valArr[1].length > props.precision) {
65
+ val = `${valArr[0]}.${valArr[1].substring(0, props.precision + 1)}`;
66
66
  }
67
67
  }
68
68
  emits("update:modelValue", val);
@@ -41,7 +41,7 @@
41
41
  <script setup lang="ts">
42
42
  import { ref, computed } from "vue";
43
43
 
44
- const props = withDefaults(defineProps<{ error?: boolean; errorMessage?: string; modelValue?: any; disabled?: boolean; palceholder?: string; optionData: any[]; filterabled: boolean; remoteFilter: boolean }>(), {
44
+ const props = withDefaults(defineProps<{ error?: boolean; errorMessage?: string; modelValue?: any; disabled?: boolean; palceholder?: string; optionData: any[]; filterabled?: boolean; remoteFilter?: boolean }>(), {
45
45
  disabled: false,
46
46
  filterabled: false,
47
47
  remoteFilter: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yh-mobile-components",
3
- "version": "1.4.3",
3
+ "version": "1.4.6",
4
4
  "description": "移动端组件封装及配置化需求",
5
5
  "main": "index.js",
6
6
  "scripts": {