From fffba0cb13236ee09aa6c63c3a27dcb71e994aad Mon Sep 17 00:00:00 2001 From: hwj Date: Fri, 6 Feb 2026 16:31:34 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E9=85=8D=E6=96=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE-=E8=AF=A6=E6=83=85=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=8F=82=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formulaConfig/components/RecipeDetailList.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/views/formula/formulaConfig/components/RecipeDetailList.vue b/src/views/formula/formulaConfig/components/RecipeDetailList.vue index 9d073d32..57512efd 100644 --- a/src/views/formula/formulaConfig/components/RecipeDetailList.vue +++ b/src/views/formula/formulaConfig/components/RecipeDetailList.vue @@ -323,10 +323,16 @@ const getList = async () => { pageSize, recipeId: props.recipeId }) - list.value = (data ?? []).map(normalizeDetail) - total.value = data.total - // 产品单位 - unitList.value = await ProductUnitApi.getProductUnitSimpleList() + const rawList = Array.isArray((data as any)?.list) + ? (data as any).list + : Array.isArray((data as any)?.data) + ? (data as any).data + : Array.isArray(data) + ? data + : [] + list.value = rawList.map(normalizeDetail) + total.value = (data as any)?.total ?? rawList.length + unitList.value = await ProductUnitApi.getProductUnitSimpleList() } finally { loading.value = false }