浏览代码

Dropdown: add focus method so it can be triggered when used with Popover and Tooltip (#10288)

杨奕 7 年之前
父节点
当前提交
259aeec369
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 3 0
      packages/dropdown/src/dropdown.vue
  2. 1 0
      packages/theme-chalk/src/pagination.scss

+ 3 - 0
packages/dropdown/src/dropdown.vue

@@ -237,6 +237,9 @@
           this.visible = false;
         }
         this.$emit('command', command, instance);
+      },
+      focus() {
+        this.triggerElm.focus && this.triggerElm.focus();
       }
     },
 

+ 1 - 0
packages/theme-chalk/src/pagination.scss

@@ -24,6 +24,7 @@
   .el-input__inner {
     text-align: center;
     -moz-appearance: textfield;
+    line-height: normal;
   }
 
   // pagesize 的下拉 icon