Commit 8e3f84c3b76fbca11222cbede2441e83154127b6
1 parent
e3569b81
fix(style): fix layout style, fix #633
Showing
2 changed files
with
27 additions
and
31 deletions
src/layouts/default/header/MultipleHeader.vue
... | ... | @@ -50,42 +50,38 @@ |
50 | 50 | return unref(getFixed) || unref(getShowFullHeaderRef); |
51 | 51 | }); |
52 | 52 | |
53 | - const getWrapStyle = computed( | |
54 | - (): CSSProperties => { | |
55 | - const style: CSSProperties = {}; | |
56 | - if (unref(getFixed)) { | |
57 | - style.width = unref(getIsMobile) ? '100%' : unref(getCalcContentWidth); | |
58 | - } | |
59 | - if (unref(getShowFullHeaderRef)) { | |
60 | - style.top = `${HEADER_HEIGHT}px`; | |
61 | - } | |
62 | - return style; | |
53 | + const getWrapStyle = computed((): CSSProperties => { | |
54 | + const style: CSSProperties = {}; | |
55 | + if (unref(getFixed)) { | |
56 | + style.width = unref(getIsMobile) ? '100%' : unref(getCalcContentWidth); | |
63 | 57 | } |
64 | - ); | |
58 | + if (unref(getShowFullHeaderRef)) { | |
59 | + style.top = `${HEADER_HEIGHT}px`; | |
60 | + } | |
61 | + return style; | |
62 | + }); | |
65 | 63 | |
66 | 64 | const getIsFixed = computed(() => { |
67 | 65 | return unref(getFixed) || unref(getShowFullHeaderRef); |
68 | 66 | }); |
69 | 67 | |
70 | - const getPlaceholderDomStyle = computed( | |
71 | - (): CSSProperties => { | |
72 | - let height = 0; | |
73 | - if ( | |
74 | - (unref(getShowFullHeaderRef) || !unref(getSplit)) && | |
75 | - unref(getShowHeader) && | |
76 | - !unref(getFullContent) | |
77 | - ) { | |
78 | - height += HEADER_HEIGHT; | |
79 | - } | |
80 | - if (unref(getShowMultipleTab) && !unref(getFullContent)) { | |
81 | - height += TABS_HEIGHT; | |
82 | - } | |
83 | - headerHeightRef.value = height; | |
84 | - return { | |
85 | - height: `${height}px`, | |
86 | - }; | |
68 | + const getPlaceholderDomStyle = computed((): CSSProperties => { | |
69 | + let height = 0; | |
70 | + if ( | |
71 | + (unref(getShowFullHeaderRef) || !unref(getSplit)) && | |
72 | + unref(getShowHeader) && | |
73 | + !unref(getFullContent) | |
74 | + ) { | |
75 | + height += HEADER_HEIGHT; | |
87 | 76 | } |
88 | - ); | |
77 | + if (unref(getShowMultipleTab) && !unref(getFullContent)) { | |
78 | + height += TABS_HEIGHT; | |
79 | + } | |
80 | + headerHeightRef.value = height; | |
81 | + return { | |
82 | + height: `${height}px`, | |
83 | + }; | |
84 | + }); | |
89 | 85 | |
90 | 86 | const getClass = computed(() => { |
91 | 87 | return [ |
... | ... | @@ -116,7 +112,7 @@ |
116 | 112 | flex: 0 0 auto; |
117 | 113 | |
118 | 114 | &--dark { |
119 | - margin-left: 0; | |
115 | + margin-left: -1px; | |
120 | 116 | } |
121 | 117 | |
122 | 118 | &--fixed { | ... | ... |
src/layouts/default/header/index.less
... | ... | @@ -166,7 +166,7 @@ |
166 | 166 | |
167 | 167 | &--dark { |
168 | 168 | background-color: @header-dark-bg-color !important; |
169 | - border-bottom: 1px solid @border-color-base; | |
169 | + // border-bottom: 1px solid @border-color-base; | |
170 | 170 | border-left: 1px solid @border-color-base; |
171 | 171 | .@{header-prefix-cls}-logo { |
172 | 172 | &:hover { | ... | ... |