FloatButton 悬浮按钮
悬浮于页面右下角的全局操作按钮,内置按钮组 VbFloatButtonGroup 与回到顶部 VbBackTop。
基础用法
vue
<template>
<VbFloatButton type="primary" icon="sparkles" description="助手" />
<VbFloatButtonGroup trigger="click" icon="plus">
<VbFloatButton icon="message-circle" tooltip="反馈" />
<VbFloatButton icon="qr-code" tooltip="扫码" />
</VbFloatButtonGroup>
<VbBackTop :visibility-height="300" />
</template>1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
API
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
type | 按钮类型 | 'default' | 'primary' | 'default' |
shape | 形状 | 'circle' | 'square' | 'circle' |
icon | 内置图标名称 | IconName | — |
description | 按钮下方简短文案 | string | — |
badge | 徽标提示(数字、文本或小红点) | boolean | number | string | — |
VbBackTop / visibilityHeight | 滚动超过该高度后显示 | number | 300 |