From 69eee356192be151c673ad99d7a0d8af313cbc91 Mon Sep 17 00:00:00 2001 From: "Yuki.lan" Date: Wed, 11 Jul 2018 15:24:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAndroid=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=89=93=E5=8C=85=E7=9A=84=E9=97=AE=E9=A2=98(For=20Version=204?= =?UTF-8?q?.0~4.0.4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Echarts/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Echarts/index.js b/src/components/Echarts/index.js index 4c557d2..b5feea7 100644 --- a/src/components/Echarts/index.js +++ b/src/components/Echarts/index.js @@ -33,7 +33,7 @@ export default class App extends Component { backgroundColor: this.props.backgroundColor || 'transparent' }} scalesPageToFit={Platform.OS !== 'ios'} - source={require('./tpl.html')} + source={{uri:'file:///android_asset/tpl.html'}} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} /> From adec91b63894194016e1022380eca5bb312393d4 Mon Sep 17 00:00:00 2001 From: "Yuki.lan" Date: Wed, 25 Jul 2018 10:23:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAndroid=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=89=93=E5=8C=85=E7=9A=84=E9=97=AE=E9=A2=98(For=20Version=204?= =?UTF-8?q?.0~4.0.4)update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Echarts/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Echarts/index.js b/src/components/Echarts/index.js index b5feea7..b817d34 100644 --- a/src/components/Echarts/index.js +++ b/src/components/Echarts/index.js @@ -33,7 +33,7 @@ export default class App extends Component { backgroundColor: this.props.backgroundColor || 'transparent' }} scalesPageToFit={Platform.OS !== 'ios'} - source={{uri:'file:///android_asset/tpl.html'}} + source={Platform.OS === 'ios' ? require('./tpl.html') : {uri:'file:///android_asset/tpl.html'}} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} />