App.vue 1.1 KB

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