fix: 事件绑定JSX函数时,函数解析报错 (#441)

* fix: 绑定事件时保留函数名,避免JSX转换出错
This commit is contained in:
Gene 2024-05-16 20:42:10 -07:00 committed by GitHub
parent 47c71d1129
commit ffd0280877
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -352,8 +352,8 @@ export default {
saveMethod?.({ saveMethod?.({
name: state.bindMethodInfo.name, name: state.bindMethodInfo.name,
content: state.enableExtraParams content: state.enableExtraParams
? `function (eventArgs,${formatParams}) ${functionBody}` ? `function ${state.bindMethodInfo.name}(eventArgs,${formatParams}) ${functionBody}`
: `function (${formatParams}) ${functionBody}` : `function ${state.bindMethodInfo.name}(${formatParams}) ${functionBody}`
}) })
activePagePlugin() activePagePlugin()