修复删除带来的列表页面数据为空未自动减少页码请求问题
This commit is contained in:
@@ -257,7 +257,7 @@
|
||||
<uni-easyinput :paddingNone="inputPaddingNone"
|
||||
@blur="priceFormat(sku,'firstShared')" :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="sku.firstShared" type="digit"
|
||||
placeholder="请输入起售数量" />
|
||||
placeholder="请输入分销金额" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="商品条码">
|
||||
<uni-easyinput disabled :paddingNone="inputPaddingNone"
|
||||
@@ -857,8 +857,9 @@
|
||||
title: '删除成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.$emit('del:productIndex',option.productId)
|
||||
go.back()
|
||||
}, 1000)
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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