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