This commit is contained in:
liangping 2021-09-20 10:28:56 +08:00
parent 1e1d9f6252
commit 6dff9d318a

View File

@ -23,12 +23,13 @@
<div <div
v-for="(b,i) in blocks" v-for="(b,i) in blocks"
:key="i" :key="i"
style="width:1.5%; margin:0.5px; border-radius: 3px; display: inline-block;" style="width:1.5%;"
><router-link :to="`./blocks/${b.height}`"> ><router-link :to="`./blocks/${b.height}`">
<div <div
v-b-tooltip.hover.v-second v-b-tooltip.hover.v-second
:title="b.height" :title="b.height"
:class="b.sigs && b.sigs[x.address] ? 'bg-success':'bg-danger'" :class="b.sigs && b.sigs[x.address] ? 'bg-success':'bg-danger'"
class="m-auto"
>&nbsp;</div> >&nbsp;</div>
</router-link> </router-link>
</div> </div>
@ -131,7 +132,7 @@ export default {
const block = this.blocks.find(b => b[1] === res.block.last_commit.height) const block = this.blocks.find(b => b[1] === res.block.last_commit.height)
if (typeof block === 'undefined') { // mei if (typeof block === 'undefined') { // mei
// this.$set(block, 0, typeof sigs !== 'undefined') // this.$set(block, 0, typeof sigs !== 'undefined')
if (this.blocks.length > 50) this.blocks.shift() if (this.blocks.length >= 50) this.blocks.shift()
this.blocks.push({ sigs, height: res.block.last_commit.height }) this.blocks.push({ sigs, height: res.block.last_commit.height })
} }
}) })