Skip to content

Commit ec8c475

Browse files
committed
Add webview test
1 parent ac18785 commit ec8c475

File tree

4 files changed

+63
-1
lines changed

4 files changed

+63
-1
lines changed

Example/testHotUpdate/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ android {
156156
signingConfig signingConfigs.debug
157157
}
158158
release {
159+
crunchPngs false
159160
// Caution! In production, you need to generate your own keystore file.
160161
// see https://reactnative.dev/docs/signed-apk-android.
161162
signingConfig signingConfigs.debug

Example/testHotUpdate/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
TouchableOpacity,
99
Linking,
1010
Image,
11-
NativeModules,
1211
} from 'react-native';
1312

1413
import {
@@ -163,6 +162,7 @@ export default class App extends Component {
163162
<TouchableOpacity onPress={this.checkUpdate}>
164163
<Text style={styles.instructions}>点击这里检查更新</Text>
165164
</TouchableOpacity>
165+
{/* <WebView style={{flex:1}} source={{uri: require('../www/index.html')}}/> */}
166166
</View>
167167
);
168168
}

Example/testHotUpdate/src/www/echarts.min.js

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<!-- 引入 ECharts 文件 -->
6+
<script src="echarts.min.js"></script>
7+
</head>
8+
<body>
9+
<!-- 为 ECharts 准备一个具备大小(宽高)的 DOM -->
10+
<div id="main" style="width: 600px;height:400px;"></div>
11+
<script type="text/javascript">
12+
// 基于准备好的dom,初始化echarts实例
13+
var myChart = echarts.init(document.getElementById('main'));
14+
15+
// 指定图表的配置项和数据
16+
var option = {
17+
title: {
18+
text: 'ECharts 入门示例'
19+
},
20+
tooltip: {},
21+
legend: {
22+
data:['销量']
23+
},
24+
xAxis: {
25+
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
26+
},
27+
yAxis: {},
28+
series: [{
29+
name: '销量',
30+
type: 'bar',
31+
data: [5, 20, 36, 10, 10, 20]
32+
}]
33+
};
34+
35+
// 使用刚指定的配置项和数据显示图表。
36+
myChart.setOption(option);
37+
</script>
38+
</body>
39+
</html>

0 commit comments

Comments
 (0)