App.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <script setup>
  2. import {
  3. onMounted
  4. } from "vue";
  5. import {
  6. onLoad,
  7. onShow,
  8. onLaunch
  9. } from '@dcloudio/uni-app'
  10. import {
  11. updateRoute
  12. } from "@/hooks/useRoute";
  13. import useGlobalStore from "@/stores/use-global-store";
  14. import { useAppUpdate } from '@/hooks/useAppUpdate'
  15. const { checkUpdate } = useAppUpdate()
  16. const globalStore = useGlobalStore()
  17. onLoad((options) => {
  18. updateRoute();
  19. checkUpdate()
  20. })
  21. onShow((options) => {
  22. updateRoute();
  23. checkUpdate()
  24. })
  25. onLaunch((options) => {
  26. updateRoute();
  27. checkUpdate()
  28. })
  29. onMounted(() => {
  30. const sysInfo = uni.getSystemInfoSync();
  31. globalStore.setBarHeight(sysInfo.statusBarHeight);
  32. });
  33. </script>
  34. <style>
  35. /*每个页面公共css */
  36. </style>
  37. <style lang="scss">
  38. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  39. @import "uview-plus/index.scss";
  40. @import "@/static/scss/global/global.scss";
  41. @import "/static/scss/style.scss";
  42. :deep(.u-toolbar__wrapper__confirm) {
  43. font-size: 20px !important;
  44. }
  45. :deep(.u-toolbar__wrapper__cancel) {
  46. font-size: 20px !important;
  47. }
  48. .page {
  49. /* padding: 31px 31px 110px 31px; */
  50. box-sizing: border-box;
  51. /* background: var(--main-bg); */
  52. }
  53. html {
  54. font-size: 32px !important;
  55. }
  56. uni-page-body {
  57. height: 100%;
  58. }
  59. </style>