Commit 9f85bf27 authored by 徐一鸣's avatar 徐一鸣

部署排名分析和评价轮播组件优化

parent 79fb25c9
...@@ -45,11 +45,14 @@ export default { ...@@ -45,11 +45,14 @@ export default {
this.$el.scrollTop = 0; this.$el.scrollTop = 0;
this.timer = setInterval(() => { this.timer = setInterval(() => {
let curScrollTop = this.$el.scrollTop + 50; let itemHeight = 77;
if (curScrollTop > this.$el.scrollHeight - this.$el.clientHeight) { let curScrollTop = this.$el.scrollTop + itemHeight;
if (curScrollTop >= this.$el.scrollHeight - this.$el.clientHeight + itemHeight) {
curScrollTop = 0; curScrollTop = 0;
} }
this.$el.scrollTop = curScrollTop;
this.$el.scrollTop = Math.min(curScrollTop, this.$el.scrollHeight - this.$el.clientHeight);
}, 1500); }, 1500);
}, },
mouseenter() { mouseenter() {
......
...@@ -73,11 +73,14 @@ export default { ...@@ -73,11 +73,14 @@ export default {
this.$el.scrollTop = 0; this.$el.scrollTop = 0;
this.timer = setInterval(() => { this.timer = setInterval(() => {
let curScrollTop = this.$el.scrollTop + 50; let itemHeight = 50;
if (curScrollTop > this.$el.scrollHeight - this.$el.clientHeight) { let curScrollTop = this.$el.scrollTop + itemHeight;
if (curScrollTop >= this.$el.scrollHeight - this.$el.clientHeight + itemHeight) {
curScrollTop = 0; curScrollTop = 0;
} }
this.$el.scrollTop = curScrollTop;
this.$el.scrollTop = Math.min(curScrollTop, this.$el.scrollHeight - this.$el.clientHeight);
}, 1500); }, 1500);
}, },
mouseenter() { mouseenter() {
...@@ -161,7 +164,7 @@ export default { ...@@ -161,7 +164,7 @@ export default {
flex-grow: 1; flex-grow: 1;
} }
.item_info > span:first-child { .item_info > span:first-child {
width: 200px; width: 100px;
flex-grow: 1; flex-grow: 1;
margin-right: 10px; margin-right: 10px;
} }
...@@ -171,6 +174,8 @@ export default { ...@@ -171,6 +174,8 @@ export default {
color: #8e96ab; color: #8e96ab;
} }
.item_info > span:nth-child(2) { .item_info > span:nth-child(2) {
flex-shrink: 0;
white-space: nowrap;
color: #0d1847; color: #0d1847;
} }
.item_progress { .item_progress {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment