calcOverflow

This commit is contained in:
itorr
2022-08-15 13:40:46 +08:00
parent c1e6e87048
commit c7a037c226
2 changed files with 15 additions and 2 deletions

View File

@@ -259,6 +259,12 @@ app = new Vue({
this.diff = true;
document.activeElement = null;
},
calcOverflow(){
const { loading,output } = this;
const hidden = !!(loading || output);
const el = document.documentElement;
el.setAttribute('data-no-scroll',hidden);
}
},
computed: {
@@ -278,12 +284,14 @@ app = new Vue({
handler(){
this._louvre();
}
}
},
loading:'calcOverflow',
output:'calcOverflow',
}
});
app.calcOverflow();
setTimeout(_=>{

View File

@@ -223,6 +223,9 @@ input[type="range"]{
} */
h1{
}
html[data-no-scroll="true"]{
overflow: hidden;
}
.ui-shadow{
position: fixed;
@@ -233,6 +236,8 @@ h1{
z-index:1;
background:rgba(0,0,0,.5);
overflow: auto;
overflow-y: scroll;
overscroll-behavior: contain;
}
.output-box{
background:#FFF;