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]修复精度问题;支持超过 16 位的大数 #1240

Merged
merged 7 commits into from
Aug 10, 2022

Conversation

chaishi
Copy link
Collaborator

@chaishi chaishi commented Aug 2, 2022

关联子仓库:Tencent/tdesign-common#689

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

  • feat(Input): 错误文本提示,不再占普通用文档流(Breaking Change)

  • feat(InputNumber): 内置的 input 组件 ref 名称由 refInputElem 更为 inputRef(Breaking Change)

  • feat(InputNumber): 错误文本提示,不再占普通用文档流(Breaking Change)

  • feat(InputNumber): 支持超过 16 位的大数

  • feat(InputNumber): 支持 decimalformat 组合使用,即 format 新增第二个参数小数点格式化之后的值,方便大数场景应用

  • feat(InputNumber): 新增事件 onValidate,当数值超过最大值或小于最小值时触发,可用于显示错误提示文本

  • feat(InputNumber): 错误提示文本区域支持左侧对齐和输入框对齐两种方式, issue#1229

  • fix(InputNumber): 修复在输入数值不满足条件时,没有触发 onChange 事件问题

  • fix(InputNumber): 修复计算过程中的精度问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@chaishi chaishi changed the base branch from develop to feature August 2, 2022 12:46
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2022

完成

@chaishi chaishi changed the title Feature input number [InputNumber]修复精度问题;支持超过 16 位的大数 Aug 2, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1240 (7cf8b55) into feature (4e79397) will increase coverage by 0.03%.
The diff coverage is 83.47%.

@@             Coverage Diff             @@
##           feature    #1240      +/-   ##
===========================================
+ Coverage    58.10%   58.14%   +0.03%     
===========================================
  Files          407      409       +2     
  Lines        15328    15263      -65     
  Branches      2915     2896      -19     
===========================================
- Hits          8906     8874      -32     
+ Misses        6146     6120      -26     
+ Partials       276      269       -7     
Impacted Files Coverage Δ
src/form/const.ts 100.00% <ø> (ø)
src/hooks/useCommonClassName.ts 100.00% <ø> (ø)
src/hooks/useVModel.ts 100.00% <ø> (+27.77%) ⬆️
src/input-number/props.ts 69.23% <ø> (ø)
src/input-number/useInputNumber.tsx 79.12% <79.12%> (ø)
src/hooks/useFormDisabled.ts 100.00% <100.00%> (ø)
src/input-number/index.ts 100.00% <100.00%> (ø)
src/input-number/input-number.tsx 100.00% <100.00%> (+25.68%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.

@uyarn uyarn added the ⛔️ pending the issue won't be processed right now label Aug 9, 2022
@uyarn uyarn removed the ⛔️ pending the issue won't be processed right now label Aug 10, 2022
@uyarn uyarn merged commit 4a763b9 into Tencent:feature Aug 10, 2022
chaishi added a commit to chaishi/tdesign-vue that referenced this pull request Aug 13, 2022
* feat(input-number): input-number supports slots

* feat(input-number): large number

* feat(input-number): large number support

* fix(input-number): large number

* fix(input-number): form can disable input-number

* feat(input-number): add label and suffix props to input-number

* test(table): update snapshots
uyarn pushed a commit that referenced this pull request Aug 16, 2022
* feat(input-number): input-number supports slots

* feat(input-number): large number

* feat(input-number): large number support

* fix(input-number): large number

* fix(input-number): form can disable input-number

* feat(input-number): add label and suffix props to input-number

* test(table): update snapshots
xiaosansiji pushed a commit that referenced this pull request Aug 16, 2022
* feat(input-number): input-number supports slots

* feat(input-number): large number

* feat(input-number): large number support

* fix(input-number): large number

* fix(input-number): form can disable input-number

* feat(input-number): add label and suffix props to input-number

* test(table): update snapshots

Co-authored-by: sheepluo <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants