From 04552f3f00d24c7d6a070cec4403354550c9f56e Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 13 Aug 2024 14:22:10 +0800 Subject: [PATCH] =?UTF-8?q?perf(=E4=BA=A7=E5=93=81=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=BC=96=E8=BE=91:=20=E4=BA=A7=E5=93=81=E6=A0=91+=E3=80=90?= =?UTF-8?q?=E5=9F=8E=E5=B8=82=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/products/Detail/ProductsTree.jsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/products/Detail/ProductsTree.jsx b/src/views/products/Detail/ProductsTree.jsx index 132356f..c45b6e2 100644 --- a/src/views/products/Detail/ProductsTree.jsx +++ b/src/views/products/Detail/ProductsTree.jsx @@ -69,21 +69,21 @@ const ProductsTree = ({ onNodeSelect, ...props }) => { children: (agencyProducts[ele.value] || []).map((product) => { const lgc_map = product.lgc_details.reduce((rlgc, clgc) => ({...rlgc, [clgc.lgc]: clgc}), {}); return { - title: product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || '', - // title: `【${product.info.city_name}】` + (product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || ''), + // title: product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || '', + title: `【${product.info.city_name}】` + (product.info.title || lgc_map?.['2']?.title || lgc_map?.['1']?.title || ''), // key: `${ele.value}-${product.info.id}`, key: product.info.id, _raw: product, isLeaf: true, }}), // 增加`城市`层级 - _children: Object.keys(copyAgencyProducts[ele.value] || []).map(city => { - return { - title: city, - key: `${ele.value}-${city}`, - children: copyAgencyProducts[ele.value][city], - }; - }), + // _children: Object.keys(copyAgencyProducts[ele.value] || []).map(city => { + // return { + // title: city, + // key: `${ele.value}-${city}`, + // children: copyAgencyProducts[ele.value][city], + // }; + // }), })); setTreeData(_show); setRawTreeData(_show);