update 优化空状态

This commit is contained in:
2021-04-30 14:28:56 +08:00
parent 1b4b2e47af
commit 57c8782a18
4 changed files with 22 additions and 3 deletions

View File

@@ -114,6 +114,7 @@ export default {
this.data = this.onClearChildren(res)
this.pagination = false
}
}).finally(() => {
this.onLoaded()
})
},

View File

@@ -1,4 +1,5 @@
import Swiper from 'swiper'
import { Empty } from 'ant-design-vue'
let timer, swiper
@@ -107,7 +108,7 @@ export default {
this.$nextTick(() => {
this.onUpdateSwiper()
})
}).finally(() => {
this.loading = false
})
},
@@ -256,7 +257,17 @@ export default {
<div class="swiper-slide">
<a-spin style={{ height: '100%' }} spinning={this.loading}>
<a-icon slot="indicator" type="loading" spin />
<a-tree {...{ props, on, scopedSlots }} />
{
!this.loading && !this.list.length ?
<a-empty description={false} class="ant-list-empty-text">
<template slot="image">
<a-icon class="h3 mt-xl mb-md" type="smile" />
<p>暂无数据</p>
</template>
</a-empty>
:
<a-tree {...{ props, on, scopedSlots }} />
}
</a-spin>
</div>
</div>