mirror of
https://github.com/itorr/one-last-image.git
synced 2026-01-02 20:06:03 +08:00
calcOverflow
This commit is contained in:
@@ -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(_=>{
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user