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

[InputNumber] largeNumber 输入四舍五入精度问题 #3039

Closed
okxiaoliang4 opened this issue Jan 16, 2024 · 4 comments
Closed

[InputNumber] largeNumber 输入四舍五入精度问题 #3039

okxiaoliang4 opened this issue Jan 16, 2024 · 4 comments
Labels
🐞 bug Something isn't working duplicate This issue or pull request already exists

Comments

@okxiaoliang4
Copy link

tdesign-vue 版本

1.8.0

重现链接

No response

重现步骤

<template>
  <t-input-number
    v-model="value"
    :decimal-places="2"
    :large-number="true"
    :min="0"
    :max="99999999"
    theme="normal"
    :allow-input-over-limit="false"
    @change="onChange"
  />
</template>

<script setup>
import { ref } from 'vue';

const value = ref();
const onChange = (ev) => {
  console.info(ev);
};
</script>

输入 0.0256 失去焦点后变成 0.3 而不是0.03

期望结果

符合预期进位

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

👋 @okxiaoliang4,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

♥️ 有劳 @ybg555 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @okxiaoliang4

@okxiaoliang4
Copy link
Author

okxiaoliang4 commented Jan 16, 2024

排查是largeNumberToFixed里面取了小数点后的数值来做增加,导致前面的0都被忽略了

@uyarn
Copy link
Collaborator

uyarn commented Jan 16, 2024

到vue-next仓库统一处理哈

@uyarn uyarn closed this as completed Jan 16, 2024
@uyarn uyarn added the duplicate This issue or pull request already exists label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants