瀏覽代碼

mod:顶部 调整

panqiuyao 8 月之前
父節點
當前提交
9211d07ecf
共有 1 個文件被更改,包括 13 次插入6 次删除
  1. 13 6
      frontend/src/components/header-bar/index.vue

+ 13 - 6
frontend/src/components/header-bar/index.vue

@@ -130,13 +130,12 @@ function closeWindow() {
   z-index: 100000;
   background: #fff;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  // padding: 0 10px;
 }
 
 .header-bar__menu {
+  position: absolute;
+  top: 0;
+  left: 0;
   display: flex;
   align-items: center;
 }
@@ -165,10 +164,15 @@ function closeWindow() {
 }
 
 .header-bar__title {
+  position: absolute;
+  top: 0;
+  left: 50%;
+  transform: translateX(-50%);
   display: flex;
+  height: 30px;
+  line-height: 30px;
   align-items: center;
-  justify-content: center; /* 居中显示标题 */
-  flex: 1; /* 占据剩余空间 */
+  justify-content: center;
 }
 
 .header-bar__logo {
@@ -184,6 +188,9 @@ function closeWindow() {
 }
 
 .header-bar__buttons {
+  position: absolute;
+  top: 0;
+  right: 0;
   display: flex;
   align-items: center;
 }