|
|
@ -82,6 +82,7 @@ |
|
|
}" |
|
|
}" |
|
|
> |
|
|
> |
|
|
<span class="current">{{ price1(activeContract.price) }}$</span> |
|
|
<span class="current">{{ price1(activeContract.price) }}$</span> |
|
|
|
|
|
<!-- <span class="current">{{ activeContract.price }}$</span> --> |
|
|
|
|
|
|
|
|
<span class="zf">{{ activeContract.increaseStr }}</span> |
|
|
<span class="zf">{{ activeContract.increaseStr }}</span> |
|
|
</div> |
|
|
</div> |
|
|
@ -271,7 +272,10 @@ export default { |
|
|
}); |
|
|
}); |
|
|
// console.info(this.$refs) |
|
|
// console.info(this.$refs) |
|
|
bus.$on('collapse', msg => { |
|
|
bus.$on('collapse', msg => { |
|
|
this.activeContract.price =this.activeContract.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); |
|
|
// 将数字转换为字符串 |
|
|
|
|
|
const closeStr = msg.close.toString(); |
|
|
|
|
|
// this.activeContract.price =this.activeContract.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); |
|
|
|
|
|
this.activeContract.price = this.activeContract.symbol === 'BTC' ? closeStr.slice(0, closeStr.indexOf('.') + 2) : closeStr.slice(0, closeStr.indexOf('.') + 4); |
|
|
this.holdPositionList.map(item=>{ |
|
|
this.holdPositionList.map(item=>{ |
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
}) |
|
|
}) |
|
|
|