import React, { Component } from "react";
import { View, Text, ScrollView, Dimensions } from "react-native";
import HTML from "react-native-render-html";
export default class Detils extends Component {
//标题
static navigationOptions = ({ navigation }) => {
return {
title: navigation.getParam("name").title
};
};
constructor(props) {
super(props);
this.state = {
content: this.props.navigation.getParam("name").content
};
}
render() {
return (
<ScrollView>
<HTML
html={this.state.content}
imagesMaxWidth={Dimensions.get("window").width}
/>
</ScrollView>
);
}
}
网友评论