zxl
2026-03-25 19dd419f262406bc9fa1f09d731a1f44aebd8505
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
55
56
57
58
59
60
<template>
  <a-config-provider :locale="locale" :autoInsertSpaceInButton="false">
    <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 '@tievd/cube-block/lib/utils/device'
 
export default {
  data() {
    return {
      locale: zhCN,
    }
  },
  created() {
    let that = this
    enquireScreen((deviceType) => {
      switch (deviceType) {
        case 'MOBILE':
          // 手机 screen and (max-width: 767.99px)
          that.$store.commit('TOGGLE_DEVICE', 'mobile')
          that.$store.dispatch('setSidebar', false)
          break
        case 'TABLET':
          // 平板 screen and (max-width: 1087.99px)
          that.$store.commit('TOGGLE_DEVICE', 'mobile')
          that.$store.dispatch('setSidebar', false)
          break
        case 'DESKTOP':
          // 桌面
          that.$store.commit('TOGGLE_DEVICE', 'desktop')
          that.$store.dispatch('setSidebar', true)
          break
      }
    })
  },
}
</script>
<style>
#app {
  height: 100%;
}
.ant-menu-submenu > .ant-menu {
  background: linear-gradient(0deg, #20252f, #11141a);
  margin-left: 20px;
}
.ant-table-tbody > tr > td,
.ant-table-thead > tr > th {
  border-bottom: 1px solid #343a44;
}
.ant-table-thead > tr > th {
  background: rgba(38, 43, 53, 0.6);
}
.ant-table-row{
  line-height: 2.5;
}
</style>