Skip to content

Commit

Permalink
fix: #582 datepicker small anticon size
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxy0551 committed Jan 9, 2025
1 parent b797922 commit 2f85c3d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
30 changes: 19 additions & 11 deletions theme/dt-theme/default/datepicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
}
}

.ant-picker-small {
.ant-picker.ant-picker-default {
// 需要设置同样大小,如果 clear 图标小一点的话,会无法覆盖下方的时钟、日期图标,导致 hover 时显示错位
.anticon {
font-size: 16px;
}
}

.ant-picker.ant-picker-small {
font-size: 12px !important;
padding: 2px 11px !important;
.ant-picker-input {
Expand All @@ -25,6 +32,9 @@
line-height: calc(18 / 12);
}
}
.anticon {
font-size: 14px;
}
}

.ant-picker-focused {
Expand All @@ -49,6 +59,11 @@
}

.ant-picker.ant-picker-range {
&.ant-picker-small {
.ant-picker-clear {
right: 11px;
}
}
.ant-picker-active-bar {
background: @clickColor;
}
Expand Down Expand Up @@ -174,16 +189,9 @@
}
}

// TimePicker
.ant-picker-suffix {
.anticon-clock-circle, .anticon-calendar {
font-size: 16px;
}
}

.ant-picker-clear {
// 需要设置同样大小,如果 clear 图标小一点的话,会无法覆盖下方的时钟、日期图标,导致 hover 时显示错位
.anticon-close-circle {
font-size: 16px;
color: @black_msg !important;
&:hover {
color: @black_Desc !important;
}
}
7 changes: 0 additions & 7 deletions theme/dt-theme/default/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ li.ant-picker-panel-select-option-selected:hover {
color: @black_msg;
}

.ant-picker-clear {
color: @black_msg !important;
&:hover {
color: @black_Desc !important;
}
}

// form 下拉 投影
.ant-cascader-menus,
.ant-calendar,
Expand Down

0 comments on commit 2f85c3d

Please sign in to comment.