App.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. })
  20. onShow((options) => {
  21. updateRoute();
  22. })
  23. onLaunch((options) => {
  24. updateRoute();
  25. checkUpdate()
  26. })
  27. onMounted(() => {
  28. const sysInfo = uni.getSystemInfoSync();
  29. globalStore.setBarHeight(sysInfo.statusBarHeight);
  30. });
  31. </script>
  32. <style>
  33. /*每个页面公共css */
  34. </style>
  35. <style lang="scss">
  36. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  37. @import "uview-plus/index.scss";
  38. @import "@/static/scss/global/global.scss";
  39. @import "/static/scss/style.scss";
  40. :deep(.u-toolbar__wrapper__confirm) {
  41. font-size: 20px !important;
  42. }
  43. :deep(.u-toolbar__wrapper__cancel) {
  44. font-size: 20px !important;
  45. }
  46. .page {
  47. /* padding: 31px 31px 110px 31px; */
  48. box-sizing: border-box;
  49. /* background: var(--main-bg); */
  50. }
  51. html {
  52. font-size: 32px !important;
  53. }
  54. uni-page-body {
  55. height: 100%;
  56. }
  57. </style>