import React, { Component } from "react" import { View, Text } from 'react-native'; import BaseFunc from '../base/func' import BaseDefine from '../base/define' import BaseIo from '../base/io' import { WebView, WebViewHtmlSource, WebViewUriSource } from 'react-native'; import { IbasePropertyExtend, IbasePlusProp } from '../aim/face' interface State { htmlContent: string } interface Prop extends IbasePropertyExtend, IbasePlusProp { style: any } /** * Hello */ export default class extends Component{ constructor(props: Prop) { super(props); /* if (this.props.plusHtmlSource != undefined) { let htmlSource = this.props.plusHtmlSource(); BaseIo.readFile(htmlSource.scriptFile).then((data) => { let sHtml = `` + htmlSource.bodyContent + `` ; this.setState({ htmlContent: sHtml }); }); } this.state = { htmlContent: '' } */ this.state = { htmlContent: '' } } componentDidMount() { let htmlSource = this.props.plusHtmlSource(); let sHtml = `` +(htmlSource.headerText?htmlSource.headerText:'')+ ` ` + htmlSource.bodyContent + `` ; this.setState({ htmlContent: sHtml }); } render() { return ( ); } }