From aaa1b436c6167d1fa1e5e7f963a0e964e9506ce2 Mon Sep 17 00:00:00 2001 From: kely Date: Tue, 3 Feb 2026 16:25:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(ingredient):=20=E6=9B=B4=E6=96=B0=E6=88=90?= =?UTF-8?q?=E5=88=86=E8=A1=A8=E5=8D=95=E5=9F=BA=E7=A1=80=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改了currentPeoples的数据映射方式,从使用Object.entries转换为直接遍历crows数组 - 添加了类型声明并重构了数据结构处理流程 - 增加了console.log用于调试当前标准和人员信息 --- .../ingredient-form-basic/ingredient-form-basic.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts b/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts index a1827cb..db317d8 100644 --- a/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts +++ b/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts @@ -168,7 +168,9 @@ export class IngredientFormBasicComponent implements OnChanges { vendors: [], }) if (currentStandard) { - this.currentPeoples = Object.entries(currentStandard['ingredient'] ?? {}).map(([k, v]) => { + this.currentPeoples = currentStandard['crows'].map((people: string) => { + const k = people + const v = currentStandard['ingredient']?.[k] return { label: k, value: k, @@ -176,6 +178,7 @@ export class IngredientFormBasicComponent implements OnChanges { ...(v as any), } }) + console.log('currentStandard', this.currentPeoples, currentStandard, this.menu?.crows) if (this.client) { return }