mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
fix(Picker): optimize the click experience
This commit is contained in:
parent
719928cb5a
commit
5cbb9e2998
@ -107,10 +107,10 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onTouchMove(event) {
|
onTouchMove(event) {
|
||||||
this.moving = true;
|
|
||||||
this.touchMove(event);
|
this.touchMove(event);
|
||||||
|
|
||||||
if (this.direction === 'vertical') {
|
if (this.direction === 'vertical') {
|
||||||
|
this.moving = true;
|
||||||
preventDefault(event, true);
|
preventDefault(event, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,8 +195,7 @@ export default createComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 若有触发过 `touchmove` 事件,那应该
|
// trigger the change event after transitionend when moving
|
||||||
// 在 `transitionend` 后再触发 `change` 事件
|
|
||||||
if (this.moving) {
|
if (this.moving) {
|
||||||
this.transitionEndTrigger = trigger;
|
this.transitionEndTrigger = trigger;
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
font-size: @picker-action-font-size;
|
font-size: @picker-action-font-size;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @picker-action-active-color;
|
background-color: @picker-action-active-color;
|
||||||
@ -36,6 +37,7 @@
|
|||||||
&__columns {
|
&__columns {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__loading {
|
&__loading {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user