标题样式修改

main
jn517618 2 years ago
parent 7a6de5f54b
commit 3ae0444941
  1. 33
      src/views/energySources/component/header.vue

@ -21,13 +21,12 @@
</div>
<div class="htitle">
<div class="htitle-t">
<div class="htitle-t" :style="{ fontSize: divFontSize }">
{{ deptName }}实业公司能耗监测系统
{{ deptName }}能耗监测系统
</div>
<div class="htitle-b">
{{deptName }}实业公司能耗监测系统
<div class="htitle-b" :style="{ fontSize: divFontSize }">
{{ deptName }}能耗监测系统
</div>
</div>
</div>
@ -49,12 +48,27 @@ export default {
timeFun: null,
temp: '',
text: '',
divFontSize: "0.32rem",
};
},
computed: {
...mapGetters(["userInfo", "permission"]),
...mapGetters(["userInfo", "permission"])
},
created() {
if (this.deptName.length <= 12) {
this.divFontSize = "0.32rem"
}
if (this.deptName.length == 13) {
this.divFontSize = "0.3rem"
}
if (this.deptName.length == 14) {
this.divFontSize = "0.29rem"
}
if (this.deptName.length == 15) {
this.divFontSize = "0.28rem"
}
getWeather().then(res => {
this.temp = res.data.now.temp
this.text = res.data.now.text
@ -122,9 +136,10 @@ export default {
.htitle {
position: absolute;
top: 0.18rem;
left: 7.2rem;
width: 4.82rem;
left: 6.64rem;
width: 5.9rem;
height: 0.46rem;
line-height: 0.46rem;
.htitle-t {
position: absolute;
@ -133,7 +148,6 @@ export default {
width: 100%;
height: 100%;
text-align: center;
font-size: 0.3rem;
font-family: Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
@ -147,7 +161,6 @@ export default {
position: absolute;
text-align: center;
font-size: 0.3rem;
font-family: Microsoft YaHei;
font-weight: bold;
color: rgba(0, 0, 0, 0);

Loading…
Cancel
Save