Skip to content

Button 按钮

常用的操作按钮。

基础用法

使用 typeplainroundcircle 来定义按钮的样式。

<template>
  <Button> hello </Button>
  <Button type="primary"> Primary </Button>
  <Button type="danger"> Danger </Button>
  <Button loading> Loading </Button>
</template>
<script setup>
import Button from '@/components/Button/Button.vue'
</script>

Button Attributes

NameDescriptionTypeDefault
size尺寸enum - 'large'| 'small'
type类型enum - 'primary'| 'success'| 'warning'| 'danger'| 'info'
plain是否为朴素按钮booleanfalse
round是否为圆角按钮booleanfalse
circle是否为圆形按钮booleanfalse
loading是否为加载中状态booleanfalse
disabled按钮是否为禁用状态booleanfalse
icon图标组件string
autofocus原生 autofocus 属性booleanfalse
native-type原生 type 属性enum - 'button'| 'submit'| 'reset'button