Skip to content

Commit

Permalink
style(tcr): _simulateNativePress 中的 是一定有的
Browse files Browse the repository at this point in the history
  • Loading branch information
Manjiz committed Jun 29, 2018
1 parent 30b8435 commit 104f58e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/taro-components-rn/src/components/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ class _Button extends React.Component<Props, State> {
state: State = {
valve: new Animated.Value(0)
}
$touchable: ?React.ElementRef<TouchableOpacity>
$touchable: React.ElementRef<TouchableOpacity>

static defaultProps = {
size: 'default',
type: 'default'
}

_simulateNativePress = () => {
this.$touchable && this.$touchable.touchableHandlePress()
this.$touchable.touchableHandlePress()
}

animate = () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-components-rn/src/components/Checkbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ class _Checkbox extends React.Component<Props, State> {
state: State = {
checked: !!this.props.checked
}
$touchable: ?React.ElementRef<TouchableWithoutFeedback>
$touchable: React.ElementRef<TouchableWithoutFeedback>

static defaultProps = {
value: '',
color: '#09BB07',
}

_simulateNativePress = () => {
this.$touchable && this.$touchable.touchableHandlePress()
this.$touchable.touchableHandlePress()
}

onPress = () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-components-rn/src/components/Radio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ class _Radio extends React.Component<Props, State> {
state: State = {
checked: !!this.props.checked
}
$touchable: ?React.ElementRef<TouchableWithoutFeedback>
$touchable: React.ElementRef<TouchableWithoutFeedback>

static defaultProps = {
value: '',
color: '#09BB07',
}

_simulateNativePress = () => {
this.$touchable && this.$touchable.touchableHandlePress()
this.$touchable.touchableHandlePress()
}

onPress = () => {
Expand Down

0 comments on commit 104f58e

Please sign in to comment.