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

fix: Input box does not need to be verified until Chinese input is co… #1281

Closed
wants to merge 2 commits into from

Conversation

anthinkingcoder
Copy link

…mpleted

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Describe the source of requirement.
    输入框输入中文,在没输入完之前表单验证还是会生效。这就在一些场景下会出现一些问题,比如输入框验证规则是不能输入空格, 那么输入中文期间,会临时以字母的形式显示在输入框,且每个字母之间存在空格,而这个时候表单验证还是会走,那么就会出现验证错误提示。
  2. Resolve what problem.
    使用compositionstartcompositionend原生事件处理中文输入问题,在中文输入期间,不需要走验证。
  3. Related issue link.

API Realization (Optional if not new feature)

  1. Basic thought of solution and other optional proposal.
  2. List final API realization and usage sample.
  3. GIF or snapshot should be provided if includes UI/interactive modification.

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
  2. What will say in changelog?
  3. Does this PR contains potential break change or other risk?

Changelog description (Optional if not new feature)

  1. English description
  2. Chinese description (optional)

Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

@netlify
Copy link

netlify bot commented Oct 15, 2019

Deploy preview for ant-desing-vue processing.

Building with commit 001bd82

https://app.netlify.com/sites/ant-desing-vue/deploys/5dba408ac22f3400081bdcfa

@codecov
Copy link

codecov bot commented Oct 15, 2019

Codecov Report

Merging #1281 into master will increase coverage by 0.2%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1281     +/-   ##
=========================================
+ Coverage   87.59%   87.79%   +0.2%     
=========================================
  Files         156      156             
  Lines        5399     5401      +2     
  Branches     1520     1525      +5     
=========================================
+ Hits         4729     4742     +13     
+ Misses        597      589      -8     
+ Partials       73       70      -3
Impacted Files Coverage Δ
components/input/Input.jsx 73.73% <77.77%> (-5.58%) ⬇️
components/input/Search.jsx 92.3% <0%> (ø) ⬆️
components/input/Password.js
components/input/Password.jsx 73.33% <0%> (ø)
components/progress/progress.jsx 87.17% <0%> (+0.33%) ⬆️
components/button/button.jsx 90.32% <0%> (+1.79%) ⬆️
components/radio/Group.jsx 85.36% <0%> (+2.03%) ⬆️
components/icon/index.js 100% <0%> (+33.33%) ⬆️

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 4218f19...001bd82. Read the comment docs.

@@ -121,7 +125,14 @@ export default {
handleChange(e) {
this.setValue(e.target.value, e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleChange(e) {
      if (!e.target.composing) {
        this.setValue(e.target.value, e);
      }
    },

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其他就不要更改了吧

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,改了

@tangjinzhou
Copy link
Member

6c05e25 关注下这个commit, 这个pr我先关了 感谢pr

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants