2025-05-23 21:20:38 +08:00
|
|
|
<script setup>
|
2025-06-15 22:01:06 +08:00
|
|
|
import { ref, onMounted } from "vue";
|
2025-05-23 21:20:38 +08:00
|
|
|
import AppBackground from "@/components/AppBackground.vue";
|
|
|
|
|
import Header from "@/components/Header.vue";
|
|
|
|
|
defineProps({
|
|
|
|
|
title: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: "",
|
|
|
|
|
},
|
|
|
|
|
bgType: {
|
2025-05-27 12:38:39 +08:00
|
|
|
type: Number,
|
2025-05-23 21:20:38 +08:00
|
|
|
default: 0,
|
|
|
|
|
},
|
|
|
|
|
});
|
2025-06-15 22:01:06 +08:00
|
|
|
const isIos = ref(true);
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
const deviceInfo = uni.getDeviceInfo();
|
|
|
|
|
isIos.value = deviceInfo.osName === "ios";
|
|
|
|
|
});
|
2025-05-23 21:20:38 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<view>
|
2025-06-05 17:43:22 +08:00
|
|
|
<AppBackground :type="bgType" />
|
2025-05-23 21:20:38 +08:00
|
|
|
<Header :title="title" />
|
2025-06-15 22:01:06 +08:00
|
|
|
<view
|
|
|
|
|
class="content"
|
|
|
|
|
:style="{ height: `calc(100vh - ${isIos ? 105 : 95}px)` }"
|
|
|
|
|
>
|
2025-05-23 21:20:38 +08:00
|
|
|
<slot></slot>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.content {
|
2025-06-06 00:34:54 +08:00
|
|
|
width: 100vw;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
overflow-y: auto;
|
2025-06-02 14:42:07 +08:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
2025-06-05 22:21:40 +08:00
|
|
|
padding-bottom: 10px;
|
2025-05-23 21:20:38 +08:00
|
|
|
}
|
|
|
|
|
</style>
|