fix: 首页样式完善。

This commit is contained in:
tianyongbao
2026-01-20 17:47:06 +08:00
parent 1b65f78f71
commit c43d5a6dd5

View File

@@ -1,19 +1,16 @@
<template> <template>
<!-- <nut-row class="home_home" :style="{ marginTop: navBarHeight + 'px' }"> --> <!-- <nut-row class="home_home" :style="{ marginTop: navBarHeight + 'px' }"> -->
<nut-row class="home_home"> <nut-row class="home_home">
<!-- 固定区域开始 -->
<view class="sticky-header">
<CustomNavigationBar @refresh="resUsetInfo" /> <CustomNavigationBar @refresh="resUsetInfo" />
<nut-col :span="24" class="container" :class="showChart ? 'ov' : ''">
<nut-config-provider :theme-vars="themeVars">
<nut-row class="body" :catch-move="false">
<view :style="{ height: '120rpx' }">
<!-- 头部操作按钮区 --> <!-- 头部操作按钮区 -->
<nut-col <nut-col
:span="24" :span="24"
class="view_f_between" class="view_f_between header-btn-container"
:style="{ padding: '20rpx 20rpx 0 20rpx' }"
> >
<view> <view>
<nut-button type="primary" class="btn" size="small" @click="changeMode"> <nut-button type="primary" class="btn header-btn" size="small" @click="changeMode">
<template #icon> <template #icon>
<IconFont :name="change" size="18" /> <IconFont :name="change" size="18" />
</template> </template>
@@ -23,7 +20,7 @@
<view> <view>
<nut-button <nut-button
type="primary" type="primary"
class="btn font_28" class="btn header-btn font_28"
size="small" size="small"
open-type="contact" open-type="contact"
> >
@@ -35,8 +32,8 @@
</view> </view>
<view> <view>
<nut-button <nut-button
type="warning" type="primary"
class="btn font_28" class="btn header-btn header-btn-warning font_28"
size="small" size="small"
@click="openNotice" @click="openNotice"
> >
@@ -46,9 +43,12 @@
<text class="font_32">系统公告</text> <text class="font_32">系统公告</text>
</nut-button> </nut-button>
</view> </view>
</nut-col> </nut-col>
</view>
<!-- 固定区域结束 -->
<nut-col :span="24" class="container" :class="showChart ? 'ov' : ''">
<nut-config-provider :theme-vars="themeVars">
<nut-row class="body" :catch-move="false">
<!-- 消息通知 --> <!-- 消息通知 -->
<nut-col <nut-col
:span="24" :span="24"
@@ -94,7 +94,6 @@
</view> </view>
</nut-col> </nut-col>
</view>
<!-- 模式一 --> <!-- 模式一 -->
<nut-col <nut-col
:span="24" :span="24"
@@ -1263,6 +1262,56 @@ function toPay() {
/** -----------------method end------------------- */ /** -----------------method end------------------- */
</script> </script>
<style lang="scss"> <style lang="scss">
.sticky-header {
position: sticky;
top: 0;
z-index: 999;
background: #fff;
padding-bottom: 10rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
}
.header-btn-container {
padding: 20rpx !important;
gap: 16rpx !important;
display: flex !important;
align-items: stretch !important;
background: #fff !important;
view {
flex: 1;
display: flex;
}
}
.header-btn {
border-radius: 8rpx !important;
width: 100%;
height: 72rpx !important;
min-height: 72rpx !important;
max-height: 72rpx !important;
padding: 0 !important;
margin: 0 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
box-sizing: border-box !important;
font-size: 28rpx !important;
font-weight: 500 !important;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1) !important;
transition: all 0.3s ease !important;
&:active {
transform: scale(0.98);
box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.1) !important;
}
}
.header-btn-warning {
background: #ff8800 !important;
background-color: #ff8800 !important;
}
.home_home { .home_home {
width: 100%; width: 100%;
height: 100%; height: 100%;