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); });