fix: fix the problem of blank bar when toggle the TagsView component

master
Snoword 4 years ago
parent 61e0e33c64
commit b1d9771c75

@ -3,6 +3,7 @@ import { ElSwitch } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { computed, ref, watch } from 'vue' import { computed, ref, watch } from 'vue'
import { setCssVar } from '@/utils'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
@ -59,6 +60,8 @@ const localeChange = (show: boolean) => {
const tagsView = ref(appStore.getTagsView) const tagsView = ref(appStore.getTagsView)
const tagsViewChange = (show: boolean) => { const tagsViewChange = (show: boolean) => {
//
setCssVar('--tags-view-height', show ? '35px' : '0px')
appStore.setTagsView(show) appStore.setTagsView(show)
} }

Loading…
Cancel
Save