mirror of https://github.com/ElemeFE/element
Carbon: fix scrollbar style in safari & ff
parent
8ad7dda6c5
commit
5069718c4f
|
@ -7,7 +7,13 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: hidden;
|
font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif;
|
||||||
|
font-weight: 400;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
|
||||||
|
&.is-component {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
|
@ -22,6 +28,7 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: auto;
|
min-height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerWrapper {
|
.headerWrapper {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -36,13 +43,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif;
|
|
||||||
overflow: auto;
|
|
||||||
font-weight: 400;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
|
@ -476,7 +476,7 @@
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
function scroll(fn) {
|
function scroll(fn) {
|
||||||
document.body.addEventListener('scroll', fn, false);
|
window.addEventListener('scroll', fn, false);
|
||||||
}
|
}
|
||||||
scroll(() => {
|
scroll(() => {
|
||||||
if (this.isHome) {
|
if (this.isHome) {
|
||||||
|
|
|
@ -241,6 +241,10 @@
|
||||||
this.componentScrollBox = this.componentScrollBar.$el.querySelector('.el-scrollbar__wrap');
|
this.componentScrollBox = this.componentScrollBar.$el.querySelector('.el-scrollbar__wrap');
|
||||||
this.throttledScrollHandler = throttle(300, this.handleScroll);
|
this.throttledScrollHandler = throttle(300, this.handleScroll);
|
||||||
this.componentScrollBox.addEventListener('scroll', this.throttledScrollHandler);
|
this.componentScrollBox.addEventListener('scroll', this.throttledScrollHandler);
|
||||||
|
document.body.classList.add('is-component');
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
document.body.classList.remove('is-component');
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.componentScrollBox.removeEventListener('scroll', this.throttledScrollHandler);
|
this.componentScrollBox.removeEventListener('scroll', this.throttledScrollHandler);
|
||||||
|
|
Loading…
Reference in New Issue