Browse Source

update motion

pull/26/head
yiminghe 10 years ago
parent
commit
73d89f46af
  1. 2
      components/dropdown/index.jsx
  2. 1
      components/dropdown/index.md
  3. 2
      components/modal/confirm.jsx
  4. 2
      components/modal/index.jsx
  5. 7
      components/select/index.jsx
  6. 8
      package.json
  7. 4
      style/components/dropdown.less
  8. 4
      style/components/tooltip.less
  9. 1856
      style/core/motion.less

2
components/dropdown/index.jsx

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

1
components/dropdown/index.md

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

2
components/modal/confirm.jsx

@ -8,7 +8,7 @@ module.exports = function (props) {
var d; var d;
props = props || {}; props = props || {};
props.iconClassName = props.iconClassName || 'anticon-exclamation-circle'; props.iconClassName = props.iconClassName || 'anticon-exclamation-circle';
props.animation = 'zoom'; props.transitionName = 'zoom';
props.maskAnimation = 'fade'; props.maskAnimation = 'fade';
var width = props.width || 375; var width = props.width || 375;

2
components/modal/index.jsx

@ -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-default ant-btn" onClick={this.handleCancel}> </button>,
<button type="button" className="ant-btn-primary ant-btn" onClick={this.handleOk}> </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"/>;
} }
}); });

7
components/select/index.jsx

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

8
package.json

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

4
style/components/dropdown.less

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

4
style/components/tooltip.less

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

1856
style/core/motion.less

File diff suppressed because it is too large
Loading…
Cancel
Save