Explorar el Código

修复表单上面的按钮样式打包之后变异的问题

ZGC4846 hace 2 días
padre
commit
2490f0a3a1
Se han modificado 2 ficheros con 42 adiciones y 6 borrados
  1. 33 3
      src/styles/hr-list-standard.scss
  2. 9 3
      src/styles/views/offerNotify/index.scss

+ 33 - 3
src/styles/hr-list-standard.scss

@@ -27,6 +27,20 @@ $hr-list-pages: (
   ".asa-page"
 );
 
+/* 乾坤主应用常给 button/span 设 1.5+ 行高,生产环境按钮文字会偏下 */
+.ele-body .el-button {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  line-height: 1;
+
+  > span,
+  > i,
+  [class*="el-icon-"] {
+    line-height: 1;
+  }
+}
+
 @each $root in $hr-list-pages {
   /* 搜索标签恢复默认右对齐,贴着输入框,避免固定宽度把间距拉开 */
   #{$root} .ele-form-search .el-form-item__label,
@@ -62,22 +76,38 @@ $hr-list-pages: (
     height: 28px;
     padding: 0 12px;
     font-size: 12px;
-    line-height: 26px;
+    line-height: 1;
+    display: inline-flex;
+    align-items: center;
+    justify-content: center;
+    box-sizing: border-box;
+
+    > span,
+    > i,
+    [class*="el-icon-"] {
+      line-height: 1;
+    }
   }
 
   #{$root} .el-table th.el-table__cell {
     height: 28px !important;
     padding: 0 !important;
     font-size: 14px !important;
-    line-height: 28px !important;
+    line-height: 1 !important;
     font-weight: 500 !important;
   }
 
   #{$root} .el-table th.el-table__cell > .cell {
     height: 28px !important;
-    line-height: 28px !important;
+    line-height: 1 !important;
     padding-top: 0 !important;
     padding-bottom: 0 !important;
+    display: flex;
+    align-items: center;
+  }
+
+  #{$root} .el-table th.el-table__cell.is-center > .cell {
+    justify-content: center;
   }
 
   #{$root} .el-table .el-link + .el-link {

+ 9 - 3
src/styles/views/offerNotify/index.scss

@@ -3,26 +3,32 @@
   height: 28px;
   padding: 0 12px;
   font-size: 12px;
-  line-height: 26px;
+  line-height: 1;
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
 }
 
 .offer-table ::v-deep th.el-table__cell {
   height: 28px;
   padding: 0;
   font-size: 14px;
-  line-height: 28px;
+  line-height: 1;
 }
 
 .offer-table ::v-deep th.el-table__cell > .cell {
   height: 28px;
   padding: 0 8px;
-  line-height: 28px;
+  line-height: 1;
+  display: flex;
+  align-items: center;
   text-align: left;
 }
 
 .offer-table ::v-deep th.el-table__cell.is-center > .cell,
 .offer-table ::v-deep td.el-table__cell.is-center > .cell {
   text-align: center;
+  justify-content: center;
 }
 
 .offer-table ::v-deep .el-link + .el-link {