我是根据百度直接在删除中判断
//请求删除
async function requestDelete(){
SmartLoading.show();
try {
console.log(currentRow.value)
if(currentRow.value == undefined){
message.error('请选择右边行')
return
}else{
await casePicApi.delete(currentRow.value.id);
message.success('删除成功');
currentRow.value = undefined
** let lastPage = Math.ceil(
total.value / queryFormState.value.pageSize //总数除以每页记录数
);
if (queryFormState.value.pageNum === lastPage && total.value % queryFormState.value.pageSize === 1)
{
queryFormState.pageNum--; //页码-1
** }****
queryData()
}
} catch (e) {
smartSentry.captureError(e);
} finally {
SmartLoading.hide();
}
}
queryFormState.value.pageNum--; //