fix: ant-piker-cell-range-hover-end style error (#6373)
* fix: ant-piker-cell-range-hover-end style error * feat: be consistent with antd * feat: be consistent with antdpull/6382/head
parent
dcc3bb10cb
commit
4d2a37fcd3
|
@ -331,8 +331,9 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
|
||||||
} = token;
|
} = token;
|
||||||
|
|
||||||
const pickerPanelWidth = pickerPanelCellWidth * 7 + paddingSM * 2 + 4;
|
const pickerPanelWidth = pickerPanelCellWidth * 7 + paddingSM * 2 + 4;
|
||||||
|
|
||||||
const hoverCellFixedDistance =
|
const hoverCellFixedDistance =
|
||||||
(pickerPanelWidth - paddingXS * 2) / 3 - pickerYearMonthCellWidth / 2;
|
(pickerPanelWidth - paddingXS * 2) / 3 - pickerYearMonthCellWidth - paddingSM;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
[componentCls]: {
|
[componentCls]: {
|
||||||
|
@ -658,17 +659,17 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
|
||||||
insetInlineEnd: hoverCellFixedDistance,
|
insetInlineEnd: hoverCellFixedDistance,
|
||||||
borderInlineEnd: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
|
borderInlineEnd: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
|
||||||
borderStartStartRadius: 0,
|
borderStartStartRadius: 0,
|
||||||
borderBottomStartRadius: 0,
|
borderEndStartRadius: 0,
|
||||||
borderStartEndRadius: borderRadius,
|
borderStartEndRadius: borderRadius,
|
||||||
borderBottomEndRadius: borderRadius,
|
borderEndEndRadius: borderRadius,
|
||||||
|
|
||||||
[`${componentCls}-panel-rtl &`]: {
|
[`${componentCls}-panel-rtl &`]: {
|
||||||
insetInlineStart: hoverCellFixedDistance,
|
insetInlineStart: hoverCellFixedDistance,
|
||||||
borderInlineStart: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
|
borderInlineStart: `${lineWidth}px dashed ${pickerDateHoverRangeBorderColor}`,
|
||||||
borderStartStartRadius: borderRadius,
|
borderStartStartRadius: borderRadius,
|
||||||
borderBottomStartRadius: borderRadius,
|
borderEndStartRadius: borderRadius,
|
||||||
borderStartEndRadius: 0,
|
borderStartEndRadius: 0,
|
||||||
borderBottomEndRadius: 0,
|
borderEndEndRadius: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1429,6 +1430,7 @@ export default genComponentStyleHook(
|
||||||
initInputToken<FullToken<'DatePicker'>>(token),
|
initInputToken<FullToken<'DatePicker'>>(token),
|
||||||
initPickerPanelToken(token),
|
initPickerPanelToken(token),
|
||||||
);
|
);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
genPickerStyle(pickerToken),
|
genPickerStyle(pickerToken),
|
||||||
genPickerStatusStyle(pickerToken),
|
genPickerStatusStyle(pickerToken),
|
||||||
|
|
Loading…
Reference in New Issue