mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 11:32:52 +08:00
add tagPrefixCls props
This commit is contained in:
parent
f14e207912
commit
6a28b44eca
@ -68,6 +68,7 @@ function fixLocale(value: RangePickerValue | undefined, localeCode: string) {
|
|||||||
class RangePicker extends React.Component<any, RangePickerState> {
|
class RangePicker extends React.Component<any, RangePickerState> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
prefixCls: 'ant-calendar',
|
prefixCls: 'ant-calendar',
|
||||||
|
tagPrefixCls: 'ant-tag',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
showToday: false,
|
showToday: false,
|
||||||
};
|
};
|
||||||
@ -209,7 +210,7 @@ class RangePicker extends React.Component<any, RangePickerState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderFooter = (...args: any[]) => {
|
renderFooter = (...args: any[]) => {
|
||||||
const { prefixCls, ranges, renderExtraFooter } = this.props;
|
const { prefixCls, ranges, renderExtraFooter, tagPrefixCls } = this.props;
|
||||||
if (!ranges && !renderExtraFooter) {
|
if (!ranges && !renderExtraFooter) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -223,6 +224,7 @@ class RangePicker extends React.Component<any, RangePickerState> {
|
|||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
key={range}
|
key={range}
|
||||||
|
prefixCls={tagPrefixCls}
|
||||||
color="blue"
|
color="blue"
|
||||||
onClick={() => this.handleRangeClick(value)}
|
onClick={() => this.handleRangeClick(value)}
|
||||||
onMouseEnter={() => this.setState({ hoverValue: value })}
|
onMouseEnter={() => this.setState({ hoverValue: value })}
|
||||||
|
Loading…
Reference in New Issue
Block a user