App.vue 1.6 KB

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