From c1c91727de7832d8e115cd09209c0c18d7de8230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Mon, 13 Dec 2021 11:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8F=9C=E5=8D=95=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=BB=93=E6=9E=84child=E6=94=B9=E4=B8=BAchildren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/subnav/main.js | 10 +++++----- src/pages/login/loginform.js | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/subnav/main.js b/src/components/subnav/main.js index af3b0784..26d64a48 100644 --- a/src/components/subnav/main.js +++ b/src/components/subnav/main.js @@ -21,7 +21,7 @@ export default class topNav extends React.Component{ showlinkmenu(e,item){ let self=this; try{ - item.child.forEach(item=>{ + item.children.forEach(item=>{ if(item.level ===5){ sessionStorage.setItem('pathname2',item.router); throw '终止循环' @@ -30,11 +30,11 @@ export default class topNav extends React.Component{ }catch(e){ } self.setState({'linkshowname':item.title}); - self.setState({'menulinklist':item.child}); + self.setState({'menulinklist':item.children}); // 防止刷新页面,导航签清空 - sessionStorage.setItem('menulinklist',JSON.stringify(item.child)); + sessionStorage.setItem('menulinklist',JSON.stringify(item.children)); sessionStorage.setItem('showflag',true); sessionStorage.setItem('linkshowname',item.title); } @@ -80,7 +80,7 @@ export default class topNav extends React.Component{ { this.state.navlists.map((item,i)=>{ return ( - item.child&&item.child.length>0?this.showlinkmenu(e,item)} >{item.title}:null + item.children&&item.children.length>0?this.showlinkmenu(e,item)} >{item.title}:null ) }) @@ -95,7 +95,7 @@ export default class topNav extends React.Component{