Skip to content

Commit

Permalink
fix: 事件绑定JSX函数时,函数解析报错 (#441)
Browse files Browse the repository at this point in the history
* fix: 绑定事件时保留函数名,避免JSX转换出错
  • Loading branch information
gene9831 authored May 17, 2024
1 parent 47c71d1 commit ffd0280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/settings/events/src/components/BindEventsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ export default {
saveMethod?.({
name: state.bindMethodInfo.name,
content: state.enableExtraParams
? `function (eventArgs,${formatParams}) ${functionBody}`
: `function (${formatParams}) ${functionBody}`
? `function ${state.bindMethodInfo.name}(eventArgs,${formatParams}) ${functionBody}`
: `function ${state.bindMethodInfo.name}(${formatParams}) ${functionBody}`
})
activePagePlugin()
Expand Down

0 comments on commit ffd0280

Please sign in to comment.