UI兼容调整
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user