美文网首页
详情页面

详情页面

作者: 理想三旬_d066 | 来源:发表于2018-11-14 14:50 被阅读0次

    import React, { Component } from "react";

    import { ScrollView, StyleSheet, 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} />

            </ScrollView>

          </View>

        );

      }

    }

    const styles = StyleSheet.create({

      container: {

        flex: 1,

        backgroundColor: "#F5FCFF"

      },

      welcome: {

        fontSize: 20,

        textAlign: "center",

        margin: 10,

        flexDirection: "row"

      }

    });

    相关文章

      网友评论

          本文标题:详情页面

          本文链接:https://www.haomeiwen.com/subject/zykjfqtx.html