Skip to content

Commit 370c4ec

Browse files
authored
Merge pull request #99 from var-lu/master
perf: 首页故障风优化
2 parents 2078a83 + 1876a04 commit 370c4ec

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

blog-view/babel.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
2-
presets: [
3-
'@vue/cli-plugin-babel/preset'
4-
]
2+
presets: [ [ '@vue/app', { useBuiltIns: 'entry' } ] ]
3+
// presets: [
4+
// '@vue/cli-plugin-babel/preset'
5+
// ]
56
}

blog-view/src/components/index/Header.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<div class="bg3" :style="{backgroundImage:'url('+defaultSettings.bg3+')'}" v-show="loaded"></div>
88
</div>
99
<div class="text-malfunction" :data-word="defaultSettings.malfunctionText">
10+
{{ defaultSettings.malfunctionText }}
1011
<div class="line"></div>
1112
</div>
1213
<div class="wrapper">
@@ -128,19 +129,19 @@
128129
129130
.text-malfunction {
130131
position: absolute;
132+
padding: 0 4px;
131133
top: 40%;
132134
left: 51.5%;
133135
transform: translate(-50%, -50%) scale(2.5);
134-
width: 220px;
135136
font-size: 34px;
136137
font-family: sans-serif;
137138
color: transparent;
138139
}
139140
140141
.line {
141142
position: absolute;
142-
width: 200px;
143-
left: -1px;
143+
width: calc(100% - 8px);
144+
left: -0.5px;
144145
height: 1px;
145146
background: black;
146147
z-index: 50;
@@ -151,7 +152,7 @@
151152
content: attr(data-word);
152153
position: absolute;
153154
top: 0;
154-
height: 36px;
155+
line-height: 36px;
155156
overflow: hidden;
156157
filter: contrast(200%);
157158
}

0 commit comments

Comments
 (0)