add skeleton

This commit is contained in:
liangping 2022-04-12 17:01:23 +08:00
parent 9ff56778ca
commit c9b890f2da

View File

@ -34,6 +34,19 @@
/> />
</b-input-group> </b-input-group>
</b-card> </b-card>
<b-skeleton-wrapper :loading="loading">
<template #loading>
<b-row>
<b-col
v-for="index in 100"
:key="index"
sm="12"
md="4"
>
<b-skeleton width="100%" />
</b-col>
</b-row>
</template>
<b-row> <b-row>
<b-col <b-col
v-for="(x,index) in uptime" v-for="(x,index) in uptime"
@ -89,12 +102,14 @@
</div> </div>
</b-col> </b-col>
</b-row> </b-row>
</b-skeleton-wrapper>
</b-card> </b-card>
</div> </div>
</template> </template>
<script> <script>
import { import {
BSkeleton, BSkeletonWrapper,
BRow, BCol, VBTooltip, BFormInput, BCard, BAlert, BFormCheckbox, BButton, BBadge, BInputGroup, BInputGroupPrepend, BRow, BCol, VBTooltip, BFormInput, BCard, BAlert, BFormCheckbox, BButton, BBadge, BInputGroup, BInputGroupPrepend,
} from 'bootstrap-vue' } from 'bootstrap-vue'
@ -114,6 +129,8 @@ export default {
BBadge, BBadge,
BFormCheckbox, BFormCheckbox,
BInputGroup, BInputGroup,
BSkeleton,
BSkeletonWrapper,
BInputGroupPrepend, BInputGroupPrepend,
}, },
directives: { directives: {
@ -123,6 +140,7 @@ export default {
const { chain } = this.$route.params const { chain } = this.$route.params
const pinned = localStorage.getItem('pinned') ? localStorage.getItem('pinned').split(',') : '' const pinned = localStorage.getItem('pinned') ? localStorage.getItem('pinned').split(',') : ''
return { return {
loading: true,
missedFilter: false, missedFilter: false,
pinned, pinned,
chain, chain,
@ -207,6 +225,7 @@ export default {
this.blocks = blocks this.blocks = blocks
this.timer = setInterval(this.fetch_latest, 6000) this.timer = setInterval(this.fetch_latest, 6000)
this.loading = false
}) })
}, },
initColor() { initColor() {