File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/taro-components-rn Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default class EXSwiper extends Component {
20
20
backgroundColor : 'black'
21
21
} }
22
22
>
23
- < SwiperItem style = { { backgroundColor : 'red' } } >
23
+ < SwiperItem onClick = { ( ) => { alert ( 'click item' ) } } style = { { backgroundColor : 'red' } } >
24
24
< Text > Hello Swiper</ Text >
25
25
</ SwiperItem >
26
26
< SwiperItem style = { { backgroundColor : 'green' } } >
Original file line number Diff line number Diff line change 5
5
import * as React from 'react'
6
6
import {
7
7
// Text,
8
- View ,
8
+ // View,
9
9
StyleSheet ,
10
10
} from 'react-native'
11
+ import View from '../View'
11
12
import styles from './styles'
13
+ import utils from '../../utils'
12
14
13
15
type Props = {
14
16
children ?: React . Node ,
@@ -33,7 +35,10 @@ class _SwiperItem extends React.Component<Props> {
33
35
} = this . props
34
36
35
37
return (
36
- < View style = { [ styles . page , style ] } >
38
+ < View
39
+ { ...utils . omit ( this . props , [ 'style' ] ) }
40
+ style = { [ styles . page , style ] }
41
+ >
37
42
{ children }
38
43
</ View >
39
44
)
You can’t perform that action at this time.
0 commit comments