Skip to content

Commit 129540c

Browse files
committed
fix: h5 mp-baidu echarts
1 parent a46585f commit 129540c

3 files changed

Lines changed: 22 additions & 12 deletions

File tree

‎pages.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,13 +531,15 @@
531531
"navigationBarTitleText": "图片裁剪"
532532
}
533533
},
534-
// #ifdef APP-PLUS || MP-WEIXIN
534+
// #ifndef MP-ALIPAY
535535
{
536536
"path": "echarts/echarts",
537537
"style": {
538538
"navigationBarTitleText": "ECharts图表"
539539
}
540540
},
541+
// #endif
542+
// #ifdef APP-PLUS || MP-WEIXIN
541543
{
542544
"path": "gesture-lock/gesture-lock",
543545
"style": {

‎pages/tabBar/template/template.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,13 @@
154154
name: '标签 tag',
155155
url: 'tag'
156156
},
157-
// #ifdef APP-PLUS || MP-WEIXIN
157+
// #ifndef MP-ALIPAY
158158
{
159159
name: 'ECharts 图表',
160160
url: 'echarts'
161161
},
162+
// #endif
163+
// #ifdef APP-PLUS || MP-WEIXIN
162164
{
163165
name: '手势图案锁屏',
164166
url: 'gesture-lock'

‎pages/template/echarts/echarts.vue‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@
2424
import * as echarts from '../../../components/echarts/echarts.simple.min.js';
2525
import mpvueEcharts from '../../../components/mpvue-echarts/src/echarts.vue';
2626
27+
const cityList = [{
28+
value: 55,
29+
name: '北京'
30+
}, {
31+
value: 38,
32+
name: '上海'
33+
}, {
34+
value: 20,
35+
name: '广州'
36+
}];
37+
2738
let pieOption = {
2839
animation: false,
2940
backgroundColor: '#F8F8F8',
@@ -37,16 +48,7 @@
3748
type: 'pie',
3849
center: ['50%', '50%'],
3950
radius: [0, '60%'],
40-
data: [{
41-
value: 55,
42-
name: '北京'
43-
}, {
44-
value: 38,
45-
name: '上海'
46-
}, {
47-
value: 20,
48-
name: '广州'
49-
}],
51+
data: [],
5052
itemStyle: {
5153
emphasis: {
5254
shadowBlur: 10,
@@ -95,6 +97,9 @@
9597
updateStatus: false
9698
}
9799
},
100+
onLoad() {
101+
pieOption.series[0].data = cityList.slice(0);
102+
},
98103
methods: {
99104
goBrowser() {
100105
// #ifdef APP-PLUS
@@ -162,6 +167,7 @@
162167
page {
163168
min-height: 100%;
164169
}
170+
165171
.page-section-title {
166172
padding: 0 30upx;
167173
}

0 commit comments

Comments
 (0)