-
Notifications
You must be signed in to change notification settings - Fork 365
feat(wechat): view 支持 catchTouchMove 事件 #1105
Conversation
noyobo
commented
Jun 19, 2020
•
edited
Loading
edited
- 验证 catch 事件给模板带来的副作用
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/remaxjs/remax/lfxbugnt3 |
坑呀。 只要声明了 catch 的事件就乱套了。。。 |
即便现在的方式,通过 JSX 分析的, 依然会有问题。 base.xml 里生成的都会带这个字段的模版。 考虑以下结构 remax: 2.5.5 <View id="parent" style="padding: 100px" onTouchMove="P-A">
<View wechat-catchtouchmove="C-A" />
</View> 实际作用的模版是 <View id="parent" style="padding: 100px" bindtouchmove="P-A" catchtouchmove="{{undefined}}">
<View catchtouchmove="C-A" />
</View> 导致 |
试试用 |
This reverts commit bd4991a.
并对模板进行条件渲染,含 catchTouchMove 属性的 node 节点单独渲染,避免由于空属性导致其他 View 出现副作用。
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6312f78:
|
Codecov Report
@@ Coverage Diff @@
## master #1105 +/- ##
=======================================
Coverage 95.27% 95.27%
=======================================
Files 350 350
Lines 3682 3682
Branches 515 515
=======================================
Hits 3508 3508
Misses 172 172
Partials 2 2
Continue to review full report at Codecov.
|