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: [InputNumber] Fix the rounded corners of InputNumber, DatePicker… #2497

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YyumeiZhang
Copy link
Collaborator

@YyumeiZhang YyumeiZhang commented Sep 14, 2024

…, Time Pick, and AutoComplete located in the middle of the InputGroup are not 0

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #2489

复现代码

export const InputGroupTest = () => {
  return <>
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <InputNumber placeholder="InpuNumber" style={{ width: 140 }} innerButtons />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <InputNumber placeholder="InpuNumber" style={{ width: 140 }} innerButtons />
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
      <InputNumber placeholder="InpuNumber" style={{ width: 140 }} innerButtons />
    </InputGroup>
    <br /><br />
    <h3>InputGroup, 按钮在外部,仅位于 group 中间的时候 border-radius 会有问题</h3>
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <InputNumber placeholder="InpuNumber" style={{ width: 140 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <InputNumber placeholder="InpuNumber" style={{ width: 140 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
      <InputNumber placeholder="InpuNumber" style={{ width: 140 }} />
    </InputGroup>
    <h3>AutoComplete, 仅位于 group 中间会有问题</h3>
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <AutoComplete placeholder="AutoComplete" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <AutoComplete placeholder="AutoComplete" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
      <AutoComplete placeholder="AutoComplete" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <h3>DatePicker, 仅位于 group 中间的时候 border-radius 会有问题</h3>
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <DatePicker placeholder="DatePicker" style={{ width: 100 }}/>
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <DatePicker placeholder="DatePicker" style={{ width: 100 }}/>
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
      <DatePicker placeholder="DatePicker" style={{ width: 100 }}/>
    </InputGroup>
    <br /><br />
    <h3>TimePicker, 仅位于 group 中间的时候 border-radius 会有问题</h3>
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <TimePicker placeholder="TimePicker" style={{ width: 100 }}/>
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <TimePicker placeholder="TimePicker" style={{ width: 100 }}/>
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
    </InputGroup>
    <br /><br />
    <InputGroup>
      <Input placeholder="Input" style={{ width: 100 }} />
      <Input placeholder="Input" style={{ width: 100 }} />
      <TimePicker placeholder="TimePicker" style={{ width: 100 }}/>
    </InputGroup>
    <br /><br />
  </>
}

Changelog

🇨🇳 Chinese


🇺🇸 English

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

…, Time Pick, and AutoComplete located in the middle of the InputGroup are not 0
Copy link

codesandbox-ci bot commented Sep 14, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0ebd42d:

Sandbox Source
pr-story Configuration

Copy link

cypress bot commented Sep 14, 2024

semi-design    Run #2827

Run Properties:  status check passed Passed #2827  •  git commit e3d3faea9d ℹ️: Merge 0ebd42d6f4b57ccf31802f350b6e751b6b253451 into f182880c124d8197a0511f88ab87...
Project semi-design
Branch Review fix/inputnumber-group
Run status status check passed Passed #2827
Run duration 07m 35s
Commit git commit e3d3faea9d ℹ️: Merge 0ebd42d6f4b57ccf31802f350b6e751b6b253451 into f182880c124d8197a0511f88ab87...
Committer YyumeiZhang
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 11
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 263
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@@ -633,8 +633,8 @@ $module: #{$prefix}-input;
.#{$prefix}-datepicker,
.#{$prefix}-timepicker,
.#{$prefix}-autocomplete {
border-radius: 0;


Copy link
Collaborator

Choose a reason for hiding this comment

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

为啥是去除 border-radius 0?

image
不是这里不全吗?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

不是, select,casacder 是直接由最外层控制颜色,InputNumber,DatePicker, Time Pick,AutoComplete和它们不同,最外层无背景,而是靠内层的 input 的背景色决定显示的颜色,所以他们都会有这样的问题

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.

[InputGroup] 如果是inputNumber圆角没有变为0
2 participants