Skip to content

Button 按钮 ​

按钮用于触发一次即时业务操作。

基础用法 ​

vue
<template>
  <VbButton type="primary">Primary</VbButton>
  <VbButton type="soft">Soft</VbButton>
  <VbButton type="default">Default</VbButton>
  <VbButton type="ghost">Ghost</VbButton>
  <VbButton type="danger">Danger</VbButton>
</template>

尺寸与形态 ​

API ​

Props ​

属性名说明类型默认值
type按钮类型'primary' | 'soft' | 'default' | 'ghost' | 'success' | 'warning' | 'danger''default'
size按钮尺寸(默认继承 VbConfigProvider)'sm' | 'md' | 'lg''md'
round是否胶囊圆角booleanfalse
circle是否圆形按钮booleanfalse
block是否通栏占满宽度booleanfalse
disabled是否禁用booleanfalse
loading是否加载中状态booleanfalse
nativeType原生 button 的 type 属性'button' | 'submit' | 'reset''button'

Events ​

事件名说明回调参数
click点击按钮时触发(禁用与加载态不触发)(event: MouseEvent) => void

基于 MIT 协议开源发布 · @vobo-design/ui v0.5.0