import React, { Component } from "react";
import { ScrollView, StyleSheet, Dimensions, View } from "react-native";
import HTML from "react-native-render-html"; //渲染html成原生内容
export default class Details extends Component {
/**
* 初始化构造方法
*/
constructor(props) {
super(props);
}
/**
* 元素渲染
*/
render() {
var content = this.props.navigation.getParam("abc", "123");
return (
<View style={styles.container}>
<ScrollView style={{ flex: 1 }}>
<HTML
html={content}
imagesMaxWidth={Dimensions.get("window").width - 20}
/>
</ScrollView>
</View>
);
}
}
/**
* 样式表
*/
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#F5FCFF"
},
welcome: {
flex: 1
}
});
网友评论