Add body 100% width for the preview, refactor the modalActivated watcher, use body scroll lock for the setting tab content
This commit is contained in:
parent
dac075c61a
commit
61dd1a3b49
4 changed files with 11 additions and 9 deletions
|
|
@ -38,17 +38,14 @@ const SettingsModal = {
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
// This is the only way to access the <html> element.
|
||||
modalActivated (newValue) {
|
||||
let html = document.querySelector('html')
|
||||
if (!html) return
|
||||
if (newValue) {
|
||||
let html = document.querySelector('html')
|
||||
if (html) {
|
||||
html.classList.add('settings-modal-layout')
|
||||
}
|
||||
html.classList.add('settings-modal-layout')
|
||||
} else {
|
||||
let html = document.querySelector('html')
|
||||
if (html) {
|
||||
html.classList.remove('settings-modal-layout')
|
||||
}
|
||||
html.classList.remove('settings-modal-layout')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue