App.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <script setup lang="ts">
  2. // This starter template is using Vue 3 <script setup> SFCs
  3. // Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
  4. import qs from 'query-string'
  5. const parseSearch: any = qs.parse(location.search)
  6. const hashSearch = location.href.split('#/')[1]
  7. const hashParams = qs.parse(hashSearch.split('?')[1])
  8. const roomUid: string = parseSearch.roomUid || hashParams.roomUid || ''
  9. // 如果房间号的值时则替换
  10. if(roomUid) {
  11. sessionStorage.setItem('roomUid', roomUid)
  12. }
  13. </script>
  14. <template>
  15. <router-view v-slot="{ Component }">
  16. <component :is="Component" />
  17. </router-view>
  18. </template>
  19. <style lang="less">
  20. #app {
  21. font-family: Avenir, Helvetica, Arial, sans-serif;
  22. -webkit-font-smoothing: antialiased;
  23. -moz-osx-font-smoothing: grayscale;
  24. // text-align: center;
  25. color: #2c3e50;
  26. }
  27. * {
  28. margin: 0;
  29. padding: 0;
  30. touch-action: none !important;
  31. }
  32. [v-cloak] {
  33. display: none !important;
  34. }
  35. body {
  36. background-color: #eef4f9 !important;
  37. }
  38. ::-webkit-scrollbar {
  39. width: 8px; /* 纵向滚动条*/
  40. height: 8px; /* 横向滚动条 */
  41. background-color: #fff;
  42. }
  43. /*定义滚动条轨道 内阴影*/
  44. ::-webkit-scrollbar-track {
  45. -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0);
  46. background-color: #fff;
  47. }
  48. /*定义滑块 内阴影*/
  49. ::-webkit-scrollbar-thumb {
  50. -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0);
  51. background-color: #d5d5d5;
  52. }
  53. </style>