修复点位搜索快捷入口横向滑动
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-15 01:53:00 +08:00
parent 6c3da77693
commit b2cea43502
2 changed files with 31 additions and 12 deletions

View File

@@ -47,7 +47,7 @@
<view v-if="variant === 'home' && !showSearchContent && !isHomeCategoryMode" class="home-category-strip">
<view
v-for="item in collapsedHomeCategories"
v-for="item in homeCategories"
:key="item.id"
class="home-category-chip"
:class="{ active: activeCategoryId === item.id }"
@@ -276,7 +276,6 @@ type PreparedPoiResults = {
}
const homeCategories = HOME_POI_CATEGORIES
const collapsedHomeCategories = computed(() => homeCategories.slice(0, 5))
const searchCategories = POI_CATEGORIES
const searchCategoryColumns = computed(() => (
props.variant === 'home' ? homeCategories : searchCategories
@@ -1117,9 +1116,14 @@ defineExpose({
.home-category-strip {
margin-top: 10px;
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
display: flex;
gap: 6px;
overflow-x: auto;
overflow-y: hidden;
scrollbar-width: none;
overscroll-behavior-x: contain;
-webkit-overflow-scrolling: touch;
touch-action: pan-x;
}
.variant-home.is-collapsed .home-category-strip {
@@ -1128,7 +1132,8 @@ defineExpose({
}
.home-category-chip {
min-width: 0;
min-width: calc((100% - 24px) / 5);
flex: 0 0 calc((100% - 24px) / 5);
min-height: 68px;
display: flex;
flex-direction: column;
@@ -1145,10 +1150,13 @@ defineExpose({
}
.variant-home.is-collapsed .home-category-chip {
min-width: 0;
min-height: 68px;
}
.home-category-strip::-webkit-scrollbar {
display: none;
}
.home-category-chip:active {
transform: translateY(1px);
background: #eef06d;
@@ -1461,9 +1469,7 @@ defineExpose({
.variant-home .category-scroll {
width: calc(100% - 8px);
margin: 0 4px;
overflow: visible;
padding-bottom: 0;
touch-action: pan-y;
}
.category-scroll::-webkit-scrollbar {
@@ -1541,7 +1547,7 @@ defineExpose({
grid-template-rows: repeat(2, 72px);
grid-auto-columns: auto;
width: 100%;
min-width: 0;
min-width: 320px;
gap: 6px;
}