# Button 按钮
常用的操作按钮
# 初始化
单独引入时:在入口js文件处引入
import { Button } from '@xiaoe/sense'
import '@xiaoe/sense/static/index.css'
Vue.use(Button)
1
2
3
2
3
# 效果
# 基本样式
<ss-button>默认按钮</ss-button>
<ss-button type="success">成功按钮</ss-button>
<ss-button type="error">危险按钮</ss-button>
<ss-button type="plain">朴素按钮</ss-button>
<ss-button type="plain-primary">朴素按钮</ss-button>
<ss-button type="text">文本按钮</ss-button>
1
2
3
4
5
6
2
3
4
5
6
<ss-button size="small">小按钮</ss-button>
<ss-button size="big">大按钮</ss-button>
1
2
2
<ss-button disabled>禁用按钮</ss-button>
1
# 参数
参数 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
---|---|---|---|---|---|
type | 按钮类型 | String | default | primary ,warning , success ,error ,text ,plain , plain-primary | 其中 text plain 1.3.16及其以上 才支持 |
size | 按钮大小 | String | medium | medium ,small ,big | 1.3.16及其以上 |
disabled | 是否禁用状态 | Boolean | - | false |
# 事件
事件名称 | 说明 | 回调参数 |
---|---|---|
click | 点击按钮触发事件 | — |
← Badge 标记 Checkbox 多选框 →