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
+4 -4
View File
@@ -264,10 +264,10 @@
<wd-sticky :offset-top="offsetTop"> <wd-sticky :offset-top="offsetTop">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap"> <scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view v-for="(tab, index) in archiveTabs" :key="tab.key" <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="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="activeTabIndex === index ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'" :class="{ 'bg-primary text-gray-900 font-semibold': activeTabIndex === index }"
@click="handleOnTabChange({ index })"> @click="handleOnTabChange({ index })">
{{ tab.label }} {{ tab.label }}
</view> </view>
</scroll-view> </scroll-view>
</wd-sticky> </wd-sticky>
+4 -4
View File
@@ -214,17 +214,17 @@
<view class="w-screen overflow-hidden"> <view class="w-screen overflow-hidden">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap pb-1.5"> <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" <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 }" :class="{ 'bg-primary text-gray-900 font-semibold': filterValues.category === cate.value }"
@click="handleSelectFilter('category', cate.value)"> @click="handleSelectFilter('category', cate.value)">
{{ cate.label }} {{ cate.label }}
</view> </view>
</scroll-view> </scroll-view>
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap"> <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" <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="uh-global-card-glass shadow-none inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="{ 'bg-secondary text-gray-900': filterValues.sort === opt.value }" :class="{ 'bg-primary text-gray-900 font-semibold': filterValues.sort === opt.value, 'text-gray-500': filterValues.sort !== opt.value }"
@click="handleSelectFilter('sort', opt.value)"> @click="handleSelectFilter('sort', opt.value)">
{{ opt.label }} {{ opt.label }}
</view> </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"> <scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view <view
v-for="tab in tabList" :key="tab.key" 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="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="tab.key === activeKind ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'" :class="{ 'bg-primary text-gray-900 font-semibold': tab.key === activeKind }"
@click="handleSwitchTab(tab.key)" @click="handleSwitchTab(tab.key)"
> >
{{ tab.label }} {{ tab.label }}
+2 -2
View File
@@ -422,8 +422,8 @@ onReachBottom(() => {
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap"> <scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view <view
v-for="(tab, index) in friendLinkTabs" :key="tab.key" 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="uh-global-card-glass shadow-none mb-2 ml-3 inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="activeTabIndex === index ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'" :class="{ 'bg-primary text-gray-900 font-semibold': activeTabIndex === index }"
@click="handleOnTabChange({ index })" @click="handleOnTabChange({ index })"
> >
{{ tab.label }} {{ tab.label }}
+12 -14
View File
@@ -334,21 +334,19 @@
<uh-navbar :scroll-y="scrollY" default-title="恋爱清单" title-color="text-love" back-class="text-love"/> <uh-navbar :scroll-y="scrollY" default-title="恋爱清单" title-color="text-love" back-class="text-love"/>
<wd-sticky :offset-top="offsetTop"> <wd-sticky :offset-top="offsetTop">
<view class="box-border px-3 pb-1 pt-2"> <scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view class="box-border flex items-center justify-between gap-x-2"> <view v-for="f in filterConfig" :key="f.key"
<view v-for="f in filterConfig" :key="f.key" 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="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-primary text-gray-900 font-semibold' : 'text-gray-500']"
:class="[filterValues[f.key] !== f.options[0].value ? 'bg-love/90 text-white font-bold' : 'bg-white/80 text-gray-600']" @click="handleOpenFilter(f)">
@click="handleOpenFilter(f)"> <text class="truncate text-xs">{{ filterLabels[f.key] }}</text>
<text class="truncate text-xs">{{ filterLabels[f.key] }}</text> <template v-if="f.key!=='status'">
<template v-if="f.key!=='status'"> <wd-icon v-if="f.key === 'sort' && filterValues.sort !== 'default'"
<wd-icon v-if="f.key === 'sort' && filterValues.sort !== 'default'" :name="filterValues.sortDir === 'desc' ? 'arrow-down' : 'arrow-up'" size="26rpx" />
:name="filterValues.sortDir === 'desc' ? 'arrow-down' : 'arrow-up'" size="26rpx" /> <wd-icon v-else name="arrow-down" size="26rpx" />
<wd-icon v-else name="arrow-down" size="26rpx" /> </template>
</template>
</view>
</view> </view>
</view> </scroll-view>
</wd-sticky> </wd-sticky>
<uh-data-loading v-if="loadingStatus !== DataLoadingStatusEnum.Success" :loading-status="loadingStatus" <uh-data-loading v-if="loadingStatus !== DataLoadingStatusEnum.Success" :loading-status="loadingStatus"
+26 -22
View File
@@ -191,29 +191,33 @@
<uh-navbar :scroll-y="scrollY" default-title="公告中心" title-color="text-gray-900" /> <uh-navbar :scroll-y="scrollY" default-title="公告中心" title-color="text-gray-900" />
<wd-sticky :offset-top="offsetTop"> <wd-sticky :offset-top="offsetTop">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap"> <view class="w-screen overflow-hidden">
<view class="uh-global-card-glass uh-shadow-xs mb-2 ml-3 inline-flex border rounded-2xl px-4 py-2 text-xs" <scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
:class="activeType === '' ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'" @click="activeType = ''"> <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" </view>
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" <view v-for="(type) in typeOptions" :key="type.typeDisplayName"
:class="activeType === type.typeName ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'" 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"
@click="activeType = activeType === type.typeName ? '' : type.typeName"> :class="activeType === type.typeName ? 'bg-primary text-gray-900 font-semibold' : 'text-gray-500'"
<view v-if="type.typeColor" class="shrink-0 h-2 w-2 rounded-full" @click="activeType = activeType === type.typeName ? '' : type.typeName">
:style="{ backgroundColor: type.typeColor }" /> <view v-if="type.typeColor" class="shrink-0 h-2 w-2 rounded-full"
<view class="shrink-0">{{ type.typeDisplayName }}</view> :style="{ backgroundColor: type.typeColor }" />
</view> <view class="shrink-0">{{ type.typeDisplayName }}</view>
</scroll-view> </view>
</wd-sticky> </scroll-view>
<scroll-view :scroll-x="true" :show-scrollbar="false" class="w-full whitespace-nowrap">
<view class="flex items-center gap-2 px-3 py-2"> <view class="box-border flex gap-2 px-3 pb-1.5">
<view v-for="opt in SORT_OPTIONS" :key="opt.id" <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="uh-global-card-glass shadow-none inline-flex border rounded-2xl px-4 py-1.5 text-xs"
:class="sortKey === opt.id ? 'bg-primary font-bold' : 'text-gray-500'" @click="sortKey = opt.id"> :class="{ 'bg-primary text-gray-900 font-semibold': sortKey === opt.id, 'text-gray-500': sortKey !== opt.id }"
{{ opt.label }} @click="sortKey = opt.id">
{{ opt.label }}
</view>
</view>
</scroll-view>
</view> </view>
</view> </wd-sticky>
<uh-data-loading v-if="loadingStatus !== DataLoadingStatusEnum.Success" :loading-status="loadingStatus" <uh-data-loading v-if="loadingStatus !== DataLoadingStatusEnum.Success" :loading-status="loadingStatus"
empty-text="暂无公告" empty-sub-text="" @refresh="loadNotices(true)" /> empty-text="暂无公告" empty-sub-text="" @refresh="loadNotices(true)" />
+2 -2
View File
@@ -220,10 +220,10 @@
:checking="checking" @on-refresh="handlePluginRefresh" /> :checking="checking" @on-refresh="handlePluginRefresh" />
<template v-else> <template v-else>
<!-- 顶部搜索框--> <!-- 顶部搜索框(玻璃胶囊,与 gallery 吸顶胶囊同视觉) -->
<wd-sticky :offset-top="offsetTop"> <wd-sticky :offset-top="offsetTop">
<view class="w-screen box-border px-3 py-2"> <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" /> <wd-icon name="search" size="16px" />
<input v-model="queryParams.keyword" class="flex-1 text-sm text-gray-900" <input v-model="queryParams.keyword" class="flex-1 text-sm text-gray-900"
placeholder="哈喽,想看些什么呢~" placeholder-class="text-gray-400" confirm-type="search" placeholder="哈喽,想看些什么呢~" placeholder-class="text-gray-400" confirm-type="search"