index.ios.js
<Navigator
initialRoute={{
name: 'home',
component: Index
}}
renderScene={(route, navigator) => {
let C = route.component;
if (route.component) {
return <C
{...route.passProps}
navigator={navigator}
title={route.name}
/>;
}
}}
/>
detail.js
<TouchableOpacity
key={index}
onPress={() =>
this.props.navigator.push({
title: '详情',
component: Detail,
passProps: {
url: 'http://test'
}
})
}
>
<View>//这里是产品列表</View>
</TouchableOpacity>
网友评论