瀏覽代碼

feature/header样式

dy 1 年之前
父節點
當前提交
340b14ec20
共有 1 個文件被更改,包括 11 次插入9 次删除
  1. 11 9
      src/layout/components/header.vue

+ 11 - 9
src/layout/components/header.vue

@@ -26,7 +26,7 @@
           <img v-if="headUrl" :src="headUrl" alt="" @click="showClick" />
           <svg-icon v-else icon-class="head" size="48" @click="showClick" />
           <template #dropdown>
-            <el-dropdown-menu>
+            <el-dropdown-menu style="width: 150px">
               <el-dropdown-item command="a">Action 1</el-dropdown-item>
               <el-dropdown-item command="b" divided>退出登录</el-dropdown-item>
               <el-dropdown-item command="c" divided>Action 3</el-dropdown-item>
@@ -92,6 +92,16 @@ const handleCommand = (command: string | number | object) => {
 </script>
 
 <style lang="scss" scoped>
+:deep(.el-dropdown-menu__item) {
+  height: 60px;
+}
+
+:deep(.el-dropdown-menu__item) {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
 .commonHeader {
   height: $navbar-height;
   width: 100%;
@@ -163,14 +173,6 @@ const handleCommand = (command: string | number | object) => {
   }
 }
 
-:deep(.el-popper) {
-  width: 400px !important;
-  background: #red;
-  box-shadow: 0px 0px 29px 4px rgba(0, 0, 0, 0.25);
-  border-radius: 30px;
-  overflow: hidden;
-}
-
 //:deep(.el-dropdown-menu__item) {
 //  width: 200px;
 //  height: 80px;