feat(ui): 重构高级搜索组件并优化布局

- 重构 AiPullDown 组件,使用 v-model 实现双向绑定
- 优化 AiSearchBar 组件样式和布局
- 调整 AiPage 组件中的滚动条样式
This commit is contained in:
aixianling
2024-12-24 17:08:43 +08:00
parent ae83152271
commit 225c0088e1
3 changed files with 50 additions and 29 deletions

View File

@@ -1,14 +1,12 @@
<template>
<section>
<div class="AiSearchBar" :class="{bottomBorder}" :style="searchBarStyle">
<div ref="AiSearchBarZone" class="searchLeftZone">
<slot name="left"/>
</div>
<div class="searchRightZone" ref="searchRightZone">
<slot name="right"/>
</div>
<section class="AiSearchBar" :class="{bottomBorder,isSingleRow,expand}">
<div ref="AiSearchBarZone" class="searchLeftZone">
<slot name="left"/>
</div>
<ai-pull-down v-if="!isSingleRow" @change="handlePullDown" :height="rightHeight"/>
<div class="searchRightZone" ref="searchRightZone">
<slot name="right"/>
</div>
<ai-pull-down v-if="!isSingleRow" v-model="expand"/>
</section>
</template>
@@ -27,7 +25,8 @@ export default {
height: 0,
rightHeight: 0,
searchBarStyle: {},
observer: null
observer: null,
expand: false
}
},
methods: {
@@ -63,12 +62,24 @@ export default {
justify-content: space-between;
align-items: flex-start;
gap: 10px;
padding-bottom: 12px;
padding-bottom: 36px;
position: relative;
height: 64px;
overflow: hidden;
&.isSingleRow {
height: 44px;
padding-bottom: 12px;
}
&.bottomBorder {
border-bottom: 1px solid #eee;
}
&.expand {
height: auto;
}
:deep(.searchLeftZone ) {
flex: 1;
min-width: 0;
@@ -76,6 +87,8 @@ export default {
flex-wrap: wrap;
align-items: center;
gap: 8px;
overflow: hidden;
//height: 40px;
}
:deep(.searchRightZone ) {