NG-ZORRO / ng-zorro-antd-mobile

A configurable Mobile UI components based on Ant Design Mobile and Angular. 🐜
http://ng.mobile.ant.design
Other
800 stars 241 forks source link

feat(module: stepper): 修复输入框输入显示问题 #791

Closed shuizhongxiong closed 3 years ago

shuizhongxiong commented 3 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

手动输入除数字之外的字符,显示值会变为NaN

Issue Number: 787、771

What is the new behavior?

1、输入框增加只能输入数字的限制 2、输入框增加小数和负数的输入判断 3、输入框增加 blur 时,对输入值进行有效判断并回填 4、增加相应测试用例 5、增加 demo 示例

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

codecov[bot] commented 3 years ago

Codecov Report

Merging #791 (c18680a) into master (1d9a4a6) will decrease coverage by 0.08%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #791      +/-   ##
==========================================
- Coverage   86.99%   86.91%   -0.09%     
==========================================
  Files         164      164              
  Lines        6645     6677      +32     
  Branches     1109     1115       +6     
==========================================
+ Hits         5781     5803      +22     
- Misses        421      428       +7     
- Partials      443      446       +3     
Impacted Files Coverage Δ
components/stepper/stepper.component.ts 90.85% <71.42%> (-6.12%) :arrow_down:
...ts/input-item/custom-input/custom-input.service.ts 87.09% <0.00%> (+3.22%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1d9a4a6...c18680a. Read the comment docs.