<!--
 * @Author: wt 1241351815@qq.com
 * @Date: 2022-04-25 10:21:18
 * @LastEditors: wt 1241351815@qq.com
 * @LastEditTime: 2022-05-12 18:36:47
 * @FilePath: \securityHtml\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div id="app" @mouseenter="mouseenter()" @mouseout="mouseout()">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  data(){
    return{
      adh:{}
    }
  },
  methods: {
    mouseenter(){
      clearTimeout(this.adh);
      this.timeout();
    },
    mouseout(){
      clearTimeout(this.adh);
      this.timeout();
    },
    timeout(){
      this.adh = setTimeout(()=>{
        localStorage.clear();
        this.$store.dispatch('logout').then(() => {
          this.$router.push('/login')
        }).catch(err => {
          this.$message.error(err); //登录失败提示错误
        });
      },1000*60*15)
    }
  }
}
</script>
<style>
::-webkit-scrollbar-track-piece {
    background: #fff;
  }

::-webkit-scrollbar {
    width: 4px;
  }

  ::-webkit-scrollbar-thumb {
    background: #D7000F;
    border-radius: 20px;
  }
  .el-dialog .el-form-item{
    width:auto !important;
  }

  .el-input__inner{
  height:28px !important;
  line-height: 28px !important;
}
.el-input-number--small{
  height:26px !important;
  line-height: 26px !important;
}
.el-textarea .el-input__count,.el-input .el-input__count .el-input__count-inner{
  font-size: 8px;
  height: 12px;
  line-height: 12px;
  background: transparent !important
}

.el-input-number--medium{
  width:auto;
  line-height:28px;
}
.el-input-number.is-controls-right[class*=medium] [class*=increase], .el-input-number.is-controls-right[class*=medium] [class*=decrease] {
    line-height: 13px;
}
/* .el-textarea .el-input__count, .el-input .el-input__count .el-input__count-inner{
  margin-top:4px;
} */
.el-dialog .el-form-item__content, .el-dialog .el-form-item__label{
  line-height: 40px;
}

.el-input-number.is-controls-right[class*=medium] [class*=increase], .el-input-number.is-controls-right[class*=medium] [class*=decrease]{
  line-height:13px;
}


/* 下拉框底部颜色 */
::-webkit-scrollbar-track-piece{
background: transparent !important;
}
</style>
<style>
/* 时间选择器图标位置 */
.el-input__prefix{
  margin-top:0px !important;
}
/* 页面下拉框箭头 */
.el-select .el-input .el-select__caret{
  display: block;
  margin-top:-2px;
}
/* 页面弹框input间距 */
.roleDialog .el-dialog .el-form-item{
  margin:10px auto;
}
/* 数字加减图标位置 */
.el-input-number{
  line-height: 28px !important;
}
.el-input-number.is-controls-right .el-input-number__increase, .el-input-number.is-controls-right .el-input-number__decrease{
  line-height:10px;
}
/* 部门框高度 */
.vue-treeselect--searchable .vue-treeselect__input-container{
  height:28px !important;
  line-height: 20px !important;
}
.vue-treeselect__control{
  height:28px !important;
  margin-top:4px;
}

.vue-treeselect__placeholder, .vue-treeselect__single-value{
  top:-2px !important;
}
.filter-item .el-select .el-input .el-select__caret{
  margin-top:1px !important;
}
.el-tree-node__content{
  background: none !important;
}
.el-form-item{
   margin-bottom:20px !important;
 }
.el-form-item__error{
  top:95%;
}
</style>
