Skip to content

Commit 6ff2c3a

Browse files
committed
fix(alita): 修复Text, Image标签事件不触发的bug
1 parent 6e4acbe commit 6ff2c3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tran/addEventHandler.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default function touchableToView (ast) {
110110
const diuu = getDiuu(path.node.attributes)
111111
if (hasEvent) {
112112
path.node.attributes.push(
113-
t.jsxAttribute(t.jsxIdentifier('data-diuu'), t.stringLiteral(diuu)),
113+
t.jsxAttribute(t.jsxIdentifier('data-diuu'), t.stringLiteral(`{{${diuu}}}`)),
114114
t.jsxAttribute(t.jsxIdentifier('hover-stop-propagation'), t.stringLiteral("true")),
115115
)
116116
}
@@ -141,7 +141,7 @@ export default function touchableToView (ast) {
141141
const diuu = getDiuu(path.node.attributes)
142142
if (hasEvent) {
143143
path.node.attributes.push(
144-
t.jsxAttribute(t.jsxIdentifier('data-diuu'), t.stringLiteral(diuu)),
144+
t.jsxAttribute(t.jsxIdentifier('data-diuu'), t.stringLiteral(`{{${diuu}}}`)),
145145
)
146146
}
147147

0 commit comments

Comments
 (0)