mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-03 20:58:09 +08:00
Fix
This commit is contained in:
parent
5dbad821da
commit
9956896401
@ -259,7 +259,7 @@
|
|||||||
scroll(() => {
|
scroll(() => {
|
||||||
if (this.isHome) {
|
if (this.isHome) {
|
||||||
const threshold = 200;
|
const threshold = 200;
|
||||||
let alpha = Math.min(document.body.scrollTop, threshold) / threshold;
|
let alpha = Math.min((document.documentElement.scrollTop || document.body.scrollTop), threshold) / threshold;
|
||||||
this.$refs.header.style.backgroundColor = `rgba(32, 160, 255, ${ alpha })`;
|
this.$refs.header.style.backgroundColor = `rgba(32, 160, 255, ${ alpha })`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user