feat(ui): 优化全部功能页布局与交互体验
调整全部功能页菜单名称字号和字重,统一与首页常用功能菜单一致 放大左侧导航按钮字号和点击区域,提升分类选择时的可操作性 调整右侧字母索引按钮间距和热区,优化快速定位体验 细化页面内留白设计,修正搜索区、导航区与功能列表之间的间距问题 参考商品查询页搜索框风格,更新为圆角浅灰输入框,并保留独立搜索按钮 去掉扫描图标,仅保留搜索入口,保持页面更简洁、交互更聚焦 优化头部与内容区分隔逻辑,提升页面整体视觉一致性
This commit is contained in:
parent
263adfb759
commit
ee6e52ff40
@ -12,15 +12,22 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-bar">
|
||||
<view class="search-panel">
|
||||
<view class="search-input-wrap">
|
||||
<u-icon name="search" size="18" color="#999"></u-icon>
|
||||
<input
|
||||
class="search-input"
|
||||
<u-search
|
||||
v-model="searchKeyword"
|
||||
placeholder="输入关键字搜索功能"
|
||||
placeholder-class="search-placeholder"
|
||||
/>
|
||||
bg-color="#f5f5f5"
|
||||
shape="round"
|
||||
:show-action="false"
|
||||
@search="handleSearchAction"
|
||||
@clear="handleSearchAction"
|
||||
></u-search>
|
||||
<view class="search-actions">
|
||||
<view class="search-btn" @click="handleSearchAction">
|
||||
<text class="search-btn__text">搜索</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -306,6 +313,12 @@
|
||||
this.activeParent = '全部';
|
||||
this.activeNav = '全部';
|
||||
},
|
||||
handleSearchAction() {
|
||||
// 列表已随关键字实时过滤,这里只收起键盘
|
||||
if (typeof uni !== 'undefined' && uni.hideKeyboard) {
|
||||
uni.hideKeyboard();
|
||||
}
|
||||
},
|
||||
onClickParent(group) {
|
||||
this.activeParent = group.key;
|
||||
this.activeNav = group.initial || '全部';
|
||||
@ -423,7 +436,6 @@
|
||||
position: relative;
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -472,22 +484,23 @@
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
position: relative;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.left-nav {
|
||||
width: 160rpx;
|
||||
width: 180rpx;
|
||||
background: #fff;
|
||||
border-right: 1rpx solid #f0f0f0;
|
||||
padding: 12rpx 8rpx;
|
||||
|
||||
.nav-item {
|
||||
position: relative;
|
||||
min-height: 60rpx;
|
||||
min-height: 68rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-size: 34rpx;
|
||||
color: #666;
|
||||
background: #f4f5f7;
|
||||
border-radius: 10rpx;
|
||||
@ -515,7 +528,7 @@
|
||||
}
|
||||
|
||||
.parent-nav-item {
|
||||
font-size: 28rpx;
|
||||
font-size: 34rpx;
|
||||
line-height: 1.4;
|
||||
word-break: break-all;
|
||||
}
|
||||
@ -537,25 +550,30 @@
|
||||
align-items: center;
|
||||
background: transparent;
|
||||
border-radius: 16rpx;
|
||||
padding: 4rpx 3rpx;
|
||||
padding: 6rpx 4rpx;
|
||||
|
||||
.initial-item {
|
||||
position: relative;
|
||||
min-width: 32rpx;
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
min-width: 36rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
font-size: 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
border-radius: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 6rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -8rpx;
|
||||
right: -8rpx;
|
||||
top: -6rpx;
|
||||
bottom: -6rpx;
|
||||
left: -6rpx;
|
||||
right: -6rpx;
|
||||
top: -2rpx;
|
||||
bottom: -2rpx;
|
||||
}
|
||||
|
||||
&.active {
|
||||
@ -565,31 +583,58 @@
|
||||
}
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
padding: 16rpx 20rpx;
|
||||
.search-panel {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
border-bottom: 1rpx solid #f2f2f2;
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.search-input-wrap {
|
||||
height: 72rpx;
|
||||
background: #f4f5f7;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.search-input-wrap {
|
||||
position: relative;
|
||||
|
||||
::v-deep .u-search {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
height: 72rpx;
|
||||
padding-left: 12rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
::v-deep .u-search__content {
|
||||
padding-right: 110rpx;
|
||||
}
|
||||
|
||||
.search-placeholder {
|
||||
::v-deep .u-search__content__close {
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search-actions {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 68rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
height: 68rpx;
|
||||
padding: 0 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
&__text {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
font-weight: 500;
|
||||
color: #2979ff;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
&:active {
|
||||
opacity: 0.88;
|
||||
}
|
||||
}
|
||||
|
||||
@ -603,6 +648,10 @@
|
||||
color: #666;
|
||||
padding: 18rpx 4rpx 10rpx;
|
||||
}
|
||||
|
||||
&:first-child .group-title {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -646,7 +695,8 @@
|
||||
}
|
||||
|
||||
.item-name {
|
||||
font-size: 28rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: normal;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
padding: 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user