1.根目錄下找到目錄node_modules\native-echarts\src\components\Echarts
将tpl.html檔案copy到根目錄下的android\app\src\main\assets下
2.修改node_modules\native-echarts\src\components\Echarts目錄下的index.js檔案(加粗部分)
render() {
return (
<View style={{flex: 1, height: this.props.height || 400,}}>
<WebView
ref="chart"
scrollEnabled = {false}
injectedJavaScript = {renderChart(this.props)}
style={{
height: this.props.height || 400,
}}
source={{uri:'file:///android_asset/tpl.html'}}
/>
</View>
);
}