From 185f881c9eb1ff65de80275bccac4759b60e753d Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 23 Nov 2023 17:11:34 +0800 Subject: [PATCH] id的优化 --- components/com_top_nav/com_top_nav.js | 12 +++++++++++- components/com_top_nav/com_top_nav.wxml | 16 ++++++++-------- components/com_top_nav/com_top_nav.wxss | 7 ++++--- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/components/com_top_nav/com_top_nav.js b/components/com_top_nav/com_top_nav.js index 54271aa..f7d765e 100644 --- a/components/com_top_nav/com_top_nav.js +++ b/components/com_top_nav/com_top_nav.js @@ -1,6 +1,16 @@ var t = getApp(),os = t.globalData.setting; Component({ - properties: {}, + properties: { + title:{ + type: String,value: '你好' + }, + bcolor:{ + type: String,value: '#fff' + }, + color:{ + type: String,value: '#313131' + } + }, data: { iurl: os.imghost, height:0, diff --git a/components/com_top_nav/com_top_nav.wxml b/components/com_top_nav/com_top_nav.wxml index b10fd78..0f5b648 100644 --- a/components/com_top_nav/com_top_nav.wxml +++ b/components/com_top_nav/com_top_nav.wxml @@ -1,9 +1,9 @@ - - - - 你好 - ID:454545 - - + + + + {{title}} + ID:454545 + + - \ No newline at end of file + \ 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 234b5b3..5e72a6b 100644 --- a/components/com_top_nav/com_top_nav.wxss +++ b/components/com_top_nav/com_top_nav.wxss @@ -1,3 +1,4 @@ -.t_nav{ color: #313131; position:fixed;top:0;left:0; width:100%;z-index:9999; background-color: #fff } -.tab{ font-size:24rpx; position: absolute; right: 24rpx; top:-30rpx } -.contant{ display: flex; justify-content: center; align-items: center; width: 100%; position: relative } \ No newline at end of file +.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 } -- libgit2 0.21.4