Browse Source

添加侧滑栏自动隐藏效果

slambb 4 năm trước cách đây
mục cha
commit
40ec84b1f3
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      platform/app-plus/subNVue/drawer.nvue

+ 3 - 1
platform/app-plus/subNVue/drawer.nvue

@@ -87,6 +87,7 @@
 			},
 			// 跳转编辑信息页面
 			onNavEditInfoPage() {
+				this.hideDrawer();
 				uni.navigateTo({
 					url: '../../my-page/userInfo/userInfo',
 					success: res => {},
@@ -96,6 +97,7 @@
 			},
 			//侧边栏对应页面跳转
 			onNavListItem(pageType) {
+				this.hideDrawer();
 				// console.log(pageType);
 				if (pageType == "my") {
 					this.onNavMyPage();
@@ -103,7 +105,6 @@
 				}
 				if(pageType == "signBoard")
 				{	
-					this.hideDrawer();
 					this.showPopupById({type:'signIn',item:null});
 					return;
 				}
@@ -136,6 +137,7 @@
 			 */
 			onExit() {
 				console.log("退出登录");
+				this.hideDrawer();
 				// 清除token,退回首页
 				this.delectToken({
 					success: (res) => {