From 7bcae39c0f1641eeb830244b297640439323099b Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Sat, 6 Mar 2021 18:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B2=98=E8=B4=B4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recipesBuild/RecipesView/RecipesCom/index.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue index 5d6e36296..241bc7d42 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue @@ -33,7 +33,7 @@ 粘贴 @@ -337,7 +337,9 @@ export default { } arr[typePos].typeSpan.rowspan += 1; } - lastNameHit = arr[arr.length - 1].name === cur.name; + lastNameHit = + arr[arr.length - 1].name === cur.name && + arr[arr.length - 1].type === cur.type; if (lastNameHit) { let namePos = arr.length - 1; for (let i = namePos; i >= 0; i--) { @@ -460,12 +462,12 @@ export default { this.$message.error(err); }); }, - handleOnPaste() { + handleOnPaste(type) { // console.log(this.copyData); if (this.copyData) { this.addDishes({ num: this.num, - data: this.copyData, + data: { ...this.copyData, type }, }).catch((err) => { this.$message.error(err); });