Authored by 沈志敏

fix bug

... ... @@ -21,10 +21,10 @@
module.exports = {
props: {
'title': String,
'class': [String, Object, Array],
'fixed': Boolean,
'scrollFix': Boolean
title: String,
class: [String, Object, Array],
fixed: Boolean,
scrollFix: Boolean
},
methods: {
goBack() {
... ... @@ -36,7 +36,7 @@
<style>
.blk-header-wrap.ghost {
.blk-header {
background-color: rgba(255,255,255,0);
background-color: rgba(255, 255, 255, 0);
transition: 0.3s all;
border-bottom: 0;
}
... ... @@ -48,7 +48,7 @@
.blk-header-wrap.ghost-2 {
.blk-header {
background-color: rgba(255,255,255,0.4);
background-color: rgba(255, 255, 255, 0.4);
transition: 0.3s all;
border-bottom: 0;
}
... ... @@ -60,7 +60,7 @@
.blk-header-wrap.ghost-3 {
.blk-header {
background-color: rgba(255,255,255,0.7);
background-color: rgba(255, 255, 255, 0.7);
transition: 0.3s all;
border-bottom: 0;
}
... ...
... ... @@ -137,24 +137,24 @@
},
toggle() {
let ghost = true;
let ghost_2 = false;
let ghost_3 = false;
let ghost2 = false;
let ghost3 = false;
if (window.scrollY > 40) {
ghost = false;
ghost_2 = false;
ghost_3 = false;
ghost2 = false;
ghost3 = false;
} else if (window.scrollY > 25) {
ghost = false;
ghost_3 = true;
ghost3 = true;
} else if (window.scrollY > 10) {
ghost = false;
ghost_2 = true;
ghost2 = true;
}
this.$refs.header.$el.classList.toggle('ghost', ghost);
this.$refs.header.$el.classList.toggle('ghost-2', ghost_2);
this.$refs.header.$el.classList.toggle('ghost-3', ghost_3);
this.$refs.header.$el.classList.toggle('ghost-2', ghost2);
this.$refs.header.$el.classList.toggle('ghost-3', ghost3);
}
},
ready() {
... ...