mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +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) {
|
||||
this.moving = true;
|
||||
this.touchMove(event);
|
||||
|
||||
if (this.direction === 'vertical') {
|
||||
this.moving = true;
|
||||
preventDefault(event, true);
|
||||
}
|
||||
|
||||
@ -195,8 +195,7 @@ export default createComponent({
|
||||
}
|
||||
};
|
||||
|
||||
// 若有触发过 `touchmove` 事件,那应该
|
||||
// 在 `transitionend` 后再触发 `change` 事件
|
||||
// trigger the change event after transitionend when moving
|
||||
if (this.moving) {
|
||||
this.transitionEndTrigger = trigger;
|
||||
} else {
|
||||
|
@ -20,6 +20,7 @@
|
||||
font-size: @picker-action-font-size;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:active {
|
||||
background-color: @picker-action-active-color;
|
||||
@ -36,6 +37,7 @@
|
||||
&__columns {
|
||||
position: relative;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&__loading {
|
||||
|
Loading…
x
Reference in New Issue
Block a user