File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,6 @@ export default {
58
58
timer : null ,
59
59
60
60
beginThumbIndex : 0 ,
61
-
62
- docStyleOverflow : document && document . getElementsByTagName ( 'body' ) [ 0 ] . style . overflow ,
63
61
}
64
62
} ,
65
63
@@ -126,9 +124,9 @@ export default {
126
124
lightBoxOn ( value ) {
127
125
if ( document != null ) {
128
126
if ( value ) {
129
- document . getElementsByTagName ( 'body' ) [ 0 ] . style . overflow = 'hidden'
127
+ document . getElementsByTagName ( 'body' ) [ 0 ] . classList . add ( 'vue-lb-open' )
130
128
} else {
131
- document . getElementsByTagName ( 'body' ) [ 0 ] . style . overflow = this . docStyleOverflow
129
+ document . getElementsByTagName ( 'body' ) [ 0 ] . classList . remove ( 'vue-lb-open' )
132
130
}
133
131
}
134
132
} ,
Original file line number Diff line number Diff line change @@ -232,3 +232,7 @@ img.vue-lb-modal-image {
232
232
}
233
233
}
234
234
235
+ .vue-lb-open {
236
+ overflow : hidden;
237
+ }
238
+
You can’t perform that action at this time.
0 commit comments