fixed RN 0.64
This commit is contained in:
parent
0ae9a6386c
commit
308a0b9c3d
|
|
@ -1,7 +1,9 @@
|
|||
import React, { Component } from 'react';
|
||||
import { WebView, View, StyleSheet, Platform } from 'react-native';
|
||||
import { View, StyleSheet, Platform } from 'react-native';
|
||||
import renderChart from './renderChart';
|
||||
import echarts from './echarts.min';
|
||||
import WebView from "react-native-webview";
|
||||
import getTpl from "./tpl" ;
|
||||
|
||||
export default class App extends Component {
|
||||
|
||||
|
|
@ -34,7 +36,7 @@ export default class App extends Component {
|
|||
}}
|
||||
scalesPageToFit={Platform.OS !== 'ios'}
|
||||
originWhitelist={['*']}
|
||||
source={require('./tpl.html')}
|
||||
source={{ html:getTpl() }}
|
||||
onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null}
|
||||
/>
|
||||
</View>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,28 @@
|
|||
export default ()=>`<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
|
||||
<title>echarts</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<style type="text/css">
|
||||
html,body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
// overflow: hidden;
|
||||
|
||||
}
|
||||
#main {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.bootcss.com/echarts/4.2.1/echarts.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main" ></div>
|
||||
<body>
|
||||
<html>
|
||||
` ;
|
||||
Loading…
Reference in New Issue