修复删除带来的列表页面数据为空未自动减少页码请求问题
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
<my-img-empty tips="未找到相关商品"></my-img-empty>
|
||||
</template>
|
||||
<template v-if="pageData.goodsList.length">
|
||||
<my-pagination :totalElements="pageData.totalElements" :size="pageData.query.size"
|
||||
<my-pagination :page="pageData.query.page+1" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
||||
@change="pageChange"></my-pagination>
|
||||
</template>
|
||||
|
||||
@@ -401,9 +401,17 @@
|
||||
|
||||
function watchEmitInit() {
|
||||
uni.$off('update:productIndex')
|
||||
uni.$off('del:productIndex')
|
||||
uni.$on('update:productIndex', (data) => {
|
||||
getGoodsList()
|
||||
})
|
||||
uni.$on('del:productIndex', (productId) => {
|
||||
if(pageData.goodsList.length<=1){
|
||||
pageData.query.page-=1
|
||||
}
|
||||
getGoodsList()
|
||||
})
|
||||
|
||||
}
|
||||
onShow(() => {
|
||||
// getGoodsList()
|
||||
|
||||
Reference in New Issue
Block a user