mirror of https://github.com/halo-dev/halo
Add loading for attachment list.
parent
b6b3e3c58c
commit
af8262f616
|
@ -80,6 +80,7 @@
|
||||||
<a-list
|
<a-list
|
||||||
:grid="{ gutter: 12, xs: 1, sm: 2, md: 4, lg: 6, xl: 6, xxl: 6 }"
|
:grid="{ gutter: 12, xs: 1, sm: 2, md: 4, lg: 6, xl: 6, xxl: 6 }"
|
||||||
:dataSource="formattedDatas"
|
:dataSource="formattedDatas"
|
||||||
|
:loading="listLoading"
|
||||||
>
|
>
|
||||||
<a-list-item
|
<a-list-item
|
||||||
slot="renderItem"
|
slot="renderItem"
|
||||||
|
@ -161,6 +162,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
attachmentType: attachmentApi.type,
|
attachmentType: attachmentApi.type,
|
||||||
|
listLoading: true,
|
||||||
uploadVisible: false,
|
uploadVisible: false,
|
||||||
selectAttachment: {},
|
selectAttachment: {},
|
||||||
attachments: [],
|
attachments: [],
|
||||||
|
@ -203,9 +205,11 @@ export default {
|
||||||
if (isSearch) {
|
if (isSearch) {
|
||||||
this.queryParam.page = 0
|
this.queryParam.page = 0
|
||||||
}
|
}
|
||||||
|
this.listLoading = true
|
||||||
attachmentApi.query(this.queryParam).then(response => {
|
attachmentApi.query(this.queryParam).then(response => {
|
||||||
this.attachments = response.data.data.content
|
this.attachments = response.data.data.content
|
||||||
this.pagination.total = response.data.data.total
|
this.pagination.total = response.data.data.total
|
||||||
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadMediaTypes() {
|
loadMediaTypes() {
|
||||||
|
|
Loading…
Reference in New Issue