diff --git a/src/popover/index.js b/src/popover/index.js index 25cf3b074..b81125595 100644 --- a/src/popover/index.js +++ b/src/popover/index.js @@ -126,14 +126,14 @@ export default createComponent({ const renderAction = (action, index) => { const { icon, text, disabled, className } = action; return ( - + ); }; @@ -167,7 +167,7 @@ export default createComponent({ {...{ ...attrs, 'onUpdate:show': toggle }} >
-
+ diff --git a/src/popover/index.less b/src/popover/index.less index bc9d5c046..d961fbcf4 100644 --- a/src/popover/index.less +++ b/src/popover/index.less @@ -34,8 +34,6 @@ padding: 0 @padding-md; font-size: @popover-action-font-size; line-height: @line-height-md; - background-color: transparent; - border: none; cursor: pointer; &:last-child { diff --git a/src/popover/test/__snapshots__/index.spec.js.snap b/src/popover/test/__snapshots__/index.spec.js.snap index 1ef033dc4..c3e38fdc0 100644 --- a/src/popover/test/__snapshots__/index.spec.js.snap +++ b/src/popover/test/__snapshots__/index.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should allow to custom the className of action 1`] = ` - +
`; exports[`should locate to reference element when showed 1`] = ` @@ -23,7 +23,9 @@ exports[`should locate to reference element when showed 2`] = ` >
-
+
@@ -36,7 +38,9 @@ exports[`should locate to reference element when showed 3`] = ` >
-
+
@@ -50,7 +54,9 @@ exports[`should watch placement prop and update location 1`] = ` >
-
+
diff --git a/src/stepper/README.md b/src/stepper/README.md index 8fa1a106a..dbeded5d3 100644 --- a/src/stepper/README.md +++ b/src/stepper/README.md @@ -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); diff --git a/src/stepper/README.zh-CN.md b/src/stepper/README.zh-CN.md index 70db44744..2328264fe 100644 --- a/src/stepper/README.zh-CN.md +++ b/src/stepper/README.zh-CN.md @@ -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); diff --git a/src/stepper/demo/index.vue b/src/stepper/demo/index.vue index 550edf81b..b38603ffe 100644 --- a/src/stepper/demo/index.vue +++ b/src/stepper/demo/index.vue @@ -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); diff --git a/src/stepper/index.tsx b/src/stepper/index.tsx index 749fa6173..97b4819d2 100644 --- a/src/stepper/index.tsx +++ b/src/stepper/index.tsx @@ -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} />