src/App.vue
@@ -1,17 +1,5 @@ <script setup lang="ts"> import { onMounted,onUnmounted } from "vue"; import deviceView from "./components/deviceView.vue"; onMounted(()=>{ console.log(window.plus) if (window.plus) { plus.screen.lockOrientation('landscape'); // 锁定横屏 } }) onUnmounted(()=>{ if (window.plus) { plus.screen.unlockOrientation(); // 解锁屏幕方向 } }) import { ref } from "vue"; </script> <template>