# 4.3 圆形按钮(Circle Button)
圆形按钮组件,用于展示圆形图标按钮
# 基础用法
<template>
<dof-circle-button text="按钮" @dofButtonClicked="onClick"></dof-circle-button>
</template>
1
2
3
2
3
# Attributes
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
type | String | N | text | 按钮类型 |
mode | String | N | common | 模式 |
size | String | N | "middle" | 传入 min 时使用小尺寸,其他值使用默认尺寸 |
theme | String | N | primary | 主题颜色 |
theme-color | String | N | null | 自定义主题颜色 |
circle-blank-color | String | N | '' | 圆形空白区域颜色 |
text | String | N | text | 按钮文本 |
text-color | String | N | null | 文本颜色 |
img-url | String | N | null | 图标地址 |
disabled | Boolean | N | false | 是否禁用 |
has-dot | Boolean | N | false | 是否显示红点 |
has-animation | Boolean | N | false | 是否有动画效果 |
needDarkMode | Boolean | N | false | 是否启用 M-dark/T-dark 内置暗黑适配 |
isRTL | Boolean | N | false | 是否启用 RTL(从右到左)布局;默认关闭 ^2.5.10 |
设置 :need-dark-mode="true" 可启用内置暗黑配色,主题初始化与构建配置见 接入说明。
颜色属性为空时使用内置配色;业务显式颜色和样式覆盖优先于默认配色,关闭暗黑适配后仍有效。
# Events
| 事件名 | 说明 | 回调参数 |
|---|---|---|
dofButtonClicked | 点击事件 | 无 |