Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix(one): 修复 remax/one 头条 View 组件 onTap 不生效的问题 (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darmody committed May 12, 2020
1 parent 29ca6e6 commit 1af831d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -593,13 +593,19 @@
<template name="REMAX_TPL_view">
<view
animation="{{i.props['animation']}}"
aria-role="{{i.props['aria-role']}}"
bindlongtap="{{i.props['bindlongtap']}}"
bindtap="{{i.props['bindtap']}}"
bindtouchcancel="{{i.props['bindtouchcancel']}}"
bindtouchend="{{i.props['bindtouchend']}}"
bindtouchmove="{{i.props['bindtouchmove']}}"
bindtouchstart="{{i.props['bindtouchstart']}}"
class="{{i.props['class']}}"
data-foo="{{i.props['data-foo']}}"
hover-class="{{i.props['hover-class']}}"
hover-start-time="{{i.props['hover-start-time']}}"
hover-stay-time="{{i.props['hover-stay-time']}}"
id="{{i.props['id']}}"
role="{{i.props['role']}}"
style="{{i.props['style']}}"
>

Expand Down
10 changes: 9 additions & 1 deletion packages/remax-one/src/hostComponents/View/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ const platformAlias: any = {
onTouchCancel: 'bindtouchcancel',
onLongTap: 'bindlongtap',
},
toutiao: {},
toutiao: {
role: 'aria-role',
onTap: 'bindtap',
onTouchStart: 'bindtouchstart',
onTouchMove: 'bindtouchmove',
onTouchEnd: 'bindtouchend',
onTouchCancel: 'bindtouchcancel',
onLongTap: 'bindlongtap',
},
};

const defaultAlias = {
Expand Down

1 comment on commit 1af831d

@vercel
Copy link

@vercel vercel bot commented on 1af831d May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.