|
|
|
@ -20,7 +20,8 @@ |
|
|
|
decreace2: activeContract.increase < 0, |
|
|
|
increase: activeContract.increase >= 0 |
|
|
|
}"> |
|
|
|
{{ activeContract.price }} |
|
|
|
<!-- {{ activeContract.price }} --> |
|
|
|
{{price1}} |
|
|
|
</div> |
|
|
|
<!-- <div class="title mb-1 text-secondary"> |
|
|
|
{{ $t("contract.h6") }} |
|
|
|
@ -101,7 +102,7 @@ |
|
|
|
</td> |
|
|
|
<td class="w-7/24 text-right" > |
|
|
|
<!-- :class="item.increase < 0 ? 'decreace' : 'increase'" --> |
|
|
|
{{ item.close }} |
|
|
|
{{item.symbol == activeSymbol ? price1 : item.price}} |
|
|
|
</td> |
|
|
|
<td |
|
|
|
class="w-8/24 text-right" |
|
|
|
@ -244,7 +245,9 @@ export default { |
|
|
|
currentIcon: '', |
|
|
|
filterCoin: "", |
|
|
|
contractListFilter: [], |
|
|
|
Liste:[] |
|
|
|
Liste:[], |
|
|
|
price1:0, |
|
|
|
intervalId:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -314,8 +317,7 @@ export default { |
|
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.startWatchingPrice(); |
|
|
|
}, |
|
|
|
//三秒更新一次数据 |
|
|
|
mounted: function () { |
|
|
|
@ -324,6 +326,12 @@ export default { |
|
|
|
}, 2000) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
startWatchingPrice(){ |
|
|
|
this.intervalId = setInterval(() => { |
|
|
|
let newPrice = localStorage.getItem('price'); |
|
|
|
this.price1 = newPrice; |
|
|
|
}, 10); // 每秒检查一次 |
|
|
|
}, |
|
|
|
ispopover1(item){ |
|
|
|
this.activeSymbol=item; |
|
|
|
// this.$refs.popover.showPopper = false; |
|
|
|
|