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,9 +1,11 @@
<script setup>
import { ref, onMounted } from "vue";
import useStore from "@/store";
import { simulShootAPI } from "@/apis";
import { storeToRefs } from "pinia";
const store = useStore();
const { device } = storeToRefs(store);
const isIos = ref(true);
defineProps({
title: {
@@ -17,10 +19,15 @@ const simulShoot = async () => {
await simulShootAPI(device.value.deviceId);
}
};
onMounted(() => {
const deviceInfo = uni.getDeviceInfo();
isIos.value = deviceInfo.osName === "ios";
});
</script>
<template>
<view class="container">
<view class="container" :style="{ paddingTop: isIos ? '35px' : '25px' }">
<navigator open-type="navigateBack" class="back-btn">
<image src="../static/back.png" mode="widthFix" />
</navigator>
@@ -37,7 +44,6 @@ const simulShoot = async () => {
width: 72vw;
height: 60px;
padding-left: 15px;
padding-top: 25px;
}
.back-btn {
display: flex;