refactor: 优化layout

This commit is contained in:
wanchun 2022-03-01 11:27:56 +08:00
commit d8f327ab44

View File

@ -259,12 +259,12 @@ export default {
const currentFixedHeaderRef = computed( const currentFixedHeaderRef = computed(
() => props.fixedHeader || props.navigation === 'mixin' () => props.fixedHeader || props.navigation === 'mixin'
); );
const headerStyleRef = computed(() => (currentFixedHeaderRef.value ? { top: `${headerHeightRef.value}px` } : {})); const headerStyleRef = computed(() => (currentFixedHeaderRef.value ? { top: `${headerHeightRef.value}px` } : null));
const sideStyleRef = computed(() => (props.fixedSideBar const sideStyleRef = computed(() => (props.fixedSideBar
? { ? {
left: collapsedRef.value ? '48px' : `${props.sideWidth}px` left: collapsedRef.value ? '48px' : `${props.sideWidth}px`
} }
: {})); : null));
return { return {
headerRef, headerRef,
headerHeightRef, headerHeightRef,