App.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!--
  2. * @Author: wt 1241351815@qq.com
  3. * @Date: 2022-04-25 10:21:18
  4. * @LastEditors: wt 1241351815@qq.com
  5. * @LastEditTime: 2022-05-12 18:36:47
  6. * @FilePath: \securityHtml\src\App.vue
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. -->
  9. <template>
  10. <div id="app" @mouseenter="mouseenter()" @mouseout="mouseout()">
  11. <router-view />
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'App',
  17. data(){
  18. return{
  19. adh:{}
  20. }
  21. },
  22. methods: {
  23. mouseenter(){
  24. clearTimeout(this.adh);
  25. this.timeout();
  26. },
  27. mouseout(){
  28. clearTimeout(this.adh);
  29. this.timeout();
  30. },
  31. timeout(){
  32. this.adh = setTimeout(()=>{
  33. localStorage.clear();
  34. this.$store.dispatch('logout').then(() => {
  35. this.$router.push('/login')
  36. }).catch(err => {
  37. this.$message.error(err); //登录失败提示错误
  38. });
  39. },1000*60*15)
  40. }
  41. }
  42. }
  43. </script>
  44. <style>
  45. ::-webkit-scrollbar-track-piece {
  46. background: #fff;
  47. }
  48. ::-webkit-scrollbar {
  49. width: 4px;
  50. }
  51. ::-webkit-scrollbar-thumb {
  52. background: #D7000F;
  53. border-radius: 20px;
  54. }
  55. .el-dialog .el-form-item{
  56. width:auto !important;
  57. }
  58. .el-input__inner{
  59. height:28px !important;
  60. line-height: 28px !important;
  61. }
  62. .el-input-number--small{
  63. height:26px !important;
  64. line-height: 26px !important;
  65. }
  66. .el-textarea .el-input__count,.el-input .el-input__count .el-input__count-inner{
  67. font-size: 8px;
  68. height: 12px;
  69. line-height: 12px;
  70. background: transparent !important
  71. }
  72. .el-input-number--medium{
  73. width:auto;
  74. line-height:28px;
  75. }
  76. .el-input-number.is-controls-right[class*=medium] [class*=increase], .el-input-number.is-controls-right[class*=medium] [class*=decrease] {
  77. line-height: 13px;
  78. }
  79. /* .el-textarea .el-input__count, .el-input .el-input__count .el-input__count-inner{
  80. margin-top:4px;
  81. } */
  82. .el-dialog .el-form-item__content, .el-dialog .el-form-item__label{
  83. line-height: 40px;
  84. }
  85. .el-input-number.is-controls-right[class*=medium] [class*=increase], .el-input-number.is-controls-right[class*=medium] [class*=decrease]{
  86. line-height:13px;
  87. }
  88. /* 下拉框底部颜色 */
  89. ::-webkit-scrollbar-track-piece{
  90. background: transparent !important;
  91. }
  92. </style>
  93. <style>
  94. /* 时间选择器图标位置 */
  95. .el-input__prefix{
  96. margin-top:0px !important;
  97. }
  98. /* 页面下拉框箭头 */
  99. .el-select .el-input .el-select__caret{
  100. display: block;
  101. margin-top:-2px;
  102. }
  103. /* 页面弹框input间距 */
  104. .roleDialog .el-dialog .el-form-item{
  105. margin:10px auto;
  106. }
  107. /* 数字加减图标位置 */
  108. .el-input-number{
  109. line-height: 28px !important;
  110. }
  111. .el-input-number.is-controls-right .el-input-number__increase, .el-input-number.is-controls-right .el-input-number__decrease{
  112. line-height:10px;
  113. }
  114. /* 部门框高度 */
  115. .vue-treeselect--searchable .vue-treeselect__input-container{
  116. height:28px !important;
  117. line-height: 20px !important;
  118. }
  119. .vue-treeselect__control{
  120. height:28px !important;
  121. margin-top:4px;
  122. }
  123. .vue-treeselect__placeholder, .vue-treeselect__single-value{
  124. top:-2px !important;
  125. }
  126. .filter-item .el-select .el-input .el-select__caret{
  127. margin-top:1px !important;
  128. }
  129. .el-tree-node__content{
  130. background: none !important;
  131. }
  132. </style>