Skip to content

Commit

Permalink
fix: 事件绑定走setData不走xml扩展
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengyanan1 committed Nov 22, 2024
1 parent 7029f3e commit aea8310
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/taro-react/src/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ function setEvent (dom: TaroElement, name: string, value: unknown, oldValue?: un
dom.addEventListener(eventName, value, process.env.TARO_PLATFORM !== PLATFORM_TYPE.HARMONY ? { isCapture, sideEffect: false } : undefined)
} else {
dom.addEventListener(eventName, value, process.env.TARO_PLATFORM !== PLATFORM_TYPE.HARMONY ? isCapture : undefined)
// TODO:把事件绑定写到data里
dom.setAttribute(`bind${eventName}`, 'eh')
}
} else {
dom.removeEventListener(eventName, oldValue as any)
Expand Down

0 comments on commit aea8310

Please sign in to comment.