소스 검색

Input: el-input styles should override el-textarea

Leopoldthecoder 7 년 전
부모
커밋
86f8ff1160
4개의 변경된 파일52개의 추가작업 그리고 52개의 파일을 삭제
  1. 1 1
      examples/docs/en-US/upload.md
  2. 1 1
      examples/docs/es/upload.md
  3. 1 1
      examples/docs/zh-CN/upload.md
  4. 49 49
      packages/theme-chalk/src/input.scss

+ 1 - 1
examples/docs/en-US/upload.md

@@ -254,7 +254,7 @@ Use `list-type` to change the fileList style.
   :on-remove="handleRemove">
   <i class="el-icon-plus"></i>
 </el-upload>
-<el-dialog :visible.sync="dialogVisible" size="tiny">
+<el-dialog :visible.sync="dialogVisible">
   <img width="100%" :src="dialogImageUrl" alt="">
 </el-dialog>
 <script>

+ 1 - 1
examples/docs/es/upload.md

@@ -247,7 +247,7 @@ Utilice la propiedad `list-type` para cambiar el estilo a un listado de archivos
   :on-remove="handleRemove">
   <i class="el-icon-plus"></i>
 </el-upload>
-<el-dialog :visible.sync="dialogVisible" size="tiny">
+<el-dialog :visible.sync="dialogVisible">
   <img width="100%" :src="dialogImageUrl" alt="">
 </el-dialog>
 <script>

+ 1 - 1
examples/docs/zh-CN/upload.md

@@ -254,7 +254,7 @@
   :on-remove="handleRemove">
   <i class="el-icon-plus"></i>
 </el-upload>
-<el-dialog :visible.sync="dialogVisible" size="tiny">
+<el-dialog :visible.sync="dialogVisible">
   <img width="100%" :src="dialogImageUrl" alt="">
 </el-dialog>
 <script>

+ 49 - 49
packages/theme-chalk/src/input.scss

@@ -1,6 +1,55 @@
 @import "mixins/mixins";
 @import "common/var";
 
+@include b(textarea) {
+  display: inline-block;
+  width: 100%;
+  vertical-align: bottom;
+  font-size: $--font-size-base;
+
+  @include e(inner) {
+    display: block;
+    resize: vertical;
+    padding: 5px 15px;
+    line-height: 1.5;
+    box-sizing: border-box;
+    width: 100%;
+    font-size: inherit;
+    color: $--input-color;
+    background-color: $--input-fill;
+    background-image: none;
+    border: $--input-border;
+    border-radius: $--input-border-radius;
+    transition: $--border-transition-base;
+
+    &::placeholder {
+      color: $--input-placeholder-color;
+    }
+
+    &:hover {
+      border-color: $--input-hover-border;
+    }
+
+    &:focus {
+      outline: none;
+      border-color: $--input-focus-border;
+    }
+  }
+
+  @include when(disabled) {
+    .el-textarea__inner {
+      background-color: $--input-disabled-fill;
+      border-color: $--input-disabled-border;
+      color: $--input-disabled-color;
+      cursor: not-allowed;
+
+      &::placeholder {
+        color: $--input-disabled-placeholder-color;
+      }
+    }
+  }
+}
+
 @include b(input) {
   position: relative;
   font-size: $--font-size-base;
@@ -249,55 +298,6 @@
   }
 }
 
-@include b(textarea) {
-  display: inline-block;
-  width: 100%;
-  vertical-align: bottom;
-  font-size: $--font-size-base;
-
-  @include e(inner) {
-    display: block;
-    resize: vertical;
-    padding: 5px 15px;
-    line-height: 1.5;
-    box-sizing: border-box;
-    width: 100%;
-    font-size: inherit;
-    color: $--input-color;
-    background-color: $--input-fill;
-    background-image: none;
-    border: $--input-border;
-    border-radius: $--input-border-radius;
-    transition: $--border-transition-base;
-
-    &::placeholder {
-      color: $--input-placeholder-color;
-    }
-
-    &:hover {
-      border-color: $--input-hover-border;
-    }
-
-    &:focus {
-      outline: none;
-      border-color: $--input-focus-border;
-    }
-  }
-
-  @include when(disabled) {
-    .el-textarea__inner {
-      background-color: $--input-disabled-fill;
-      border-color: $--input-disabled-border;
-      color: $--input-disabled-color;
-      cursor: not-allowed;
-
-      &::placeholder {
-        color: $--input-disabled-placeholder-color;
-      }
-    }
-  }
-}
-
 /** disalbe default clear on IE */
 .el-input__inner::-ms-clear {
   display: none;