Commit 48a9af4a authored by yaya's avatar yaya

feat:去除删除强提醒

parent 08f0075d
...@@ -392,30 +392,24 @@ export default { ...@@ -392,30 +392,24 @@ export default {
}, },
// 删除 // 删除
handleDelete() { handleDelete() {
this.$confirm('删除后不可恢复!', '是否要删除该藏品?', { const params = {
confirmButtonText: '删除', id: this.goodsParams.id
cancelButtonText: '取消', }
type: 'warning' deleteGood(params).then(response => {
}).then(() => { this.$message.success('删除成功')
const params = { console.log('===原来=list ===', this.goodIdList)
id: this.goodsParams.id this.goodIdList = this.goodIdList.filter((item) => {
} if (item !== this.goodsParams.id) {
deleteGood(params).then(response => { return item
this.$message.success('删除成功') }
console.log('===原来=list ===', this.goodIdList) })
this.goodIdList = this.goodIdList.filter((item) => { this.currentIndex -= 1
if (item !== this.goodsParams.id) { this.handleNext()
return item console.log('===现在=list ===', this.goodIdList)
} }).catch(response => {
}) this.$notify.error({
this.currentIndex -= 1 title: '失败',
this.handleNext() message: response.data.errmsg || '请求失败'
console.log('===现在=list ===', this.goodIdList)
}).catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg || '请求失败'
})
}) })
}) })
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment