86 lines
1.7 KiB
Vue
86 lines
1.7 KiB
Vue
<template>
|
|
<s-layout
|
|
navbar="inner"
|
|
color="#ffffff"
|
|
:title="props.title"
|
|
:bgStyle="{ color: props.color }"
|
|
:showLeftButton="props.showLeftButton"
|
|
:goLeft="props.goLeft"
|
|
@onClickLeft="onClickLeft"
|
|
>
|
|
<view class="theme-ai spages">
|
|
<view class="card1 w100">
|
|
<image class="w100" :src="$url + 'main/1.png'" mode="" />
|
|
</view>
|
|
<!-- pages内容 -->
|
|
<view
|
|
class="s-con"
|
|
:style="{ top: height + 'px', height: windowHeight - height + 'px', zIndex: 1 }"
|
|
>
|
|
<slot />
|
|
</view>
|
|
</view>
|
|
</s-layout>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import {
|
|
ref,
|
|
reactive,
|
|
onMounted,
|
|
onUnmounted,
|
|
getCurrentInstance,
|
|
watch,
|
|
nextTick,
|
|
defineProps,
|
|
} from 'vue';
|
|
let { proxy } = getCurrentInstance();
|
|
const props = defineProps({
|
|
title: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
showLeftButton: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
goLeft: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
heightShow: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
color: {
|
|
type: String,
|
|
default: '#F2F4F7',
|
|
},
|
|
});
|
|
|
|
let sysInfo = uni.getSystemInfoSync();
|
|
const windowHeight = sysInfo.windowHeight;
|
|
let height = ref(0);
|
|
if (!props.heightShow) {
|
|
height.value = sysInfo.statusBarHeight + uni.upx2px(88);
|
|
}
|
|
const onClickLeft = () => {
|
|
proxy.$emit('onClickLeft');
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.spages {
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
.card1 {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
.s-con {
|
|
position: sticky;
|
|
overflow: auto;
|
|
box-sizing: border-box;
|
|
}
|
|
</style>
|