|
|
|
@ -199,7 +199,7 @@ export class DishFormComponent { |
|
|
|
this.foodItemSelected = this.foodItemSelected.filter((item) => v.includes(item.value)) |
|
|
|
|
|
|
|
// 添加新的选择项
|
|
|
|
const newSelectedItems = this.searchedFood.filter( |
|
|
|
const newSelectedItems = this.foodListOfOption.filter( |
|
|
|
(item) => v.includes(item.value) && !this.foodItemSelected.some((s) => s.value === item.value), |
|
|
|
) |
|
|
|
this.foodItemSelected = [...this.foodItemSelected, ...newSelectedItems] |
|
|
|
|