App.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <div id="app">
  3. <router-view />
  4. <ws-common-loading v-if="isLoadding"></ws-common-loading>
  5. <!-- <rookie-training v-if="roles && roles.length"></rookie-training> -->
  6. </div>
  7. </template>
  8. <script>
  9. import { mapGetters } from 'vuex'
  10. import RookieTraining from '@/components/RookieTraining'
  11. import { EventBus } from 'base-core-lib'
  12. //
  13. export default {
  14. name: 'App',
  15. components: { RookieTraining },
  16. provide() {
  17. return {
  18. reload: this.reload // 将reload方法导出
  19. }
  20. },
  21. data() {
  22. return {
  23. isRouterAlive: true
  24. }
  25. },
  26. computed: {
  27. ...mapGetters(['isLoadding', 'roles'])
  28. },
  29. watch: {
  30. $route(to, from) {
  31. EventBus.$emit('routerCheck', { to, from })
  32. }
  33. },
  34. created() {
  35. if (window.location.host === 'winsea.com') {
  36. window.location.href = 'https://www.winsea.com'
  37. return
  38. }
  39. // EventBus.$emit('dayTheme')
  40. },
  41. mounted() {
  42. // setTimeout(() => {
  43. // 设置灰度模式
  44. // toggleGrayMode(true)
  45. // }, 2000);
  46. },
  47. methods: {
  48. reload() {
  49. // reload实现
  50. this.isRouterAlive = false
  51. this.$nextTick(function() {
  52. this.isRouterAlive = true
  53. })
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. #app {
  60. width: 100%;
  61. height: 100%;
  62. overflow: hidden;
  63. }
  64. .flex {
  65. display: flex;
  66. }
  67. .gird {
  68. display: gird;
  69. }
  70. .el-table th.gutter{
  71. display: table-cell!important;
  72. }
  73. .el-select-dropdown .el-scrollbar .el-scrollbar__wrap {
  74. overflow: scroll !important;
  75. }
  76. .el-table .el-scrollbar .el-scrollbar__wrap {
  77. overflow: scroll !important;
  78. }
  79. ::-webkit-scrollbar {
  80. width: 10px !important;
  81. height: 10px !important;
  82. }
  83. ::-webkit-scrollbar-thumb {
  84. height: 8px !important;
  85. background: #dadce7;
  86. border-radius: 4px !important;
  87. }
  88. ::-webkit-scrollbar-track-piece {
  89. background: #f9fafe !important;
  90. }
  91. .el-button--primary{
  92. background-color: #5878e8;
  93. border-color: #5878e8;
  94. }
  95. input::-webkit-outer-spin-button,
  96. input::-webkit-inner-spin-button {
  97. -webkit-appearance: none !important;
  98. }
  99. input[type='number'] {
  100. -moz-appearance: textfield !important;
  101. }
  102. .el-input.is-disabled .el-input__inner{
  103. background: #f9FAFC!important;
  104. color: #8890B1!important;
  105. }
  106. </style>