feat(Slider): add slide animation (#4700)

This commit is contained in:
neverland 2019-10-12 11:19:52 +08:00 committed by GitHub
parent e1f88014d6
commit 696c9d71d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -34,6 +34,12 @@ export default createComponent({
}
},
data() {
return {
dragStatus: ''
};
},
computed: {
range() {
return this.max - this.min;
@ -139,6 +145,10 @@ export default createComponent({
background: this.activeColor
};
if (this.dragStatus) {
barStyle.transition = 'none';
}
return (
<div
style={style}

View File

@ -9,6 +9,7 @@
position: relative;
background-color: @slider-active-background-color;
border-radius: inherit;
transition: width @animation-duration-fast;
}
&__button {