|
@@ -213,7 +213,14 @@ export default {
|
|
|
ok: () => {
|
|
ok: () => {
|
|
|
delMaterial(item.id, () => {
|
|
delMaterial(item.id, () => {
|
|
|
this.$msg.success("删除成功");
|
|
this.$msg.success("删除成功");
|
|
|
- this.getMaterialList();
|
|
|
|
|
|
|
+ const index = this.list.findIndex((eachItem) => {
|
|
|
|
|
+ return eachItem.id === item.id
|
|
|
|
|
+ })
|
|
|
|
|
+ if (index >= 0) {
|
|
|
|
|
+ this.list.splice(index, 1)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.error('在素材列表里没找到要删除的那一项!');
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|