dropdown split button prop size

pull/364/head
baiyaaaaa 2016-10-12 20:27:51 +08:00
parent da4097fd67
commit d8eebafbdc
2 changed files with 7 additions and 7 deletions

View File

@ -152,7 +152,8 @@
### Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|------------- |---------------- |---------------- |---------------------- |-------- |
| type | 菜单按钮类型,同 Button 组件 | string | — | — |
| type | 菜单按钮类型,同 Button 组件(只在`split-button`为 true 的情况下有效) | string | — | — |
| size | 菜单按钮尺寸,同 Button 组件(只在`split-button`为 true 的情况下有效) | string | hover, click | hover |
| split-button | 下拉触发元素呈现为按钮组 | boolean | — | false |
| menu-align | 菜单水平对齐方向 | string | start, end | end |
| trigger | 触发下拉的行为 | string | hover, click | hover |

View File

@ -18,9 +18,8 @@
type: String,
default: 'end'
},
type: {
type: String
},
type: String,
size: String,
splitButton: Boolean
},
@ -83,7 +82,7 @@
},
render(h) {
let { hide, splitButton, type } = this;
let { hide, splitButton, type, size } = this;
var handleClick = _ => {
this.$emit('click');
@ -92,10 +91,10 @@
let triggerElm = !splitButton
? this.$slots.default
: (<el-button-group>
<el-button type={type} nativeOn-click={handleClick}>
<el-button type={type} size={size} nativeOn-click={handleClick}>
{this.$slots.default}
</el-button>
<el-button ref="trigger" type={type} class="el-dropdown__icon-button">
<el-button ref="trigger" type={type} size={size} class="el-dropdown__icon-button">
<i class="el-dropdown__icon el-icon-caret-bottom"></i>
</el-button>
</el-button-group>);