修复设置意外被更改的问题

This commit is contained in:
lyswhut
2022-03-08 18:20:09 +08:00
parent 5e291255bb
commit 3ad4584159
5 changed files with 13 additions and 8 deletions
@@ -166,7 +166,7 @@ export default {
&.fullscreen {
.header {
-webkit-app-region: no-drag;
.close, .min {
> * {
display: none;
}
}
+6 -5
View File
@@ -8,7 +8,7 @@ import {
toRaw,
useCommit,
onBeforeUnmount,
watchEffect,
watch,
useRefGetter,
} from '@renderer/utils/vueTools'
@@ -43,12 +43,13 @@ export default ({
}) => {
const setSetting = useCommit('setSetting')
const windowSizeActive = useRefGetter('windowSizeActive')
const isShowAnimation = useRefGetter('isShowAnimation')
watchEffect(() => {
document.documentElement.style.fontSize = windowSizeActive.value.fontSize
watch(windowSizeActive, ({ fontSize }) => {
document.documentElement.style.fontSize = fontSize
})
watchEffect(() => {
if (setting.value.isShowAnimation) {
watch(isShowAnimation, val => {
if (val) {
if (document.body.classList.contains('disableAnimation')) {
document.body.classList.remove('disableAnimation')
}
+3
View File
@@ -59,4 +59,7 @@ export default {
pactModalVisible(state) {
return !state.setting.isAgreePact
},
isShowAnimation(state) {
return state.setting.isShowAnimation
},
}
+2 -1
View File
@@ -208,7 +208,8 @@ export default {
window.removeEventListener('resize', this.handleSetTagWidth)
},
handleSetTagWidth() {
setTimeout(this.setTagListWidth)
this.setTagListWidth()
setTimeout(this.setTagListWidth, 100)
},
handle_key_backspace_down({ event }) {
if (!this.isVisibleListDetail ||