From ea35f03428db57e62a9331b968ea637308af7abc Mon Sep 17 00:00:00 2001 From: hiyuki <674883329@qq.com> Date: Fri, 22 Feb 2019 16:08:29 +0800 Subject: [PATCH] fix input return value --- packages/core/src/platform/builtInMixins/proxyEventMixin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/platform/builtInMixins/proxyEventMixin.js b/packages/core/src/platform/builtInMixins/proxyEventMixin.js index a23d6906ff..3fc2fe2533 100644 --- a/packages/core/src/platform/builtInMixins/proxyEventMixin.js +++ b/packages/core/src/platform/builtInMixins/proxyEventMixin.js @@ -13,6 +13,7 @@ export default function proxyEventMixin () { const target = $event.currentTarget || $event.target const bindConfigs = target.dataset.__bindconfigs || {} const curEventConfig = bindConfigs[type] || bindConfigs[fallbackType] || [] + let returnedValue curEventConfig.forEach((item) => { const callbackName = item[0] if (callbackName) { @@ -24,12 +25,13 @@ export default function proxyEventMixin () { } }) : [$event] if (typeof this[callbackName] === 'function') { - this[callbackName].apply(this, params) + returnedValue = this[callbackName].apply(this, params) } else { console.warn(`[${callbackName}] is not function`) } } }) + return returnedValue }, __model (expr, $event) { let parent