diff --git a/packages/wxa-cli/package.json b/packages/wxa-cli/package.json index b7a4babd..e81f1bae 100644 --- a/packages/wxa-cli/package.json +++ b/packages/wxa-cli/package.json @@ -1,6 +1,6 @@ { "name": "@webank/wxa-cli2-apple", - "version": "1.0.41", + "version": "1.0.47", "description": "cli for wxa development", "main": "dist/wxa.js", "scripts": { diff --git a/packages/wxa-cli/src/tester/domWalker.js b/packages/wxa-cli/src/tester/domWalker.js index de310b36..70c21aa5 100644 --- a/packages/wxa-cli/src/tester/domWalker.js +++ b/packages/wxa-cli/src/tester/domWalker.js @@ -54,8 +54,11 @@ class XMLManager { element.attribs[`bind${$1}`] = `$$e2e_${$1}`; } }); - - + } + let openType = Object.keys(attributes).some((attr)=>attr === 'open-type'); + let bindtap = Object.keys(attributes).some((attr)=>attr === 'bindtap'); + if (openType && !bindtap) { + element.attribs[`bindtap`] = `$$e2e_tap`; } // navigator标签劫持 if(element.name === 'navigator') {