zhangzeli
2022-01-04 7ebd84a4ad1f6561f450d5e92d987d22924d59ec
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<template>
  <div id="main" class="app-main">
    <router-view></router-view>
  </div>
</template>
 
<script>
export default {
  data() {
    return {};
  },
  computed: {
    mainTheme() {
      return this.$store.state.theme.theme.mainTheme;
    },
  },
  mounted() {
    this.changeMode();
  },
  beforeDestroy() {},
  methods: {
    changeMode() {
      let v = this.mainTheme;
      if (v == "darkMode") {
        document.getElementsByTagName("body")[0].className = "darkMode";
      } else if (v == "weakMode") {
        document.getElementsByTagName("body")[0].className = "weakMode";
      } else {
        document.getElementsByTagName("body")[0].className = "";
      }
    },
  },
  watch: {
    mainTheme() {
      this.changeMode();
    },
  },
};
</script>
 
<style lang="less">
html,
body {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  /* overflow: hidden; */
}
 
.app-main {
  width: 100%;
  height: 100%;
}
 
.br button {
  margin-right: 8px;
}
 
.operation button {
  margin-right: 8px;
}
 
.operation .brr button {
  margin-right: 0px !important;
}
 
.ivu-btn-text:focus {
  box-shadow: none !important;
}
 
.ivu-tag {
  cursor: pointer;
}
 
.block-tool .ivu-tooltip,
.block-tool .ivu-tooltip-rel {
  display: block;
}
 
.block-pop .ivu-poptip,
.block-pop .ivu-poptip-rel {
  display: block;
}
 
.form-noheight {
  .ivu-form-item-content {
    line-height: unset !important;
  }
}
 
.modal-fullscreen {
  z-index: 1;
  position: absolute;
  right: 43px;
  top: 14px;
  overflow: hidden;
  cursor: pointer;
  .model-fullscreen-icon {
    font-size: 18px;
    color: #999;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
    position: relative;
    top: 1px;
    &:hover {
      color: #444;
    }
  }
}
 
.viewer-container {
  z-index: 2050 !important;
}
 
// 修改drawer层级 避免固定nav时遮挡
.ivu-drawer-mask,
.ivu-drawer-wrap {
  z-index: 1002;
}
 
.ivu-drawer-wrap-1 {
  z-index: 1003;
}
 
.ivu-drawer-wrap-2 {
  z-index: 1004;
}
 
// 修改Message层级
.ivu-message {
  z-index: 9999 !important;
}
 
// 修改Menu层级
.ivu-menu {
  z-index: 0;
}
 
// 暗黑
.darkMode {
  filter: invert(1) hue-rotate(180deg);
  transition: all 300ms;
  img,
  video {
    filter: invert(1) hue-rotate(180deg);
  }
}
 
// 色弱
.weakMode {
  touch-action: none;
  filter: invert(80%);
}
</style>