其他 / Button按钮组件
基础的按钮组件, 可以设置大小, 形状等, 包括和Icon组件的组合.
如何引入
// 引入
import Button from 'vimo/lib/button'
// 安装
Vue.component(Button.name, Button)
// 或者
export default{
src: {
Button
}
}传入属性 / Props:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color |
String |
<optional> |
'default'
|
颜色 |
mode |
String |
<optional> |
'ios'
|
模式 ios/window/android/we/alipay |
small |
Boolean |
<optional> |
尺寸 | |
default |
Boolean |
<optional> |
尺寸 | |
large |
Boolean |
<optional> |
尺寸 | |
active |
Boolean |
<optional> |
是否激活(按下时的效果) | |
round |
Boolean |
<optional> |
round(宽度auto有圆角) | |
full |
Boolean |
<optional> |
full(宽度100%无圆角) | |
block |
Boolean |
<optional> |
block(宽度100%有圆角) | |
menutoggle |
Boolean |
<optional> |
menutoggle类型 | |
outline |
Boolean |
<optional> |
outline只有边框 | |
clear |
Boolean |
<optional> |
clear空心 | |
solid |
Boolean |
<optional> |
solid实心 | |
role |
Boolean |
<optional> |
'button'
|
role 按钮具体角色 例如 action-sheet-button/bar-button |
strong |
Boolean |
<optional> |
样式加强 |
用法 / Usages
<vm-button full>full</vm-button>
<vm-button outline full color="secondary">outline + full</vm-button>
<vm-button color="dark">
<vm-icon class="icon" name="star"></vm-icon>
<span>Left Icon</span>
</vm-button>