From 37809e71e8309c8c686f14bcc050013c5c705c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Wed, 2 Jun 2021 22:31:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B7=B3=E8=BF=87=20JSExpression=20?= =?UTF-8?q?=E5=B9=B6=E5=B8=A6=E6=9C=89=20events=20=E7=9A=84=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vision-polyfill/src/props-reducers/init-node-reducer.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/vision-polyfill/src/props-reducers/init-node-reducer.ts b/packages/vision-polyfill/src/props-reducers/init-node-reducer.ts index 9fa3770bd..08d9ef2cf 100644 --- a/packages/vision-polyfill/src/props-reducers/init-node-reducer.ts +++ b/packages/vision-polyfill/src/props-reducers/init-node-reducer.ts @@ -27,7 +27,11 @@ export function initNodeReducer(props, node) { initials.forEach(item => { try { // FIXME! item.name could be 'xxx.xxx' - newProps[item.name] = item.initial(node as any, newProps[item.name]); + const value = props[item.name]; + // JSExpression 并且带有 events 字段属于特殊情况,不再处理 + if (!(isJSExpression(value) && value.events)) { + newProps[item.name] = item.initial(node as any, newProps[item.name]); + } } catch (e) { if (hasOwnProperty(props, item.name)) { newProps[item.name] = props[item.name];