mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
parent
5e1b679dfb
commit
ccbebe60cc
@ -72,11 +72,13 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
|
||||
}) : []);
|
||||
|
||||
return (
|
||||
<Select {...this.props}
|
||||
<Select
|
||||
{...this.props}
|
||||
className={cls}
|
||||
optionLabelProp={optionLabelProp}
|
||||
combobox
|
||||
notFoundContent={notFoundContent} >
|
||||
notFoundContent={notFoundContent}
|
||||
>
|
||||
{options}
|
||||
</Select>
|
||||
);
|
||||
|
@ -127,7 +127,8 @@ export default class Button extends React.Component<ButtonProps, any> {
|
||||
const kids = React.Children.map(children, insertSpace);
|
||||
|
||||
return (
|
||||
<button {...others}
|
||||
<button
|
||||
{...others}
|
||||
type={htmlType || 'button'}
|
||||
className={classes}
|
||||
onMouseUp={this.handleMouseUp}
|
||||
|
@ -252,7 +252,8 @@ export default class Cascader extends React.Component<CascaderProps, any> {
|
||||
[`${inputPrefixCls}-sm`]: size === 'small',
|
||||
});
|
||||
const clearIcon = (allowClear && !disabled && value.length > 0) || state.inputValue ?
|
||||
<Icon type="cross-circle"
|
||||
<Icon
|
||||
type="cross-circle"
|
||||
className={`${prefixCls}-picker-clear`}
|
||||
onClick={this.clearSelection}
|
||||
/> : null;
|
||||
|
@ -89,10 +89,12 @@ export default class CheckboxGroup extends React.Component<CheckboxGroupProps, C
|
||||
<div className={prefixCls}>
|
||||
{
|
||||
options.map(option =>
|
||||
<Checkbox disabled={'disabled' in option ? option.disabled : this.props.disabled}
|
||||
<Checkbox
|
||||
disabled={'disabled' in option ? option.disabled : this.props.disabled}
|
||||
checked={this.state.value.indexOf(option.value) !== -1}
|
||||
onChange={() => this.toggleOption(option)}
|
||||
className={`${prefixCls}-item`} key={option.value}
|
||||
className={`${prefixCls}-item`}
|
||||
key={option.value}
|
||||
>
|
||||
{option.label}
|
||||
</Checkbox>
|
||||
|
@ -129,7 +129,8 @@ export default function createPicker(TheCalendar) {
|
||||
);
|
||||
|
||||
const clearIcon = (!props.disabled && props.allowClear && this.state.value) ?
|
||||
<Icon type="cross-circle"
|
||||
<Icon
|
||||
type="cross-circle"
|
||||
className={`${prefixCls}-picker-clear`}
|
||||
onClick={this.clearSelection}
|
||||
/> : null;
|
||||
|
@ -75,7 +75,8 @@ export default class Pagination extends React.Component<PaginationProps, any> {
|
||||
}
|
||||
|
||||
return (
|
||||
<RcPagination selectComponentClass={selectComponentClass}
|
||||
<RcPagination
|
||||
selectComponentClass={selectComponentClass}
|
||||
selectPrefixCls={this.props.selectPrefixCls}
|
||||
{...this.props}
|
||||
locale={locale}
|
||||
|
@ -95,8 +95,12 @@ export default class Progress extends React.Component<ProgressProps, any> {
|
||||
const circleWidth = strokeWidth || 6;
|
||||
progress = (
|
||||
<div className={`${prefixCls}-inner`} style={circleStyle}>
|
||||
<Circle percent={percent} strokeWidth={circleWidth} trailWidth={circleWidth}
|
||||
strokeColor={statusColorMap[progressStatus]} trailColor={trailColor}
|
||||
<Circle
|
||||
percent={percent}
|
||||
strokeWidth={circleWidth}
|
||||
trailWidth={circleWidth}
|
||||
strokeColor={statusColorMap[progressStatus]}
|
||||
trailColor={trailColor}
|
||||
/>
|
||||
{progressInfo}
|
||||
</div>
|
||||
|
@ -655,13 +655,15 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
|
||||
const isDescend = isSortColumn && sortOrder === 'descend';
|
||||
sortButton = (
|
||||
<div className={`${prefixCls}-column-sorter`}>
|
||||
<span className={`${prefixCls}-column-sorter-up ${isAscend ? 'on' : 'off'}`}
|
||||
<span
|
||||
className={`${prefixCls}-column-sorter-up ${isAscend ? 'on' : 'off'}`}
|
||||
title="↑"
|
||||
onClick={() => this.toggleSortOrder('ascend', column)}
|
||||
>
|
||||
<Icon type="caret-up" />
|
||||
</span>
|
||||
<span className={`${prefixCls}-column-sorter-down ${isDescend ? 'on' : 'off'}`}
|
||||
<span
|
||||
className={`${prefixCls}-column-sorter-down ${isDescend ? 'on' : 'off'}`}
|
||||
title="↓"
|
||||
onClick={() => this.toggleSortOrder('descend', column)}
|
||||
>
|
||||
|
@ -122,7 +122,8 @@ export default class Tabs extends React.Component<TabsProps, any> {
|
||||
) : null;
|
||||
|
||||
return (
|
||||
<RcTabs {...this.props}
|
||||
<RcTabs
|
||||
{...this.props}
|
||||
className={cls}
|
||||
tabBarPosition={tabPosition}
|
||||
renderTabBar={() => (
|
||||
|
@ -194,7 +194,8 @@ export default class TransferList extends React.Component<TransferListProps, any
|
||||
{bodyDom ||
|
||||
<div className={showSearch ? `${prefixCls}-body ${prefixCls}-body-with-search` : `${prefixCls}-body`}>
|
||||
{showSearch ? <div className={`${prefixCls}-body-search-wrapper`}>
|
||||
<Search prefixCls={`${prefixCls}-search`}
|
||||
<Search
|
||||
prefixCls={`${prefixCls}-search`}
|
||||
onChange={this.handleFilter}
|
||||
handleClear={this.handleClear}
|
||||
placeholder={searchPlaceholder || 'Search'}
|
||||
|
@ -35,7 +35,11 @@ export default class Search extends React.Component<SearchProps, any> {
|
||||
const { placeholder, value, prefixCls } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<Input placeholder={placeholder} className={prefixCls} value={value} ref="input"
|
||||
<Input
|
||||
placeholder={placeholder}
|
||||
className={prefixCls}
|
||||
value={value}
|
||||
ref="input"
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
{value && value.length > 0 ?
|
||||
|
@ -98,8 +98,10 @@ export default class Tree extends React.Component<TreeProps, any> {
|
||||
const props = this.props;
|
||||
let checkable = props.checkable;
|
||||
return (
|
||||
<RcTree {...props}
|
||||
checkable={checkable ? (<span className={`${props.prefixCls}-checkbox-inner`}></span>) : checkable }>
|
||||
<RcTree
|
||||
{...props}
|
||||
checkable={checkable ? (<span className={`${props.prefixCls}-checkbox-inner`}></span>) : checkable }
|
||||
>
|
||||
{this.props.children}
|
||||
</RcTree>
|
||||
);
|
||||
|
@ -81,7 +81,8 @@ export default class UploadList extends React.Component<UploadListProps, any> {
|
||||
className={`${prefixCls}-list-item-thumbnail`}
|
||||
onClick={e => this.handlePreview(file, e)}
|
||||
href={file.url || file.thumbUrl}
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<img src={file.url || file.thumbUrl} alt={file.name} />
|
||||
</a>
|
||||
@ -109,7 +110,8 @@ export default class UploadList extends React.Component<UploadListProps, any> {
|
||||
? (
|
||||
<a
|
||||
href={file.url}
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`${prefixCls}-list-item-name`}
|
||||
onClick={e => this.handlePreview(file, e)}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user