Commit b1ddc7eb by chenwq

折线图

1 parent 34eefc91
...@@ -85,6 +85,9 @@ export default { ...@@ -85,6 +85,9 @@ export default {
}, },
methods: { methods: {
resetRankList() {
this.rankList = new Array(5).fill({ label: '-', value: '-' })
},
tooltipFormatter(obj) { tooltipFormatter(obj) {
var currentItem = this.dataList[obj[0].dataIndex] var currentItem = this.dataList[obj[0].dataIndex]
var txt = '' var txt = ''
...@@ -139,7 +142,7 @@ export default { ...@@ -139,7 +142,7 @@ export default {
}, },
getRankList(idx, attrName = 'topList') { getRankList(idx, attrName = 'topList') {
this.$set(this, 'rankList', this.dataList[idx][attrName]) this.dataList[idx][attrName].length ? this.$set(this, 'rankList', this.dataList[idx][attrName]) : this.resetRankList()
}, },
drawLine() { drawLine() {
......
...@@ -43,7 +43,6 @@ export default { ...@@ -43,7 +43,6 @@ export default {
}, },
methods: { methods: {
init(val) { init(val) {
// console.log(val)
this.isEmpty = true this.isEmpty = true
var params = { var params = {
req: { req: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!