feat : 小程序下隐藏applayout头部

This commit is contained in:
2025-12-24 16:33:59 +08:00
parent ebea520bca
commit a5ea613a7d
3 changed files with 12 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
>
<!-- 顶部头部区域 -->
<view
v-if="showHeader"
class="container-header"
:style="border ? { borderBottom: `2rpx solid ${borderColor}` } : { borderBottom: 'none' }"
>
@@ -21,6 +22,7 @@
</view>
</view>
<!-- 主体不可滚动 headContent -->
<view class="container-headContent">
<slot name="headContent"></slot>
@@ -43,6 +45,10 @@
</template>
<script setup>
import { computed } from "vue"
import { storeToRefs } from 'pinia';
import useUserStore from '@/stores/useUserStore';
const { isMiniProgram } = storeToRefs(useUserStore());
import img from '@/static/icon/background2.png';
const emit = defineEmits(['onScrollBottom']);
defineProps({
@@ -84,6 +90,10 @@ defineProps({
},
});
const showHeader = computed(()=>{
return isMiniProgram.value
})
const handleScrollToLower = () => {
emit('onScrollBottom');
};

View File

@@ -265,7 +265,7 @@ image {
display: flex;
flex-direction: column
.content-top{
padding: 0 28rpx 28rpx;
padding:28rpx;
display: flex
flex-direction: row
flex-wrap: nowrap

View File

@@ -295,7 +295,7 @@ image {
display: flex;
flex-direction: column
.content-top{
padding: 0 28rpx 28rpx ;
padding:28rpx;
display: flex
flex-direction: row
flex-wrap: nowrap