Skip to content

Commit

Permalink
修复ad.vue中,点击编辑修改图片后马上点击编辑按钮导致无限渲染卡死页面的问题。在dev模式下不易发现仅有报错,部署到线上后可复现 (#543
Browse files Browse the repository at this point in the history
)
  • Loading branch information
White-Mo authored Jun 16, 2024
1 parent 47ea5c7 commit 92ffc39
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions litemall-admin/src/views/promotion/ad.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,14 @@ export default {
if (valid) {
updateAd(this.dataForm)
.then(() => {
for (const v of this.list) {
if (v.id === this.dataForm.id) {
const index = this.list.indexOf(v)
this.list.splice(index, 1, this.dataForm)
break
}
}
// for (const v of this.list) {
// if (v.id === this.dataForm.id) {
// const index = this.list.indexOf(v)
// this.list.splice(index, 1, this.dataForm)
// break
// }
// }
this.getList()
this.dialogFormVisible = false
this.$notify.success({
title: '成功',
Expand Down

0 comments on commit 92ffc39

Please sign in to comment.