This commit is contained in:
X1627315083
2023-12-19 16:36:48 +08:00
parent c50c6e76f9
commit 904b9856fd
18 changed files with 103 additions and 40 deletions

View File

@@ -65,7 +65,7 @@
<a-checkbox v-model:checked="item.pin">{{ $t('Material.PIN') }}</a-checkbox>
</div>
</div>
<div v-show="total > imgList?.length" class="material_content_list_loding" v-observe>
<div v-show="total > imgList?.length && total != 0" class="material_content_list_loding" v-observe>
<img src="@/assets/images/homePage/loading.gif" alt="">
</div>
</div>
@@ -95,6 +95,7 @@ export default defineComponent({
let selectCode:any = ref('')
let currentPage:any = ref(1)
let searchPictureName = ref('')
let isOldSearchPictureName = ref('')
let pageSize = ref(12)
let total = ref(0)
let searcMaterialhName:any = ref('') //搜索名字
@@ -112,6 +113,7 @@ export default defineComponent({
selectCode,
currentPage,
searchPictureName,
isOldSearchPictureName,
pageSize,
total,
searcMaterialhName,
@@ -287,6 +289,7 @@ export default defineComponent({
this.isShowLoading = true
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
(rv: any) => {
this.total = rv.total
let aa:any = []
rv.content.forEach((item:any,index:any) => {
let arr
@@ -315,13 +318,16 @@ export default defineComponent({
}
aa.push(item)
});
if(aa[aa.length-1].id == this.imgList[this.imgList.length-1]?.id){
if(this.searchPictureName != this.isOldSearchPictureName){
this.imgList = []
}else{
}
this.isOldSearchPictureName = this.searchPictureName
if((aa[aa.length-1].id == this.imgList[this.imgList.length-1]?.id) && aa?.[aa.length-1]?.id){
}else{
this.imgList.push(...aa)
}
// this.imgList = aa
this.total = rv.total
this.isShowLoading = false
}
).catch((res)=>{