修复删除带来的列表页面数据为空未自动减少页码请求问题
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
:showChecked="showChecked"
|
||||
:showDetail="pageData.showGoodsDetail"></my-category>
|
||||
</view>
|
||||
<view class="u-m-t-44">
|
||||
<my-pagination :size="pageData.query.size" :totalElements="pageData.totalElements" @change="pageChange"></my-pagination>
|
||||
<view class="u-m-t-44" v-if="pageData.list.length>0">
|
||||
<my-pagination :page="pageData.query.page+1" :size="pageData.query.size" :totalElements="pageData.totalElements" @change="pageChange"></my-pagination>
|
||||
<view style="height: 200rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
showGoodsDetail:false,
|
||||
query:{
|
||||
page: 1,
|
||||
page: 0,
|
||||
size:10
|
||||
},
|
||||
totalElements:0,
|
||||
@@ -302,6 +302,9 @@
|
||||
const islast=pageData.list.length===1
|
||||
$productCategory.del([pageData.list[index].id]).then(res=>{
|
||||
infoBox.showToast('删除成功')
|
||||
if(islast&&pageData.query.page>=1){
|
||||
pageData.query.page-=1
|
||||
}
|
||||
// if(islast&&pageData.query.page>=1){
|
||||
// pageData.query.page--
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user