From f799169001d010524e38c5b8bf1931894890d2a1 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Sat, 16 Sep 2023 18:47:49 +0800 Subject: [PATCH] 搜索组件优化 --- components/diy_searchbox/diy_searchbox.js | 8 ++++++++ components/diy_searchbox/diy_searchbox.wxml | 28 ++++++++++++++++------------ components/diy_searchbox/diy_searchbox.wxss | 7 +++++-- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/components/diy_searchbox/diy_searchbox.js b/components/diy_searchbox/diy_searchbox.js index 73443ef..32b86db 100644 --- a/components/diy_searchbox/diy_searchbox.js +++ b/components/diy_searchbox/diy_searchbox.js @@ -9,6 +9,14 @@ Component({ type: Object, value: null, }, + transparent: { + type: Number, + value: 0, + }, + nav_backgroundColor: { + type: String, + value: '', + }, }, data: { // 这里是一些组件内部数据 diff --git a/components/diy_searchbox/diy_searchbox.wxml b/components/diy_searchbox/diy_searchbox.wxml index 2fe1238..937cdf5 100644 --- a/components/diy_searchbox/diy_searchbox.wxml +++ b/components/diy_searchbox/diy_searchbox.wxml @@ -1,12 +1,13 @@ - + - - - + + + - 请输入商品关键字 + {{object.searchbox_text}} + 请输入商品关键字 @@ -19,7 +20,7 @@ {{item}} - + 清除 @@ -32,14 +33,16 @@ - - + + + - - + + - 请输入商品关键字 + {{object.searchbox_text}} + 请输入商品关键字 @@ -63,7 +66,8 @@ - + + diff --git a/components/diy_searchbox/diy_searchbox.wxss b/components/diy_searchbox/diy_searchbox.wxss index 9c87092..3d05b81 100644 --- a/components/diy_searchbox/diy_searchbox.wxss +++ b/components/diy_searchbox/diy_searchbox.wxss @@ -7,7 +7,7 @@ } .s_ge{ - width: 700rpx; + /* width: 700rpx; */ height: 70rpx; text-align: center; border-radius: 8rpx; @@ -15,6 +15,7 @@ background: #fff none repeat scroll 0 0; border: 2px solid #eee; line-height: 64rpx; + padding: 0 10rpx; } .s_ge image{ @@ -153,7 +154,9 @@ color: #FF5B5A; font-size: 26rpx; } - +.is_bord{ + border-radius: 30rpx !important; +} /* .w100 { width: 100%; box-sizing: border-box; -- libgit2 0.21.4