调整字体等

This commit is contained in:
2026-03-12 17:11:14 +08:00
parent b8558dfb41
commit bc16633f75
5 changed files with 284 additions and 104 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view>
<view :class="{'h5-pc-page': isH5}">
<view class="popupAll">
<view class="tabList dispalyF" v-if="!allCheckShow">
<scroll-view scroll-x style="white-space: nowrap;width: calc(100% - 144rpx);margin-left: 32rpx">
@@ -38,7 +38,7 @@
{{ item.name }}
</view>
<view
class="dispalyF"
class="dispalyF filter-options-container"
:style="[
{
position: 'sticky',
@@ -48,29 +48,20 @@
},
]"
>
<template>
<template v-for="(itm, idx) in item.data">
<view :key="idx" v-if="!itm.mode"
@click="getActive(itm, index, idx)"
:class="
idx == item.activeIndex
? 'popupItem-active'
: 'popupItem'
"
style="margin-right: 20rpx"
>
{{ itm.dictLabel }}
</view>
<!-- <view v-if="itm.mode == 'timerange'">
{{itm.start||'开始时间'}} - {{ item.end||'结束时间' }}
</view> -->
</template>
<template v-for="(itm, idx) in item.data">
<view :key="idx" v-if="!itm.mode"
@click="getActive(itm, index, idx)"
:class="
idx == item.activeIndex
? 'popupItem-active'
: 'popupItem'
"
>
{{ itm.dictLabel }}
</view>
</template>
</view>
</view>
<!-- <view class="search_btn" @click="search">
查询
</view> -->
<view class="bottom-search">
<view class="search-left" @click="clearAll">
清空
@@ -78,7 +69,7 @@
<view class="search-right" @click="search">查询</view>
</view>
<view class="popupPic" @click="close">
<u-icon name="arrow-up"></u-icon>
<uni-icons type="arrow-up" color="#c0c4cc" :size="isH5 ? 20 : 16"></uni-icons>
</view>
</view>
@@ -103,7 +94,8 @@ export default {
params: "",
fijItem: "",
outData: [],
nickName: ''
nickName: '',
isH5: false
};
},
watch: {
@@ -115,9 +107,17 @@ export default {
},
},
mounted() {
if (uni.getStorageSync("userInfo")) {
let userInfo = JSON.parse(uni.getStorageSync("userInfo"));
this.nickName = userInfo.userName ? userInfo.userName : "";
// #ifdef H5
this.isH5 = true;
// #endif
const rawUserInfo = uni.getStorageSync("userInfo");
if (rawUserInfo) {
try {
let userInfo = typeof rawUserInfo === 'string' ? JSON.parse(rawUserInfo) : rawUserInfo;
this.nickName = userInfo.userName || userInfo.name || "";
} catch (e) {
console.error("解析用户信息失败", e);
}
}
},
methods: {
@@ -257,7 +257,7 @@ export default {
overflow: hidden;
flex-wrap: nowrap;
width: 100%;
z-index: 9;
z-index: 105; /* 增加层级,确保在筛选条上方而不被遮挡 */
.tabItem {
line-height: 56rpx;
@@ -280,7 +280,7 @@ export default {
right: 0;
width: 87rpx;
height: 56rpx;
// background: linear-gradient(270deg, #2A51DF 0%, rgba(66, 110, 230, 0) 100%);
z-index: 100; /* 确保图标可点击 */
}
.tabrightBtn {
@@ -309,7 +309,6 @@ export default {
border: 1rpx solid #CAD4E2;
box-sizing: border-box;
}
.popupItem-active {
padding: 0 32rpx;
text-align: center;
@@ -329,15 +328,6 @@ export default {
}
}
.dispalyF {
display: flex;
align-items: center;
}
.rightView :last-child {
margin-right: 100rpx !important;
}
.bottom-search {
margin-top:56rpx;
display: flex;
@@ -372,4 +362,73 @@ export default {
justify-content: center;
}
}
/* #ifdef H5 */
.h5-pc-page {
.tabList {
padding: 12px 0 !important;
background: #f5f7fa !important;
border-radius: 12px !important;
white-space: nowrap !important;
overflow: hidden !important;
display: flex !important;
}
.tabList .tabItem {
display: inline-block !important;
font-size: 20px !important;
line-height: 48px !important;
height: 48px !important;
padding: 0 24px !important;
border-radius: 24px !important;
width: auto !important;
min-width: 100px !important; /* 减小最小宽度,防止溢出 */
margin-right: 12px !important;
vertical-align: middle;
background-color: #ffffff !important;
flex-shrink: 0 !important;
box-sizing: border-box !important;
}
.tabItem.popupItem-active {
background-color: #1a62ce !important;
color: #fff !important;
}
.tabTitle {
font-size: 20px !important;
margin: 16px 0 12px !important;
font-weight: 600;
display: block !important;
}
.filter-options-container {
display: flex !important;
flex-wrap: wrap !important;
margin-top: 8px !important;
min-height: 40px !important;
}
/* 仅针对展开后的筛选列表应用网格项样式,避免影响顶部 Tab */
.popupList .popupItem,
.popupList .popupItem-active {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
font-size: 20px !important;
line-height: 1.2 !important;
padding: 10px 24px !important;
margin: 0 16px 16px 0 !important;
border-radius: 8px !important;
border: 1px solid #CAD4E2 !important;
min-width: 140px !important;
height: auto !important;
}
.popupItem-active {
background-color: #1a62ce !important;
color: #fff !important;
border-color: #1a62ce !important;
}
.bottom-search .search-left, .bottom-search .search-right {
font-size: 20px !important;
height: 54px !important;
line-height: 54px !important;
}
}
/* #endif */
</style>