<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view />
    </div>
  </a-config-provider>
</template>
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import enquireScreen from '@/utils/device'
// Fontclass模式
import '@/components/iconfont/common.less'
//自定义图表
import '@/components/iconfont2/common.less'

export default {
  data () {
    return {
      locale: zhCN,
    }
  },
  created () {
    let that = this
    enquireScreen(deviceType => {
      // tablet
      if (deviceType === 0) {
        that.$store.commit('TOGGLE_DEVICE', 'mobile')
        that.$store.dispatch('setSidebar', false)
      }
      // mobile
      else if (deviceType === 1) {
        that.$store.commit('TOGGLE_DEVICE', 'mobile')
        that.$store.dispatch('setSidebar', false)
      }
      else {
        that.$store.commit('TOGGLE_DEVICE', 'desktop')
        that.$store.dispatch('setSidebar', true)
      }

    })
  },
}
</script>
<style lang="less">
@import '../public/color.less';
#app {
  height: 100%;
}
::-webkit-scrollbar-thumb {
  /*  */
  border-radius: 9px 9px 9px 9px;
}

/* ::selection {
  background: red !important;
  color: #555;
}
::-moz-selection {
  background: red !important;
  color: #555;
}

::-webkit-selection {
  background: red !important;
  color: #555;
} */
</style>