From 17b7c04f6db4d8c5c03e60e18abe332065c9526f Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Fri, 5 Mar 2021 16:30:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/store/modules/recipes.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js index 99baf8769..f6a514d2e 100644 --- a/stdiet-ui/src/store/modules/recipes.js +++ b/stdiet-ui/src/store/modules/recipes.js @@ -39,7 +39,10 @@ const mutations = { obj => obj.id === payload.id ); if (tarDishes) { - if (payload.dishesId || payload.type !== undefined) { + if ( + payload.dishesId !== tarDishes.dishesId || + payload.type !== undefined + ) { // 替换菜品 Object.keys(payload).forEach(key => { if (key === "num") {