From 893140f2b43226dd13c266b945b16b6536859d69 Mon Sep 17 00:00:00 2001 From: xuyiming Date: Thu, 2 Jul 2020 16:56:17 +0800 Subject: [PATCH] =?UTF-8?q?toplist=E7=BB=84=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/e-charts/starlist.vue | 0 src/components/e-charts/toplist.vue | 6 ++---- 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 src/components/e-charts/starlist.vue diff --git a/src/components/e-charts/starlist.vue b/src/components/e-charts/starlist.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/components/e-charts/toplist.vue b/src/components/e-charts/toplist.vue index ba77409..d3a27c0 100644 --- a/src/components/e-charts/toplist.vue +++ b/src/components/e-charts/toplist.vue @@ -78,7 +78,7 @@ export default { }, methods: { getBarWidth(value) { - return (value / this.targetValue) * 100 + "%"; + return Math.min((value / this.targetValue) * 100, 100) + "%"; }, }, }; @@ -94,9 +94,7 @@ export default { display: flex; justify-content: flex-start; align-items: center; -} -.item_list:not(:first-child) { - margin-top: 18px; + margin-bottom: 18px; } .item_index { width: 35px; -- 2.26.0