From 23ed064115df349f152e7a7d96a2fb27339e143a Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Wed, 24 Dec 2025 14:51:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index.vue | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/views/index.vue b/src/views/index.vue index c1302a3..d966579 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1168,8 +1168,8 @@ import { getLocalPositionRelativeToP4, parseTime } from '@/utils/tool' -import {ScreenOrientation} from '@capacitor/screen-orientation'; -import { StatusBar, Style } from '@capacitor/status-bar'; +// import {ScreenOrientation} from '@capacitor/screen-orientation'; +// import { StatusBar, Style } from '@capacitor/status-bar'; const formUrl = 'http://192.168.1.123:5000/' const router = useRouter() @@ -2573,24 +2573,24 @@ onMounted(() => { getObstacleList() // testFun() - - function lockLandscapeIfSmallWidth() { - const w = window.innerWidth; - - if (w < 700) { - // 锁定横屏 - ScreenOrientation.lock({orientation: 'landscape'}); - StatusBar.hide(); - } else { - // 允许自由旋转 - ScreenOrientation.unlock(); - StatusBar.show(); - StatusBar.setStyle({ style: Style.Default }); - } - } - -// 初始化执行一次 - lockLandscapeIfSmallWidth(); +// +// function lockLandscapeIfSmallWidth() { +// const w = window.innerWidth; +// +// if (w < 700) { +// // 锁定横屏 +// ScreenOrientation.lock({orientation: 'landscape'}); +// StatusBar.hide(); +// } else { +// // 允许自由旋转 +// ScreenOrientation.unlock(); +// StatusBar.show(); +// StatusBar.setStyle({ style: Style.Default }); +// } +// } +// +// // 初始化执行一次 +// lockLandscapeIfSmallWidth(); })