Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-12-07 21:01:47 +08:00
7 changed files with 32 additions and 17 deletions
+2 -1
View File
@@ -89,7 +89,8 @@ export default {
onChange(value) {
Toast.loading({ forbidClick: true });
setTimeout(() => {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
Toast.clear();
this.value = value;
}, 500);
+2 -2
View File
@@ -111,9 +111,9 @@ export default {
onChange(value) {
Toast.loading({ forbidClick: true });
setTimeout(() => {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
Toast.clear();
// 注意此时修改 value 后会再次触发 change 事件
this.value = value;
}, 500);
+2 -1
View File
@@ -89,7 +89,8 @@ export default {
onChange(value) {
this.$toast.loading({ forbidClick: true });
setTimeout(() => {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.stepper6 = value;
this.$toast.clear();
}, 500);
+10 -1
View File
@@ -238,6 +238,14 @@ export default createComponent({
}
};
const onMousedown = (event: MouseEvent) => {
// fix mobile safari page scroll down issue
// see: https://github.com/youzan/vant/issues/7690
if (props.disableInput) {
event.preventDefault();
}
};
const createListeners = (type: 'plus' | 'minus') => ({
onClick: (event: MouseEvent) => {
// disable double tap scrolling on mobile safari
@@ -303,9 +311,10 @@ export default createComponent({
aria-valuemax={+props.max}
aria-valuemin={+props.min}
aria-valuenow={+current.value}
onBlur={onBlur}
onInput={onInput}
onFocus={onFocus}
onBlur={onBlur}
onMousedown={onMousedown}
/>
<button
v-show={props.showPlus}