1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-11-13 22:11:42 +08:00

style: 统一多个页面的标签栏样式风格

调整搜索、收藏、友链、归档、文章、恋爱清单、公告页面的UI样式,统一使用玻璃态胶囊标签,移除多余阴影,调整内边距与圆角样式,统一使用primary主题色作为选中态,部分页面增加横向滚动适配,优化整体视觉一致性
This commit is contained in:
小莫唐尼
2026-09-13 05:24:42 +08:00
parent 2c19368437
commit 88236e0f6f
7 changed files with 52 additions and 50 deletions
+2 -2
View File
@@ -264,8 +264,8 @@
<wd-sticky :offset-top="offsetTop">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view v-for="(tab, index) in archiveTabs" :key="tab.key"
class="uh-global-card-glass uh-shadow-xs mb-2 ml-3 inline-flex border rounded-2xl px-4 py-2 text-xs"
:class="activeTabIndex === index ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'"
class="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="{ 'bg-primary text-gray-900 font-semibold': activeTabIndex === index }"
@click="handleOnTabChange({ index })">
{{ tab.label }}
</view>
+4 -4
View File
@@ -214,17 +214,17 @@
<view class="w-screen overflow-hidden">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap pb-1.5">
<view v-for="cate in categoryOptions" :key="cate.value"
class="uh-global-card-glass uh-shadow-xs ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
class="uh-global-card-glass shadow-none ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="{ 'bg-primary text-gray-900 font-semibold': filterValues.category === cate.value }"
@click="handleSelectFilter('category', cate.value)">
{{ cate.label }}
</view>
</scroll-view>
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view class="box-border flex gap-2 px-3 py-1.5">
<view class="box-border flex gap-2 px-3 pb-1.5">
<view v-for="opt in sortOptions" :key="opt.value"
class="uh-global-card-glass uh-shadow-xs inline-flex border rounded-full px-3 py-1 text-xs"
:class="{ 'bg-secondary text-gray-900': filterValues.sort === opt.value }"
class="uh-global-card-glass shadow-none inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="{ 'bg-primary text-gray-900 font-semibold': filterValues.sort === opt.value, 'text-gray-500': filterValues.sort !== opt.value }"
@click="handleSelectFilter('sort', opt.value)">
{{ opt.label }}
</view>
+2 -2
View File
@@ -87,8 +87,8 @@ onPageScroll((option: Page.PageScrollOption) => {
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view
v-for="tab in tabList" :key="tab.key"
class="uh-global-card-glass uh-shadow-xs mb-2 ml-3 inline-flex border rounded-2xl px-4 py-2 text-xs"
:class="tab.key === activeKind ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'"
class="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="{ 'bg-primary text-gray-900 font-semibold': tab.key === activeKind }"
@click="handleSwitchTab(tab.key)"
>
{{ tab.label }}
+2 -2
View File
@@ -422,8 +422,8 @@ onReachBottom(() => {
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view
v-for="(tab, index) in friendLinkTabs" :key="tab.key"
class="uh-global-card-glass uh-shadow-xs mb-2 ml-3 inline-flex border rounded-2xl px-4 py-2 text-xs"
:class="activeTabIndex === index ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'"
class="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="{ 'bg-primary text-gray-900 font-semibold': activeTabIndex === index }"
@click="handleOnTabChange({ index })"
>
{{ tab.label }}
+4 -6
View File
@@ -334,11 +334,10 @@
<uh-navbar :scroll-y="scrollY" default-title="恋爱清单" title-color="text-love" back-class="text-love"/>
<wd-sticky :offset-top="offsetTop">
<view class="box-border px-3 pb-1 pt-2">
<view class="box-border flex items-center justify-between gap-x-2">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view v-for="f in filterConfig" :key="f.key"
class="uh-global-card-glass box-border flex flex-1 items-center justify-center gap-1 border rounded-full px-4 py-2 text-gray-500"
:class="[filterValues[f.key] !== f.options[0].value ? 'bg-love/90 text-white font-bold' : 'bg-white/80 text-gray-600']"
class="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex items-center gap-1 border rounded-2xl px-4 py-1.5 text-xs"
:class="[filterValues[f.key] !== f.options[0].value ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500']"
@click="handleOpenFilter(f)">
<text class="truncate text-xs">{{ filterLabels[f.key] }}</text>
<template v-if="f.key!=='status'">
@@ -347,8 +346,7 @@
<wd-icon v-else name="arrow-down" size="26rpx" />
</template>
</view>
</view>
</view>
</scroll-view>
</wd-sticky>
<uh-data-loading v-if="loadingStatus !== DataLoadingStatusEnum.Success" :loading-status="loadingStatus"
+11 -7
View File
@@ -191,13 +191,14 @@
<uh-navbar :scroll-y="scrollY" default-title="公告中心" title-color="text-gray-900" />
<wd-sticky :offset-top="offsetTop">
<view class="w-screen overflow-hidden">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view class="uh-global-card-glass uh-shadow-xs mb-2 ml-3 inline-flex border rounded-2xl px-4 py-2 text-xs"
<view class="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="activeType === '' ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'" @click="activeType = ''">
全部
</view>
<view v-for="(type) in typeOptions" :key="type.typeDisplayName"
class="mb-2 ml-3 box-border uh-global-card-glass uh-shadow-xs inline-flex items-center gap-1 border rounded-2xl px-4 py-2 text-xs"
class="mb-2 ml-3 box-border uh-global-card-glass shadow-none inline-flex items-center gap-1 border rounded-2xl px-4 py-1.5 text-xs"
:class="activeType === type.typeName ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'"
@click="activeType = activeType === type.typeName ? '' : type.typeName">
<view v-if="type.typeColor" class="shrink-0 h-2 w-2 rounded-full"
@@ -205,15 +206,18 @@
<view class="shrink-0">{{ type.typeDisplayName }}</view>
</view>
</scroll-view>
</wd-sticky>
<view class="flex items-center gap-2 px-3 py-2">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view class="box-border flex gap-2 px-3 pb-1.5">
<view v-for="opt in SORT_OPTIONS" :key="opt.id"
class="uh-global-card-glass uh-shadow-xs inline-block border rounded-2xl px-4 py-1 text-xs"
:class="sortKey === opt.id ? 'bg-primary font-bold' : 'text-gray-500'" @click="sortKey = opt.id">
class="uh-global-card-glass shadow-none inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="{ 'bg-primary text-gray-900 font-semibold': sortKey === opt.id, 'text-gray-500': sortKey !== opt.id }"
@click="sortKey = opt.id">
{{ opt.label }}
</view>
</view>
</scroll-view>
</view>
</wd-sticky>
<uh-data-loading v-if="loadingStatus !== DataLoadingStatusEnum.Success" :loading-status="loadingStatus"
empty-text="暂无公告" empty-sub-text="" @refresh="loadNotices(true)" />
+2 -2
View File
@@ -220,10 +220,10 @@
:checking="checking" @on-refresh="handlePluginRefresh" />
<template v-else>
<!-- 顶部搜索框-->
<!-- 顶部搜索框(玻璃胶囊,与 gallery 吸顶胶囊同视觉) -->
<wd-sticky :offset-top="offsetTop">
<view class="w-screen box-border px-3 py-2">
<view class="box-border uh-global-card-glass h-9 flex items-center gap-3 rounded-full pl-1 pr-3">
<view class="box-border uh-global-card-glass h-9 flex items-center gap-3 rounded-full border pl-3 pr-3">
<wd-icon name="search" size="16px" />
<input v-model="queryParams.keyword" class="flex-1 text-sm text-gray-900"
placeholder="哈喽,想看些什么呢~" placeholder-class="text-gray-400" confirm-type="search"