feat(实时资讯): 添加搜索栏组件及样式

实现实时资讯页面的搜索功能,包含logo和搜索框的布局与样式
This commit is contained in:
zzp 2025-09-12 09:40:07 +08:00
parent 9e2f08bbc2
commit 725f4eb9af
1 changed files with 61 additions and 1 deletions

View File

@ -3,7 +3,19 @@
<view class="all">
<!-- banner start -->
<view class="banner">
<!-- <view class="sreach"> </view> -->
<view class="r_sreach">
<image class="logo_text" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/logo_text_icon.png"> </image>
<view class="sreach" @click="goSreach">
<view class="sreach_icon">
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"></image>
</view>
<view class="sreach_text">
<text>搜索资讯</text>
</view>
</view>
</view>
<img :src="bannerImg" class="banner_bk" />
<view class="r_banner_title">
<img :src="bannerTitle" class="banner_title" />
@ -434,4 +446,52 @@ onMounted(async () => {
color: #fff;
}
}
.r_sreach {
display: flex;
align-items: center;
padding: 0 30rpx;
position: absolute;
top: 10px;
left: 0;
z-index: 9999;
}
.logo_text {
width: 88rpx;
height: 45rpx;
}
.sreach {
display: flex;
align-items: center;
padding: 0rpx 30rpx;
background-color: #fff;
border-radius: 100rpx;
width: 80vw;
height: 68rpx;
margin-left: 20rpx;
}
.sreach_icon {
margin-right: 10rpx;
display: flex;
align-items: center;
image {
width: 35rpx;
height: 35rpx;
margin-top: 5rpx;
}
}
.sreach_text {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 33rpx;
text-align: left;
font-style: normal;
}
</style>