mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Merge master into develop-1.0.0
This commit is contained in:
commit
fbda3c7b88
@ -52,7 +52,7 @@ export default React.createClass({
|
||||
iconType = 'info-circle';
|
||||
break;
|
||||
case 'error':
|
||||
iconType = 'exclamation-circle';
|
||||
iconType = 'cross-circle';
|
||||
break;
|
||||
case 'warn':
|
||||
iconType = 'exclamation-circle';
|
||||
|
@ -16,7 +16,7 @@ const SearchInput = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
value: '',
|
||||
focus: false
|
||||
focus: false,
|
||||
};
|
||||
},
|
||||
handleInputChange(e) {
|
||||
@ -48,7 +48,7 @@ const SearchInput = React.createClass({
|
||||
<Input {...this.props} value={this.state.value} onChange={this.handleInputChange}
|
||||
onFocus={this.handleFocusBlur} onBlur={this.handleFocusBlur} />
|
||||
<div className="ant-input-group-wrap">
|
||||
<Button className={btnCls} onClick={this.handleSearch}>
|
||||
<Button className={btnCls} size={this.props.size} onClick={this.handleSearch}>
|
||||
<Icon type="search" />
|
||||
</Button>
|
||||
</div>
|
||||
|
@ -28,7 +28,7 @@ function notice(content, duration = defaultDuration, type, onClose) {
|
||||
let iconType = ({
|
||||
info: 'info-circle',
|
||||
success: 'check-circle',
|
||||
error: 'exclamation-circle',
|
||||
error: 'cross-circle',
|
||||
warn: 'exclamation-circle',
|
||||
loading: 'loading'
|
||||
})[type];
|
||||
|
@ -22,7 +22,7 @@ Modal.success = function (props) {
|
||||
Modal.error = function (props) {
|
||||
const config = {
|
||||
...props,
|
||||
iconClassName: 'exclamation-circle',
|
||||
iconClassName: 'cross-circle',
|
||||
okCancel: false,
|
||||
};
|
||||
return confirm(config);
|
||||
|
@ -38,10 +38,10 @@ function notice(args) {
|
||||
iconType = 'info-circle-o';
|
||||
break;
|
||||
case 'error':
|
||||
iconType = 'exclamation-circle-o';
|
||||
iconType = 'cross-circle-o';
|
||||
break;
|
||||
case 'warn':
|
||||
iconType = 'question-circle-o';
|
||||
iconType = 'exclamation-circle-o';
|
||||
break;
|
||||
default:
|
||||
iconType = 'info-circle';
|
||||
|
@ -75,7 +75,7 @@ export default React.createClass({
|
||||
<div>
|
||||
<div className={`${prefixCls}-inner-content`}>
|
||||
<div className={`${prefixCls}-message`}>
|
||||
<Icon type="exclamation-circle" />
|
||||
<Icon type="question-circle" />
|
||||
<div className={`${prefixCls}-message-title`}>{title}</div>
|
||||
</div>
|
||||
<div className={`${prefixCls}-buttons`}>
|
||||
|
@ -29,61 +29,51 @@ const columns = [{
|
||||
}, {
|
||||
text: '姓王的',
|
||||
value: '王',
|
||||
}]
|
||||
}],
|
||||
}],
|
||||
// 指定确定筛选的条件函数
|
||||
// 这里是名字中第一个字是 value
|
||||
onFilter(value, record) {
|
||||
return record.name.indexOf(value) === 0;
|
||||
},
|
||||
sorter(a, b) {
|
||||
return a.name.length - b.name.length;
|
||||
}
|
||||
onFilter: (value, record) => record.name.indexOf(value) === 0,
|
||||
sorter: (a, b) => a.name.length - b.name.length,
|
||||
}, {
|
||||
title: '年龄',
|
||||
dataIndex: 'age',
|
||||
sorter(a, b) {
|
||||
return a.age - b.age;
|
||||
}
|
||||
sorter: (a, b) => a.age - b.age,
|
||||
}, {
|
||||
title: '地址',
|
||||
dataIndex: 'address',
|
||||
filters: [{
|
||||
text: '南湖',
|
||||
value: '南湖'
|
||||
value: '南湖',
|
||||
}, {
|
||||
text: '西湖',
|
||||
value: '西湖'
|
||||
value: '西湖',
|
||||
}],
|
||||
filterMultiple: false,
|
||||
onFilter(value, record) {
|
||||
return record.address.indexOf(value) === 0;
|
||||
},
|
||||
sorter(a, b) {
|
||||
return a.address.length - b.address.length;
|
||||
}
|
||||
onFilter: (value, record) => record.address.indexOf(value) === 0,
|
||||
sorter: (a, b) => a.address.length - b.address.length,
|
||||
}];
|
||||
|
||||
const data = [{
|
||||
key: '1',
|
||||
name: '胡斌',
|
||||
age: 32,
|
||||
address: '南湖区湖底公园1号'
|
||||
address: '南湖区湖底公园1号',
|
||||
}, {
|
||||
key: '2',
|
||||
name: '胡彦祖',
|
||||
age: 42,
|
||||
address: '西湖区湖底公园12号'
|
||||
address: '西湖区湖底公园12号',
|
||||
}, {
|
||||
key: '3',
|
||||
name: '李大嘴',
|
||||
age: 32,
|
||||
address: '南湖区湖底公园123号'
|
||||
address: '南湖区湖底公园123号',
|
||||
}, {
|
||||
key: '4',
|
||||
name: '李秀莲大嘴哥',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园123号'
|
||||
address: '西湖区湖底公园123号',
|
||||
}];
|
||||
|
||||
function onChange(pagination, filters, sorter) {
|
||||
@ -91,6 +81,5 @@ function onChange(pagination, filters, sorter) {
|
||||
console.log('各类参数是', pagination, filters, sorter);
|
||||
}
|
||||
|
||||
ReactDOM.render(<Table columns={columns} dataSource={data} onChange={onChange} />
|
||||
, mountNode);
|
||||
ReactDOM.render(<Table columns={columns} dataSource={data} onChange={onChange} />, mountNode);
|
||||
````
|
||||
|
@ -62,6 +62,7 @@ const columns = [{
|
||||
| dataSource | 数据数组 | Array | |
|
||||
| columns | 表格列的配置描述,具体项见下表 | Array | - |
|
||||
| rowKey | 表格行 key 的取值 | Function(record, index):string | record.key |
|
||||
| rowClassName | 表格行的类名 | Function(record, index):string | - |
|
||||
| expandedRowRender | 额外的展开行 | Function | - |
|
||||
| defaultExpandedRowKeys | 默认展开的行 | Array | - |
|
||||
| onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter) | |
|
||||
|
@ -1,4 +1,4 @@
|
||||
.ant-affix {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
z-index: @zindex-affix;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
.@{calendar-prefix-cls}-picker-container {
|
||||
position: absolute;
|
||||
z-index: 1070;
|
||||
z-index: @zindex-picker;
|
||||
|
||||
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
|
||||
&.slide-up-enter.slide-up-enter-active&-placement-topRight,
|
||||
|
@ -3,7 +3,7 @@
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
top: -9999px;
|
||||
z-index: 1000;
|
||||
z-index: @zindex-modal;
|
||||
|
||||
&-wrap * {
|
||||
box-sizing: border-box;
|
||||
|
@ -8,7 +8,7 @@
|
||||
background-color: #373737;
|
||||
background-color: rgba(55, 55, 55, 0.6);
|
||||
height: 100%;
|
||||
z-index: 1000;
|
||||
z-index: @zindex-modal-mask;
|
||||
filter: ~"alpha(opacity=50)";
|
||||
|
||||
&-hidden {
|
||||
|
@ -5,7 +5,7 @@
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
top: -9999px;
|
||||
z-index: 1070;
|
||||
z-index: @zindex-dropdown;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
|
@ -204,7 +204,8 @@ form {
|
||||
.ant-search-btn {
|
||||
.btn-default;
|
||||
border-radius: 0 @border-radius-base - 1 @border-radius-base - 1 0;
|
||||
margin-left: -30px;
|
||||
margin-left: -100%;
|
||||
left: -1px;
|
||||
position: relative;
|
||||
border-width: 0 0 0 1px;
|
||||
z-index: 2;
|
||||
|
@ -6,7 +6,7 @@
|
||||
margin-bottom: 0;
|
||||
padding-left: 0; // Override default ul/ol
|
||||
list-style: none;
|
||||
z-index: 999;
|
||||
z-index: @zindex-dropdown;
|
||||
box-shadow: @box-shadow-base;
|
||||
color: @text-color;
|
||||
background: #fff;
|
||||
@ -96,7 +96,7 @@
|
||||
position: absolute;
|
||||
min-width: 100%;
|
||||
margin-top: 7px;
|
||||
z-index: 1070;
|
||||
z-index: @zindex-dropdown;
|
||||
}
|
||||
|
||||
&-submenu-vertical > & {
|
||||
@ -105,7 +105,7 @@
|
||||
position: absolute;
|
||||
min-width: 160px;
|
||||
margin-left: 4px;
|
||||
z-index: 1070;
|
||||
z-index: @zindex-dropdown;
|
||||
}
|
||||
|
||||
&-item,
|
||||
|
@ -3,7 +3,7 @@
|
||||
.@{message-prefix-cls} {
|
||||
font-size: 12px;
|
||||
position: fixed;
|
||||
z-index: 1050;
|
||||
z-index: @zindex-message;
|
||||
width: 100%;
|
||||
top: 16px;
|
||||
left: 0;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
.@{notification-prefix-cls} {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
z-index: @zindex-notification;
|
||||
width: @notice-width;
|
||||
margin-right: 24px;
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1080;
|
||||
z-index: @zindex-popover;
|
||||
cursor: auto;
|
||||
user-select: text;
|
||||
white-space: normal;
|
||||
@ -103,7 +103,7 @@
|
||||
font-size: 12px;
|
||||
color: @text-color;
|
||||
> .anticon {
|
||||
color: @error-color;
|
||||
color: @warning-color;
|
||||
line-height: 17px;
|
||||
position: absolute;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@
|
||||
box-shadow: @box-shadow-base;
|
||||
border-radius: @border-radius-base;
|
||||
box-sizing: border-box;
|
||||
z-index: 1070;
|
||||
z-index: @zindex-dropdown;
|
||||
left: -9999px;
|
||||
top: -9999px;
|
||||
position: absolute;
|
||||
|
@ -1,7 +1,5 @@
|
||||
@tab-prefix-cls: ant-tabs;
|
||||
|
||||
@effect-duration: .3s;
|
||||
|
||||
.@{tab-prefix-cls} {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
@ -223,6 +221,7 @@
|
||||
animation-play-state: paused;
|
||||
animation-timing-function: @ease-in-out-quint;
|
||||
opacity: 0;
|
||||
animation-duration: 0.4s;
|
||||
}
|
||||
|
||||
&-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active {
|
||||
@ -240,6 +239,7 @@
|
||||
.motion-common();
|
||||
animation-play-state: paused;
|
||||
animation-timing-function: @ease-in-out-quint;
|
||||
animation-duration: 0.4s;
|
||||
}
|
||||
|
||||
&-slide-horizontal-backward-leave&-slide-horizontal-backward-leave-active {
|
||||
@ -253,6 +253,7 @@
|
||||
animation-play-state: paused;
|
||||
animation-timing-function: @ease-in-out-quint;
|
||||
opacity: 0;
|
||||
animation-duration: 0.4s;
|
||||
}
|
||||
|
||||
&-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active {
|
||||
@ -268,6 +269,7 @@
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
.motion-common();
|
||||
animation-duration: 0.4s;
|
||||
animation-play-state: paused;
|
||||
animation-timing-function: @ease-in-out-quint;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
.@{timepicker-prefix-cls}-panel {
|
||||
max-width: 168px;
|
||||
z-index: 1070;
|
||||
z-index: @zindex-picker;
|
||||
position: absolute;
|
||||
|
||||
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
|
||||
|
@ -24,7 +24,7 @@
|
||||
// Base class
|
||||
.@{tooltip-prefix-cls} {
|
||||
position: absolute;
|
||||
z-index: 1070;
|
||||
z-index: @zindex-tooltip;
|
||||
display: block;
|
||||
visibility: visible;
|
||||
// remove left/top by yiminghe
|
||||
|
@ -112,6 +112,17 @@
|
||||
@container-md : (940px + @grid-gutter-width);
|
||||
@container-lg : (1140px + @grid-gutter-width);
|
||||
|
||||
// z-index list
|
||||
@zindex-affix : 10;
|
||||
@zindex-modal-mask : 990;
|
||||
@zindex-modal : 1000;
|
||||
@zindex-notification : 1010;
|
||||
@zindex-message : 1010;
|
||||
@zindex-popover : 1030;
|
||||
@zindex-picker : 1050;
|
||||
@zindex-dropdown : 1050;
|
||||
@zindex-tooltip : 1060;
|
||||
|
||||
// Form
|
||||
// --------------------------------
|
||||
// Legend
|
||||
|
Loading…
Reference in New Issue
Block a user