提交 f4b22607 编写于 作者: A afc163

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

......@@ -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'
};
},
......
......@@ -18,7 +18,6 @@
| 成员 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| animation | 动画名称 | String | slide-up |
| trigger | 触发下来行为 | "click" or "hover" | hover |
| overlay | 菜单节点 | React.Element | 无 |
......
......@@ -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;
});
......
......@@ -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"/>;
}
});
......
......@@ -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} />
);
......
......@@ -17,6 +17,10 @@
position: relative;
}
&-hidden {
display: none;
}
&-menu {
outline: none;
position: relative;
......
......@@ -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; }
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册