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

This commit is contained in:
afc163 2015-06-15 21:30:37 +08:00
commit f4b226075f
9 changed files with 113 additions and 1826 deletions

View File

@ -6,7 +6,7 @@ var Dropdown = require('rc-dropdown');
module.exports = React.createClass({
getDefaultProps: function() {
return {
animation: 'slide-up',
transitionName: 'slide-up',
prefixCls: 'ant-dropdown'
};
},

View File

@ -18,7 +18,6 @@
| 成员 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| animation | 动画名称 | String | slide-up |
| trigger | 触发下来行为 | "click" or "hover" | hover |
| overlay | 菜单节点 | React.Element | 无 |

View File

@ -8,8 +8,6 @@ module.exports = function (props) {
var d;
props = props || {};
props.iconClassName = props.iconClassName || 'anticon-exclamation-circle';
props.animation = 'zoom';
props.maskAnimation = 'fade';
var width = props.width || 375;
function close() {
@ -21,9 +19,9 @@ module.exports = function (props) {
function onCancel() {
var cancelFn = props.onCancel;
if (cancelFn) {
if(cancelFn.length) {
if (cancelFn.length) {
cancelFn(close);
}else {
} else {
cancelFn();
close();
}
@ -35,9 +33,9 @@ module.exports = function (props) {
function onOk() {
var okFn = props.onOk;
if (okFn) {
if(okFn.length) {
if (okFn.length) {
okFn(close);
}else {
} else {
okFn();
close();
}
@ -61,9 +59,16 @@ module.exports = function (props) {
document.body.appendChild(div);
}
React.render(<Dialog prefixCls="ant-modal" className="ant-confirm" renderToBody={false} visible={true} closable={false} title="" animation="zoom" maskAnimation="fade" width={width}>
React.render(<Dialog
prefixCls="ant-modal"
className="ant-confirm"
renderToBody={false}
visible={true}
closable={false}
title=""
transitionName="zoom"
maskTransitionName="fade" width={width}>
<div style={{zoom: 1, overflow: 'hidden'}}>{body} {footer}</div>
</Dialog>, div, function () {
d = this;
});

View File

@ -46,7 +46,7 @@ var Modal = React.createClass({
<button type="button" className="ant-btn-default ant-btn" onClick={this.handleCancel}> </button>,
<button type="button" className="ant-btn-primary ant-btn" onClick={this.handleOk}> </button>
];
return <Dialog animation="zoom" onBeforeClose={props.onCancel} visible={this.state.visible} maskAnimation="fade" width="500" footer={footer} {...props} ref="d"/>;
return <Dialog transitionName="zoom" onBeforeClose={props.onCancel} visible={this.state.visible} maskAnimation="fade" width="500" footer={footer} {...props} ref="d"/>;
}
});

View File

@ -4,12 +4,13 @@ var React = require('react');
var Select = require('rc-select');
module.exports = React.createClass({
getDefaultProps: function() {
getDefaultProps: function () {
return {
prefixCls: 'ant-select'
prefixCls: 'ant-select',
transitionName: 'slide-up'
};
},
render: function() {
render: function () {
return (
<Select {...this.props} />
);

View File

@ -15,13 +15,13 @@
"gregorian-calendar": "~3.0.0",
"gregorian-calendar-format": "~3.0.1",
"rc-calendar": "~3.9.0",
"rc-dialog": "~4.3.1",
"rc-dropdown": "~1.0.1",
"rc-dialog": "~4.3.2",
"rc-dropdown": "~1.0.2",
"rc-menu": "~3.3.0",
"rc-progress": "~1.0.0",
"rc-select": "~3.3.5",
"rc-select": "~3.4.1",
"rc-tabs": "~5.1.0",
"rc-tooltip": "~2.1.0"
"rc-tooltip": "~2.1.1"
},
"devDependencies": {
"babel-core": "~5.4.7",

View File

@ -17,6 +17,10 @@
position: relative;
}
&-hidden {
display: none;
}
&-menu {
outline: none;
position: relative;

View File

@ -31,6 +31,10 @@
font-size: @font-size-base;
line-height: @line-height-base;
opacity: @tooltip-opacity;
&-hidden {
display: none;
}
&-placement-top { padding: @tooltip-arrow-width 0 @tooltip-distance 0; }
&-placement-right { padding: 0 @tooltip-arrow-width 0 @tooltip-distance; }

File diff suppressed because it is too large Load Diff