修复删除带来的列表页面数据为空未自动减少页码请求问题
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
@isShowChange="isSHowChange" :index="index" :data="item" :showChecked="showChecked"
|
||||
:showDetail="pageData.showGoodsDetail"></my-category>
|
||||
</view>
|
||||
<view class="u-m-t-44">
|
||||
<my-pagination :size="pageData.query.size" :totalElements="pageData.totalElements"
|
||||
<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>
|
||||
@@ -327,6 +327,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