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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/semi-foundation/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 的背景色决定显示的颜色,所以他们都会有这样的问题

.#{$module}-wrapper,
.#{$prefix}-datepicker-range-input {
border-radius: 0;
}
Expand Down
12 changes: 6 additions & 6 deletions packages/semi-ui/locale/_story/locale.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ const I18nComponent = () => {
<p>More content...</p>
</Modal>
<div>
<DatePicker style={{ ...style, width: 200 }} open />
<DatePicker style={{ ...style,marginLeft:120, width: 250 }} open type="dateTime" presets={presets} presetPosition="left" />
<DatePicker style={{ ...style, width: 200 }} open defaultPickerValue={[new Date('2024-09-08 00:00'), new Date('2024-09-09 12:00')]} />
<DatePicker style={{ ...style,marginLeft:120, width: 250 }} open type="dateTime" presets={presets} presetPosition="left" defaultPickerValue={[new Date('2024-09-08 00:00'), new Date('2024-09-09 12:00')]} />
{/* <DatePicker style={{ ...style, width: 250 }} type="dateRange" /> */}
<DatePicker style={{ ...style, marginLeft:240, width: 400 }} open type="dateTimeRange" />
<DatePicker style={{ ...style, marginLeft:240, width: 400 }} open type="dateTimeRange" defaultPickerValue={[new Date('2024-09-08 00:00'), new Date('2024-09-09 12:00')]} />
</div>
<div style={{ marginTop: 400 }}>
<DatePicker style={{ ...style, width: 200 }} open autoAdjustOverflow={false} position='bottomLeft' density='compact' />
<DatePicker style={{ ...style,marginLeft:120, width: 250 }} open type="dateTime" presets={presets} presetPosition="left" autoAdjustOverflow={false} position='bottomLeft' density='compact' />
<DatePicker style={{ ...style, width: 200 }} open autoAdjustOverflow={false} position='bottomLeft' density='compact' defaultPickerValue={[new Date('2024-09-08 00:00'), new Date('2024-09-09 12:00')]} />
<DatePicker style={{ ...style,marginLeft:120, width: 250 }} open type="dateTime" presets={presets} presetPosition="left" autoAdjustOverflow={false} position='bottomLeft' density='compact' defaultPickerValue={[new Date('2024-09-08 00:00'), new Date('2024-09-09 12:00')]} />
{/* <DatePicker style={{ ...style, width: 250 }} type="dateRange" /> */}
<DatePicker style={{ ...style, marginLeft:240, width: 400 }} open type="dateTimeRange" autoAdjustOverflow={false} position='bottomLeft' density='compact' />
<DatePicker style={{ ...style, marginLeft:240, width: 400 }} open type="dateTimeRange" autoAdjustOverflow={false} position='bottomLeft' density='compact' defaultPickerValue={[new Date('2024-09-08 00:00'), new Date('2024-09-09 12:00')]} />
</div>
<br />
<br />
Expand Down
Loading