|
@@ -7,9 +7,11 @@
|
|
|
<span class="unit">有物联网(栋)</span>
|
|
|
<span class="is_notice">占比%</span>
|
|
|
</div>
|
|
|
- <VueSeamlessScroll :class-option="classOption" :data="dataList" class="warp">
|
|
|
+ <VueSeamlessScroll v-if="reload" :class-option="classOption" :data="dataList" class="warp">
|
|
|
<ul class="item">
|
|
|
- <li class="row" v-for="(item, index) in dataList" :key="index">
|
|
|
+ <li class="row" :class="{
|
|
|
+ active: item.isActive
|
|
|
+ }" v-for="(item, index) in dataList" :key="index">
|
|
|
<span class="type">{{ index + 1 }}</span>
|
|
|
<span class="count">{{ item.qx }}</span>
|
|
|
<span class="time">{{ item.zs }}</span>
|
|
@@ -31,18 +33,25 @@ export default {
|
|
|
props: {
|
|
|
list: {
|
|
|
type: Array,
|
|
|
- default: [],
|
|
|
+ default: () => [],
|
|
|
},
|
|
|
+ qx: String
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- dataList: []
|
|
|
+ dataList: [],
|
|
|
+ reload: true
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
list: {
|
|
|
handler(val) {
|
|
|
+ this.reload = false
|
|
|
this.dataList = val
|
|
|
+ let timer = setTimeout(() => {
|
|
|
+ this.reload = true
|
|
|
+ timer && clearTimeout(timer)
|
|
|
+ }, 500);
|
|
|
},immediate: true,
|
|
|
deep: true
|
|
|
}
|
|
@@ -51,6 +60,7 @@ export default {
|
|
|
classOption() {
|
|
|
return {
|
|
|
singleHeight: 51,
|
|
|
+ autoPlay: this.qx === '重庆市'
|
|
|
};
|
|
|
},
|
|
|
},
|
|
@@ -82,7 +92,9 @@ export default {
|
|
|
font-size: 10px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+li.row.active {
|
|
|
+ background-color: rgba(0, 213, 255, 0.2);
|
|
|
+}
|
|
|
li.row > span {
|
|
|
text-align: center;
|
|
|
font-size: 14x;
|