docs: 补充 dropdown 只显示 icon 的示例

This commit is contained in:
吴多益 2021-11-11 11:56:32 +08:00 committed by GitHub
parent fa587c2c98
commit 10a410f7b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,6 +98,38 @@ order: 44
}
```
## 只显示图标
可以设置 `level``hideCaret` 来只显示图标,并配合 `tooltip` 来显示提示文字
```schema
{
"type": "page",
"body": {
"type": "dropdown-button",
"level": "link",
"icon": "fa fa-ellipsis-h",
"hideCaret": true,
"tooltip": "提示",
"buttons": [
{
"type": "button",
"label": "按钮1",
"disabled": true
},
{
"type": "button",
"label": "按钮2"
},
{
"type": "button",
"label": "按钮3"
}
]
}
}
```
## 设置右侧图标
> 1.5.0 及以上版本