Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVxeInputCell小数输入有问题小数点后第一位是非0第二位是0就不能输入了 例如输入100.102会变成100.12 #1065

Closed
ITyaoji opened this issue Feb 20, 2024 · 2 comments

Comments

@ITyaoji
Copy link

ITyaoji commented Feb 20, 2024

版本号:3.6.2
问题描述:

使用JVxeTable组件 某一列的组件使用JVxeTypes.inputNumber时输入100.102会变成100.12调试如下:

截图&代码:

image
image
image

友情提示(为了提高issue处理效率):

  • 未按格式要求发帖,会被直接删掉;
  • 请自己初判问题描述是否清楚,是否方便我们调查处理;
  • 描述过于简单或模糊,导致无法处理的,会被直接删掉;
@zhangdaiscott
Copy link
Member

收录 zy

@liaozhiyang
Copy link

已修复,下一版本发布。(这是js特性引起的,小数点后面的最后一位0会被自动忽略)

你本地可在 src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue 文件按如下图进行修改:
image

if (value.indexOf('.') != -1) {
              const result = value.split('.').pop();
              if (result && result.length >= 2 && result.substr(-1) === '0') {
                change = false;
                innerValue.value = value;
              }
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants