Merge branch 'master' of github.com:ant-design/ant-design

This commit is contained in:
偏右 2016-03-28 16:55:54 +08:00
commit d9b2b51558
21 changed files with 60 additions and 57 deletions

View File

@ -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';

View File

@ -30,7 +30,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];

View File

@ -20,7 +20,7 @@ AntModal.success = function (props) {
AntModal.error = function (props) {
const config = objectAssign({}, props, {
iconClassName: 'exclamation-circle',
iconClassName: 'cross-circle',
okCancel: false,
});
return confirm(config);

View File

@ -39,10 +39,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';

View File

@ -69,7 +69,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`}>

View File

@ -57,17 +57,17 @@ let Line = React.createClass({
text = props.format(props.percent);
}
if (props.showInfo === true) {
if (props.showInfo) {
if (props.status === 'exception') {
progressInfo = (
<span className={`${prefixCls}-line-text`}>
{props.format ? text : <Icon type="exclamation" />}
{props.format ? text : <Icon type="cross-circle" />}
</span>
);
} else if (props.status === 'success') {
progressInfo = (
<span className={`${prefixCls}-line-text`}>
{props.format ? text : <Icon type="check" />}
{props.format ? text : <Icon type="check-circle" />}
</span>
);
} else {
@ -85,12 +85,12 @@ let Line = React.createClass({
return (
<div className={`${prefixCls}-line-wrap clearfix status-${props.status}${fullCls}`} style={props.style}>
{progressInfo}
<div className={`${prefixCls}-line-outer`}>
<div className={`${prefixCls}-line-inner`}>
<div className={`${prefixCls}-line-bg`} style={percentStyle}></div>
</div>
</div>
{progressInfo}
</div>
);
}

View File

@ -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);
````

View File

@ -1,4 +1,4 @@
.ant-affix {
position: fixed;
z-index: 10;
z-index: @zindex-affix;
}

View File

@ -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,

View File

@ -3,7 +3,7 @@
position: absolute;
left: -9999px;
top: -9999px;
z-index: 1000;
z-index: @zindex-modal;
&-wrap * {
box-sizing: border-box;

View File

@ -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 {

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -8,7 +8,7 @@
.@{notification-prefix-cls} {
position: fixed;
z-index: 1000;
z-index: @zindex-notification;
width: @notice-width;
margin-right: 24px;

View File

@ -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;
}

View File

@ -11,11 +11,13 @@
position: relative;
}
&-line-outer {
margin-right: 45px;
}
&-line-wrap-full {
.@{progress-prefix-cls}-line-outer {
padding-right: 45px;
display: inline-block;
width: 100%;
margin-right: -45px;
.@{progress-prefix-cls}-line-wrap-full & {
margin-right: 0;
padding-right: 0;
}
}
&-line-inner {
@ -23,6 +25,7 @@
width: 100%;
background-color: #f3f3f3;
border-radius: 100px;
vertical-align: middle;
}
&-line-bg {
border-radius: 100px;
@ -31,14 +34,13 @@
position: relative;
}
&-line-text {
position: absolute;
top: 0;
right: 0;
width: 35px;
text-align: left;
font-size: 1em;
margin-left: 10px;
vertical-align: middle;
display: inline-block;
font-family: tahoma;
.anticon {
font-weight: bold;
font-size: 12px;
@ -88,6 +90,7 @@
top: 50%;
transform: translateY(-50%);
left: 0;
font-family: tahoma;
.anticon {
font-size: 14 / 12em;

View File

@ -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;

View File

@ -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,

View File

@ -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

View File

@ -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