Browse Source

删除示例页面

master
liujiangyong 1 year ago
parent
commit
21b7938ae0
  1. 64
      weapp/package/pie/index.js
  2. 5
      weapp/package/pie/index.json
  3. 4
      weapp/package/pie/index.wxml
  4. 5
      weapp/package/pie/index.wxss
  5. 5
      weapp/pages/overview/overview.js
  6. 6
      weapp/pages/overview/overview.wxml

64
weapp/package/pie/index.js

@ -1,64 +0,0 @@
import * as echarts from '../components/ec-canvas/echarts';
const app = getApp();
function initChart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: 300,
height: 300,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
var option = {
backgroundColor: "#ffffff",
series: [{
label: {
normal: {
fontSize: 14
}
},
type: 'pie',
center: ['50%', '50%'],
radius: ['20%', '40%'],
data: [{
value: 55,
name: '北京'
}, {
value: 20,
name: '武汉'
}, {
value: 10,
name: '杭州'
}, {
value: 20,
name: '广州'
}, {
value: 38,
name: '上海'
}]
}]
};
chart.setOption(option);
return chart;
}
Page({
onShareAppMessage: function (res) {
return {
title: 'ECharts 可以在微信小程序中使用啦!',
path: '/pages/index/index',
success: function () { },
fail: function () { }
}
},
data: {
ec: {
onInit: initChart
}
},
onReady() {
}
});

5
weapp/package/pie/index.json

@ -1,5 +0,0 @@
{
"usingComponents": {
"ec-canvas": "../components/ec-canvas/ec-canvas"
}
}

4
weapp/package/pie/index.wxml

@ -1,4 +0,0 @@
<!--index.wxml-->
<view class="pie">
<ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec }}"></ec-canvas>
</view>

5
weapp/package/pie/index.wxss

@ -1,5 +0,0 @@
/**index.wxss**/
.pie {
width: 300px;
height: 300px;
}

5
weapp/pages/overview/overview.js

@ -26,11 +26,6 @@ Page({
url: '/package/inspectionReport/inspectionReport',
})
},
toPie () {
wx.navigateTo({
url: '/package/pie/index',
})
},
/**
* 生命周期函数--监听页面加载

6
weapp/pages/overview/overview.wxml

@ -19,11 +19,5 @@
巡检报告
</view>
</view>
<view class="box" bindtap="toPie">
<image class="logo" src="/images/report.svg"></image>
<view class="txt">
图表示例
</view>
</view>
</view>
</view>
Loading…
Cancel
Save