Browse Source

ColorPicker: fix style when nested in form-item

Leopoldthecoder 8 years ago
parent
commit
907d3218b7

+ 1 - 0
examples/docs/zh-CN/notification.md

@@ -232,6 +232,7 @@ import { Notification } from 'element-ui';
 | customClass | 自定义类名 | string | — | — |
 | duration | 显示时间, 毫秒。设为 0 则不会自动关闭 | number | — | 4500 |
 | onClose | 关闭时的回调函数 | function | — | — |
+| onClick | 点击 Notification 时的回调函数 | function | — | — |
 | offset | 偏移的距离,在同一时刻,所有的 Notification 实例应当具有一个相同的偏移量 | number | — | 0 |
 
 ### 方法

+ 5 - 3
packages/theme-default/src/color-picker.css

@@ -201,6 +201,7 @@
   @component picker {
     display: inline-block;
     position: relative;
+    line-height: normal;
 
     @descendent trigger {
       display: inline-block;
@@ -216,7 +217,6 @@
       position: relative;
       display: inline-block;
       box-sizing: border-box;
-      vertical-align: middle;
       border: 1px solid #666;
       width: 22px;
       height: 22px;
@@ -238,14 +238,16 @@
     @descendent empty {
       font-size: 12px;
       vertical-align: middle;
-      margin-top: 4px;
       color: #666;
+      position: absolute;
+      top: 4px;
+      left: 4px;
     }
 
     @descendent icon {
       display: inline-block;
       position: relative;
-      vertical-align: middle;
+      top: -6px;
       margin-left: 8px;
       width: 12px;
       color: #888;