提交 dc7d2a3a 编写于 作者: Q qiang

fix: patch for 211d4749 #2132

上级 4186e18a
......@@ -16,14 +16,15 @@ function isFunction (expr) {
function processEvent (expr, filterModules) {
const isMethodPath = simplePathRE.test(expr)
expr = `(${expr})`
if (isMethodPath || isFunction(expr)) {
if (filterModules.find(name => expr.indexOf(name + '.') === 0)) {
return `
$event = $handleWxsEvent($event);
(${expr})($event, $getComponentDescriptor())
${expr}($event, $getComponentDescriptor())
`
} else {
expr = `(${expr})(...arguments)`
expr = `${expr}(...arguments)`
}
}
return `
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册