Skip to content

Commit

Permalink
feat(component): 支持webkit前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanaMaid committed Sep 19, 2018
1 parent b9ec8d9 commit e01a30f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/Collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

&-active {
.@{panel-prefix-cls}-icon {
transform: rotate(90deg);
transform: rotate(90deg) translate(-50%);
}
}

Expand Down
6 changes: 5 additions & 1 deletion components/Transitions/Expand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ export class Expand extends Component<IExpandProps, IExpandState> {
>
{
() => {
const transition = `height ${timeout! / 1000}s cubic-bezier(0.645, 0.045, 0.355, 1)`;
return (
<div
className={preCls}
style={{transition: `height ${timeout! / 1000}s cubic-bezier(.645,.045,.355,1)`}}
style={{
transition,
WebkitTransition: transition,
}}
ref={(v: HTMLElement | null) => {
if (v) {
this.refContainer = v;
Expand Down
4 changes: 3 additions & 1 deletion components/Transitions/Scale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ export class Scale extends Component<IScaleProps, IScaleState> {
{
() => {
const child = React.Children.only(children);
const transition = `all ${timeout! / 1000}s cubic-bezier(.645,.045,.355,1)`;
return React.cloneElement(child, {
style: {
...child.props.style,
transition: `all ${timeout! / 1000}s cubic-bezier(.645,.045,.355,1)`,
transition,
WebkitTransition: transition,
},
ref: (v: HTMLElement) => {
if (v) {
Expand Down
4 changes: 3 additions & 1 deletion components/Transitions/Slide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,12 @@ export class Slide extends Component<ISlideProps, ISlideState> {
{
() => {
const child = React.Children.only(children);
const transition = `all ${timeout! / 1000}s cubic-bezier(.645,.045,.355,1)`;
return React.cloneElement(child, {
style: {
...child.props.style,
transition: `all ${timeout! / 1000}s cubic-bezier(.645,.045,.355,1)`,
transition,
WebkitTransition: transition,
},
ref: (v: HTMLElement) => {
if (v) {
Expand Down

0 comments on commit e01a30f

Please sign in to comment.