Procházet zdrojové kódy

优化表单在pc和移动端行间距不一致的问题

zhontai před 2 roky
rodič
revize
cd64a6414c
3 změnil soubory, kde provedl 15 přidání a 4 odebrání
  1. 1 1
      src/theme/index.scss
  2. 12 0
      src/theme/my-app.scss
  3. 2 3
      src/theme/my-element.scss

+ 1 - 1
src/theme/index.scss

@@ -5,6 +5,6 @@
 @import './media/media.scss';
 @import './waves.scss';
 @import './dark.scss';
-@import './my-app.scss';
 @import './my-element.scss';
 @import './my-flex.scss';
+@import './my-app.scss';

+ 12 - 0
src/theme/my-app.scss

@@ -16,6 +16,18 @@
   margin-bottom: 0px !important;
 }
 
+.el-form .el-col.mb20 {
+  margin-bottom: 20px !important;
+}
+
+@media only screen and (max-width: 768px) {
+  .el-form .el-col .el-form-item .el-form-item__label {
+    height: unset;
+    line-height: unset;
+    margin-bottom: 5px;
+  }
+}
+
 /* 文字省略
 ------------------------------- */
 @for $i from 1 through 5 {

+ 2 - 3
src/theme/my-element.scss

@@ -3,9 +3,8 @@
 /* Form 表单
 ------------------------------- */
 .el-form {
-  // 用于修改弹窗时表单内容间隔太大问题,如系统设置的新增菜单弹窗里的表单内容
-  .el-form-item:last-of-type {
-    margin-bottom: 18px !important;
+  .el-col {
+    margin-bottom: 20px !important;
   }
 }