UI兼容调整

This commit is contained in:
kron
2025-06-15 22:01:06 +08:00
parent c2b2d0bf99
commit 9ffcf67948
6 changed files with 47 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
<script setup>
import { ref, onMounted } from "vue";
import AppBackground from "@/components/AppBackground.vue";
import Header from "@/components/Header.vue";
defineProps({
@@ -11,13 +12,21 @@ defineProps({
default: 0,
},
});
const isIos = ref(true);
onMounted(() => {
const deviceInfo = uni.getDeviceInfo();
isIos.value = deviceInfo.osName === "ios";
});
</script>
<template>
<view>
<AppBackground :type="bgType" />
<Header :title="title" />
<view class="content">
<view
class="content"
:style="{ height: `calc(100vh - ${isIos ? 105 : 95}px)` }"
>
<slot></slot>
</view>
</view>
@@ -26,7 +35,6 @@ defineProps({
<style scoped>
.content {
width: 100vw;
height: calc(100vh - 95px);
overflow-x: hidden;
overflow-y: auto;
display: flex;