feat : 小程序下隐藏applayout头部
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
>
|
>
|
||||||
<!-- 顶部头部区域 -->
|
<!-- 顶部头部区域 -->
|
||||||
<view
|
<view
|
||||||
|
v-if="showHeader"
|
||||||
class="container-header"
|
class="container-header"
|
||||||
:style="border ? { borderBottom: `2rpx solid ${borderColor}` } : { borderBottom: 'none' }"
|
:style="border ? { borderBottom: `2rpx solid ${borderColor}` } : { borderBottom: 'none' }"
|
||||||
>
|
>
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- 主体不可滚动 headContent -->
|
<!-- 主体不可滚动 headContent -->
|
||||||
<view class="container-headContent">
|
<view class="container-headContent">
|
||||||
<slot name="headContent"></slot>
|
<slot name="headContent"></slot>
|
||||||
@@ -43,6 +45,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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';
|
import img from '@/static/icon/background2.png';
|
||||||
const emit = defineEmits(['onScrollBottom']);
|
const emit = defineEmits(['onScrollBottom']);
|
||||||
defineProps({
|
defineProps({
|
||||||
@@ -84,6 +90,10 @@ defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const showHeader = computed(()=>{
|
||||||
|
return isMiniProgram.value
|
||||||
|
})
|
||||||
|
|
||||||
const handleScrollToLower = () => {
|
const handleScrollToLower = () => {
|
||||||
emit('onScrollBottom');
|
emit('onScrollBottom');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ image {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
.content-top{
|
.content-top{
|
||||||
padding: 0 28rpx 28rpx;
|
padding:28rpx;
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: nowrap
|
flex-wrap: nowrap
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ image {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
.content-top{
|
.content-top{
|
||||||
padding: 0 28rpx 28rpx ;
|
padding:28rpx;
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: row
|
flex-direction: row
|
||||||
flex-wrap: nowrap
|
flex-wrap: nowrap
|
||||||
|
|||||||
Reference in New Issue
Block a user