From b15c7062386ba8425bf2c79d560a612c1f54a17a Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 23 Nov 2023 18:09:49 +0800 Subject: [PATCH] 顶部的优化 --- components/com_top_nav/com_top_nav.js | 5 +++-- components/com_top_nav/com_top_nav.wxml | 5 +++-- components/com_top_nav/com_top_nav.wxss | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/com_top_nav/com_top_nav.js b/components/com_top_nav/com_top_nav.js index f7d765e..78030b0 100644 --- a/components/com_top_nav/com_top_nav.js +++ b/components/com_top_nav/com_top_nav.js @@ -15,13 +15,14 @@ Component({ iurl: os.imghost, height:0, h1:0, - h2:0 + h2:0, + user_id:0 }, ready: function() { let height= getApp().globalData.navBarHeight; let menuInfo = getApp().globalData.menuInfo; //-- 胶囊的高度 -- - this.setData({height,h1:menuInfo.top,h2:menuInfo.height}); + this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_id:getApp().globalData.user_id}); }, methods: { diff --git a/components/com_top_nav/com_top_nav.wxml b/components/com_top_nav/com_top_nav.wxml index 0f5b648..bed73bc 100644 --- a/components/com_top_nav/com_top_nav.wxml +++ b/components/com_top_nav/com_top_nav.wxml @@ -1,9 +1,10 @@ - + + ID:{{user_id}} {{title}} - ID:454545 + \ No newline at end of file diff --git a/components/com_top_nav/com_top_nav.wxss b/components/com_top_nav/com_top_nav.wxss index 5e72a6b..7e9eeec 100644 --- a/components/com_top_nav/com_top_nav.wxss +++ b/components/com_top_nav/com_top_nav.wxss @@ -1,4 +1,4 @@ .t_nav{ color: #313131; position:fixed;top:0;left:0; width:100%;z-index:9999; background-color: #fff;font-size: 30rpx } .title_set{ } -.tab{ font-size:24rpx; position: absolute; right: 24rpx; top:-32rpx } -.contant{ display: flex; justify-content: center; align-items: center; width: 100%; position: relative } +.tab{ font-size:24rpx; display: flex;;align-items: flex-end;width: 100% } +.contant{ display: flex; justify-content: center; align-items: center; width: 100%; } -- libgit2 0.21.4