📦 Remove DatePicker legacy cell className (#21589)

This commit is contained in:
偏右 2020-02-25 19:41:43 +08:00 committed by GitHub
parent bc8bc190ea
commit 50087b22d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View File

@ -28,7 +28,7 @@ ReactDOM.render(
style.borderRadius = '50%'; style.borderRadius = '50%';
} }
return ( return (
<div className="ant-calendar-date" style={style}> <div className="ant-picker-cell-inner" style={style}>
{current.date()} {current.date()}
</div> </div>
); );
@ -42,7 +42,7 @@ ReactDOM.render(
style.borderRadius = '50%'; style.borderRadius = '50%';
} }
return ( return (
<div className="ant-calendar-date" style={style}> <div className="ant-picker-cell-inner" style={style}>
{current.date()} {current.date()}
</div> </div>
); );

View File

@ -1,7 +1,6 @@
@import './index'; @import './index';
@picker-cell-inner-cls: ~'@{picker-prefix-cls}-cell-inner'; @picker-cell-inner-cls: ~'@{picker-prefix-cls}-cell-inner';
@picker-legacy-cell-cls: ~'@{ant-prefix}-calendar-date';
.@{picker-prefix-cls} { .@{picker-prefix-cls} {
@picker-arrow-size: 7px; @picker-arrow-size: 7px;
@ -428,7 +427,6 @@
} }
.picker-cell-inner(~'@{picker-cell-inner-cls}'); .picker-cell-inner(~'@{picker-cell-inner-cls}');
.picker-cell-inner(~'@{picker-legacy-cell-cls}');
} }
&-decade-panel, &-decade-panel,
@ -707,11 +705,12 @@
// https://github.com/ant-design/ant-design/issues/21559 // https://github.com/ant-design/ant-design/issues/21559
// https://codepen.io/afc163-1472555193/pen/mdJRaNj?editors=0110 // https://codepen.io/afc163-1472555193/pen/mdJRaNj?editors=0110
/* stylelint-disable-next-line */ /* stylelint-disable-next-line */
_:-ms-fullscreen, :root { _:-ms-fullscreen,
:root {
.@{picker-prefix-cls}-range-wrapper { .@{picker-prefix-cls}-range-wrapper {
.@{picker-prefix-cls}-month-panel .@{picker-prefix-cls}-cell, .@{picker-prefix-cls}-month-panel .@{picker-prefix-cls}-cell,
.@{picker-prefix-cls}-year-panel .@{picker-prefix-cls}-cell { .@{picker-prefix-cls}-year-panel .@{picker-prefix-cls}-cell {
padding: 21px 0; padding: 21px 0;
} }
} }
} }

View File

@ -116,6 +116,7 @@ const Demo = () => (
- Provide the `picker` property for selector switching. - Provide the `picker` property for selector switching.
- Range selection can now select start and end times individually. - Range selection can now select start and end times individually.
- `onPanelChange` will also trigger when panel value changed. - `onPanelChange` will also trigger when panel value changed.
- [Date cell className of Custom style demo](/components/date-picker/#components-date-picker-demo-date-render) changed from `ant-calendar-date` to `ant-picker-cell-inner`.
- Tree, Select, TreeSelect, AutoComplete rewrite - Tree, Select, TreeSelect, AutoComplete rewrite
- use virtual scrolling. - use virtual scrolling.
- `onBlur` no longer trigger value change. - `onBlur` no longer trigger value change.

View File

@ -116,6 +116,7 @@ const Demo = () => (
- 提供 `picker` 属性用于选择器切换。 - 提供 `picker` 属性用于选择器切换。
- 范围选择现在可以单独选择开始和结束时间。 - 范围选择现在可以单独选择开始和结束时间。
- `onPanelChange` 在面板值变化时也会触发。 - `onPanelChange` 在面板值变化时也会触发。
- [自定义单元格样式](/components/date-picker-cn/#components-date-picker-demo-date-render)的类名从 `ant-calendar-date` 改为 `ant-picker-cell-inner`
- Tree、Select、TreeSelect、AutoComplete 重新写 - Tree、Select、TreeSelect、AutoComplete 重新写
- 使用虚拟滚动。 - 使用虚拟滚动。
- `onBlur` 时不再修改选中值。 - `onBlur` 时不再修改选中值。