Skip to content
#

Button

基础用法

vue
<template>
  <div>
    <a-button>default</a-button>
    <a-button type="success">success</a-button>
    <a-button type="info">info</a-button>
    <a-button type="warning">warning</a-button>
    <a-button type="danger">danger</a-button>
  </div>
  <div class="mt-4">
    <a-button round>default</a-button>
    <a-button type="primary" round>primary</a-button>
    <a-button type="success" round>success</a-button>
    <a-button type="info" round>info</a-button>
    <a-button type="warning" round>warning</a-button>
    <a-button type="danger" round>danger</a-button>
  </div>
</template>

禁用状态

vue
<template>
  <a-button disabled>default</a-button>
  <a-button type="primary" disabled>primary</a-button>
  <a-button type="success" disabled>success</a-button>
  <a-button type="info" disabled>info</a-button>
  <a-button type="warning" disabled>warning</a-button>
  <a-button type="danger" disabled>danger</a-button>
</template>

API

属性

名称类型可选值默认值说明
typestringdefault, primary, success, info, warning, dangerdefault按钮类型
roundbooleantrue/falsefalse圆角按钮
disabledbooleantrue/falsefalse禁用状态