From 26fe154b272b44d0bea206df07ca2d56340f83f4 Mon Sep 17 00:00:00 2001 From: jinna Date: Wed, 10 Jan 2024 11:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A6=E4=BE=A7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=8F=E5=B1=95=E5=BC=80=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/index/sidebar/index.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/page/index/sidebar/index.vue b/src/page/index/sidebar/index.vue index 1caa4cd..0fb09be 100644 --- a/src/page/index/sidebar/index.vue +++ b/src/page/index/sidebar/index.vue @@ -39,9 +39,20 @@ console.log(this.tag) if(this.tag.label == '首页') { setTimeout(() =>{ - this.menu.map((item,index) =>{ - this.menuArr.push(item.path) - }) + console.log('menu ====>',this.menu) + this.menuArr = [] + if(this.menu.length > 3){ + this.menu.map((item,index) =>{ + if(index <= 3){ + this.menuArr.push(item.path) + } + }) + }else{ + this.menu.map((item,index) =>{ + this.menuArr.push(item.path) + }) + } + },300) } this.index.openMenu();