App.vue 477 B

12345678910111213141516171819
  1. <script setup>
  2. import naviInterceptor from '@/interceptors/naviInterceptor.js';
  3. import { useSafeAreaStore } from '@/stores/safeArea.js';
  4. import { onLaunch } from '@dcloudio/uni-app';
  5. import { getSafeArea } from '@/utils/system.js';
  6. onLaunch(() => {
  7. // 导航拦截器初始化
  8. naviInterceptor();
  9. // 安全区初始化
  10. const safeAreaStore = useSafeAreaStore();
  11. safeAreaStore.$patch(getSafeArea());
  12. });
  13. </script>
  14. <style>
  15. /*每个页面公共css */
  16. </style>