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] 配置了decimalPlaces.enableRound false 时整数或小数位为0时报错 #4866

Closed
Lnncoco opened this issue Dec 25, 2024 · 1 comment
Labels
to be published to be published

Comments

@Lnncoco
Copy link
Contributor

Lnncoco commented Dec 25, 2024

tdesign-vue-next 版本

1.10.5

重现链接

https://stackblitz.com/edit/wifs7efc?file=src%2Fdemo.vue

重现步骤

按示例配置浏览器报错

期望结果

正常执行

实际结果

小数位是空值,导致找不到方法,导致报错

tdesign-vue-next.js?v=d44fe9a2:106979  Uncaught TypeError: Cannot read properties of undefined (reading 'slice')
    at formatDecimal (tdesign-vue-next.js?v=d44fe9a2:106979:31)
    at decimalPlacesToFixedNum (tdesign-vue-next.js?v=d44fe9a2:106988:12)
    at largeNumberToFixed (tdesign-vue-next.js?v=d44fe9a2:106999:12)
    at formatUnCompleteNumber (tdesign-vue-next.js?v=d44fe9a2:107205:17)
    at getUserInput2 (tdesign-vue-next.js?v=d44fe9a2:107249:17)
    at watch.immediate (tdesign-vue-next.js?v=d44fe9a2:107268:27)
    at callWithErrorHandling (chunk-JRBYLYD2.js?v=eeec80a8:1565:18)
    at callWithAsyncErrorHandling (chunk-JRBYLYD2.js?v=eeec80a8:1573:17)
    at job (chunk-JRBYLYD2.js?v=eeec80a8:3193:9)
    at doWatch (chunk-JRBYLYD2.js?v=eeec80a8:3223:7)

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

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

@Lnncoco Lnncoco changed the title [InputNumber ] 配置了decimalPlaces.enableRound false 时整数或小数位为0时报错 [InputNumber] 配置了decimalPlaces.enableRound false 时整数或小数位为0时报错 Dec 25, 2024
@uyarn uyarn added the to be published to be published label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published to be published
Projects
None yet
Development

No branches or pull requests

3 participants