Button 按钮
常用的操作按钮。
基础用法
使用 type、plain、round 和 circle 来定义按钮的样式。
<script setup>
import Button from '@/components/Button/Button.vue'
</script>
<template>
<Button> hello </Button>
<Button type="primary"> Primary </Button>
<Button type="danger"> Danger </Button>
<Button loading> Loading </Button>
</template>Button Attributes
| Name | Description | Type | Default |
|---|---|---|---|
| size | button size | enum - 'large'| 'small' | — |
| type | button type | enum - 'primary'| 'success'| 'warning'| 'danger'| 'info' | — |
| plain | determine whether it's a plain button | boolean | false |
| round | determine whether it's a round button | boolean | false |
| circle | determine whether it's a circle button | boolean | false |
| loading | determine whether it's loading | boolean | false |
| disabled | disable the button | boolean | false |
| icon | icon component | string | — |
| autofocus | same as native button's autofocus | boolean | false |
| native-type | same as native button's type | enum - 'button'| 'submit'| 'reset' | button |