mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Slider): add slide animation (#4700)
This commit is contained in:
parent
e1f88014d6
commit
696c9d71d5
@ -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}
|
||||
|
@ -9,6 +9,7 @@
|
||||
position: relative;
|
||||
background-color: @slider-active-background-color;
|
||||
border-radius: inherit;
|
||||
transition: width @animation-duration-fast;
|
||||
}
|
||||
|
||||
&__button {
|
||||
|
Loading…
x
Reference in New Issue
Block a user