diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 15b71de..a59d0de 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -345,7 +345,7 @@ export default { //右边统计数据 list.forEach((item) => { let index = this.staList.findIndex((t) => t.val == item.name); - if (index) { + if (index>-1) { this.staList[index].count = item.count; } });