mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
去除行效果了
This commit is contained in:
parent
c2be1cbf81
commit
6b66ad7dbf
@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import Menu from 'rc-menu';
|
||||
import velocity from 'velocity-animate';
|
||||
import EnterAnimation from 'enter-animation';
|
||||
|
||||
const animation = {
|
||||
enter(node, done) {
|
||||
@ -59,40 +58,6 @@ const AntMenu = React.createClass({
|
||||
prefixCls: 'ant-menu'
|
||||
};
|
||||
},
|
||||
toggle(info) {
|
||||
let dom = React.findDOMNode(info.item || info);
|
||||
let ul = dom.getElementsByTagName('ul')[0];
|
||||
function TweenAnimate(_dom) {
|
||||
let num=Number((.12/_dom.children.length).toFixed(3));
|
||||
if(info.open){
|
||||
EnterAnimation.to(_dom,{duration:.15,data:'scale',interval:num});
|
||||
}else{
|
||||
EnterAnimation.to(_dom,{duration:.15,data:'scale',interval:num,direction:'leave',upend:true,ease:'cubic-bezier(0.6, 0.04, 0.98, 0.335)'});
|
||||
}
|
||||
}
|
||||
if (this.props.mode && info.item && !ul) {
|
||||
setTimeout(()=> {
|
||||
ul = dom.getElementsByTagName('ul')[0];
|
||||
TweenAnimate(ul);
|
||||
}, 1);
|
||||
} else {
|
||||
if (!ul) {
|
||||
ul = dom;
|
||||
}
|
||||
TweenAnimate(ul);
|
||||
}
|
||||
},
|
||||
componentDidMount() {
|
||||
this.componentDidUpdate(this.props);
|
||||
},
|
||||
componentDidUpdate(prevProps) {
|
||||
//更改初始进场(dropdown)
|
||||
if (!prevProps.mode) {
|
||||
var height = React.findDOMNode(this).offsetHeight;
|
||||
this.open = height ? true : false;//!this.open;
|
||||
this.toggle(this);
|
||||
}
|
||||
},
|
||||
render() {
|
||||
let openAnimation = '';
|
||||
switch (this.props.mode) {
|
||||
|
@ -203,12 +203,6 @@
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
& .@{menu-prefix-cls}-vertical.@{menu-prefix-cls}-sub {
|
||||
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu {
|
||||
transform-origin: 50% 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-vertical, &-inline {
|
||||
@ -241,7 +235,6 @@
|
||||
&-vertical&-sub {
|
||||
padding: 0;
|
||||
transform-origin: 0 0;
|
||||
//animation-duration: 0.4s;
|
||||
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu {
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
@ -259,18 +252,12 @@
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
|
||||
line-height: 34px;
|
||||
height: 34px;
|
||||
list-style-type: disc;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu {
|
||||
transform-origin: 50% -30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user