Skip to content

Commit 8e3f84c

Browse files
committed
fix(style): fix layout style, fix #633
1 parent e3569b8 commit 8e3f84c

File tree

2 files changed

+27
-31
lines changed

2 files changed

+27
-31
lines changed

src/layouts/default/header/MultipleHeader.vue

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,42 +50,38 @@
5050
return unref(getFixed) || unref(getShowFullHeaderRef);
5151
});
5252
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);
6357
}
64-
);
58+
if (unref(getShowFullHeaderRef)) {
59+
style.top = `${HEADER_HEIGHT}px`;
60+
}
61+
return style;
62+
});
6563
6664
const getIsFixed = computed(() => {
6765
return unref(getFixed) || unref(getShowFullHeaderRef);
6866
});
6967
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;
8776
}
88-
);
77+
if (unref(getShowMultipleTab) && !unref(getFullContent)) {
78+
height += TABS_HEIGHT;
79+
}
80+
headerHeightRef.value = height;
81+
return {
82+
height: `${height}px`,
83+
};
84+
});
8985
9086
const getClass = computed(() => {
9187
return [
@@ -116,7 +112,7 @@
116112
flex: 0 0 auto;
117113
118114
&--dark {
119-
margin-left: 0;
115+
margin-left: -1px;
120116
}
121117
122118
&--fixed {

src/layouts/default/header/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166

167167
&--dark {
168168
background-color: @header-dark-bg-color !important;
169-
border-bottom: 1px solid @border-color-base;
169+
// border-bottom: 1px solid @border-color-base;
170170
border-left: 1px solid @border-color-base;
171171
.@{header-prefix-cls}-logo {
172172
&:hover {

0 commit comments

Comments
 (0)