water_xcx/miniprogram_npm/tdesign-miniprogram/fab/README.md

1.4 KiB

title description spline isComponent
Fab 当功能使用图标即可表意清楚时,可使用纯图标悬浮按钮,例如:添加、发布。 form true

引入

全局引入,在 miniprogram 根目录下的app.json中配置,局部引入,在需要引入的页面或组件的index.json中配置。

"usingComponents": {
  "t-fab": "tdesign-miniprogram/fab/fab"
}

代码演示

基础使用

{{ base }}

进阶使用

{{ advance }}

API

Fab Props

名称 类型 默认值 说明 必传
button-props Object - 透传至 Button 组件 N
icon String - 图标 N
style String right: 16px; bottom: 32px; 悬浮按钮的样式,常用于调整位置 N
text String - 文本内容 N

Fab Events

名称 参数 描述
click ({e: Event}) 悬浮按钮点击事件