App.vue 1.22 KB
Newer Older
张罗鹏's avatar
张罗鹏 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <div class="content">
      <router-view/>
      </div>
    </div>
  </a-config-provider>
</template>
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
/* eslint-disable */
export default {
  name: 'App',
  data() {
    return {
        locale: zhCN,
        show:false,
        screenWidth: document.body.clientWidth, // 屏幕尺寸
    }
  },
  mounted () {
        const that = this
          window.addEventListener('resize',()=>{
            window.screenWidth = document.body.clientWidth
            that.screenWidth = window.screenWidth
            var news = document.documentElement;
            news.style.fontSize = that.screenWidth / 10 + 'px'
          });
          var news = document.documentElement;
          news.style.fontSize = that.screenWidth / 10 + 'px'
  },
}
/* eslint-enable */
</script>
<style lang="less">
body {
  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  &::-webkit-scrollbar-corner {
    background: rgb(200, 210, 224);
  }
  &::-webkit-scrollbar-thumb {
    background: #2397f6;
    border-radius: 10px;
  }
  &::-webkit-scrollbar-track {
    background: #f3f4f9;
    border-radius: 2px;
  }
}
</style>