提交 478218ff 编写于 作者: fxy060608's avatar fxy060608

fix(mp-weixin): input event compatible with async function (#3462)

上级 57c80aa1
...@@ -5,6 +5,7 @@ import { ...@@ -5,6 +5,7 @@ import {
hasOwn, hasOwn,
NOOP, NOOP,
isString, isString,
isPromise,
} from '@vue/shared' } from '@vue/shared'
import { import {
callWithAsyncErrorHandling, callWithAsyncErrorHandling,
...@@ -94,7 +95,11 @@ function createInvoker( ...@@ -94,7 +95,11 @@ function createInvoker(
if (bubbles.includes(e.type) && !eventSync) { if (bubbles.includes(e.type) && !eventSync) {
setTimeout(invoke) setTimeout(invoke)
} else { } else {
return invoke() const res = invoke()
if (e.type === 'input' && isPromise(res)) {
return
}
return res
} }
} }
invoker.value = initialValue invoker.value = initialValue
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册