<template>
  <el-config-provider :locale="locale">
    <router-view></router-view>
  </el-config-provider>
</template>

<script>
import {defineComponent} from 'vue'
import locale from 'element-plus/lib/locale/lang/zh-cn'
import {useStore} from 'vuex'

export default defineComponent({
  name: 'App',
  setup() {
    const store = useStore()
    let windowSize = getWindowSize()
    store.commit('app/setWindowSize', windowSize)
    store.commit('app/setJdt', {
      title: '数据上传',
      isOpen: false,
      abnormalClosing: false,
    })

    window.onresize = () => {
      store.commit('app/setWindowSize', getWindowSize())
    }

    return {
      locale,
    }
  },
})

function getWindowSize() {
  const w = window.innerWidth
  const h = window.innerHeight - 96
  return {w, h}
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  width: 100%;
  height: 100vh;
  font-size: 13px;
}

.ellipsis-text {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.sex-icon {
  width: 15px;
  height: 15px;
}

.el-table .cell {
  padding-left: 4px;
  padding-right: 4px;
}

.el-header {
  padding: 0 14px;
}

.el-main {
  padding: 0 14px;
}

.el-table__body tr.current-row > td,
.el-table--striped .el-table__body tr.el-table__row--striped.current-row td {
  background-color: #a7d3ff !important;
}

.el-input.is-disabled .el-input__inner {
  color: blue;
}

.icon-shangxiatuodong {
  cursor: move;
  font-size: 12px;
}

.shangxiatuodong {
  cursor: move;
}

.eltable .el-checkbox__inner {
  width: 16px;
  height: 16px;
  border: 2px solid #000;
  border-radius: 4px;
}

.axios-loading2 {
  animation: axiosloading 2s;
  background-image: url('/src/assets/images/loading.gif');
  -webkit-background-image: url('/src/assets/images/loading.gif');
  background-repeat: no-repeat;
  background-position: center;
}

@keyframes axiosloading {
  0% {
    opacity: 0;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
</style>
