forked from cerc-io/cosmos-explorer
optimize
This commit is contained in:
parent
1e1d9f6252
commit
6dff9d318a
@ -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"
|
||||||
> </div>
|
> </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 })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user