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

src/utils/index.ts的numToUpper方法返回解决错误 #7493

Closed
q060831 opened this issue Nov 25, 2024 · 2 comments
Closed

src/utils/index.ts的numToUpper方法返回解决错误 #7493

q060831 opened this issue Nov 25, 2024 · 2 comments

Comments

@q060831
Copy link

q060831 commented Nov 25, 2024

版本号:3.7.1

问题描述:
调用numToUpper( 34855.73)返回叁undefined肆undefined捌undefined伍undefined伍undefined柒undefined叁undefinedNaN万元伍分
这是运算不精确导致的

错误截图:

export function numToUpper(value) {
  if (value != '') {
    .............
        console.log(value)
    value *= 100;
        console.log(value)
    value += '';
        console.log(value)
    ....
}

打印结果:

index.ts:256 34855.73
index.ts:258 3485573.0000000005
index.ts:260 3485573.0000000005
@zhangdaiscott
Copy link
Member

zy

@jeecgDeveloper
Copy link

已修复,下一版本发布。

image

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