调整删除错误

This commit is contained in:
huangdeliang
2021-03-02 19:22:26 +08:00
parent 14f7113765
commit 297a97db9e
3 changed files with 11 additions and 5 deletions

View File

@ -99,9 +99,7 @@ export default {
if (idx === 0) {
this.selDishes.type = cur;
}
const tarOpt = this.typeOptions.find(
(obj) => obj.dictValue === cur
);
const tarOpt = this.typeOptions.find((obj) => obj.dictValue === cur);
if (tarOpt) {
arr.push(tarOpt);
}
@ -134,7 +132,7 @@ export default {
igdList,
} = this.selDishes;
this.$emit("onConfirm", {
id: -1,
id: new Date().getTime(),
dishesId: id,
methods,
name,

View File

@ -350,6 +350,8 @@ export default {
this.addDishes({
num: this.num,
data,
}).catch((err) => {
this.$message.error(err.message);
});
},
...mapActions(["updateDishes", "addDishes", "deleteDishes"]),