mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 13:38:56 +08:00
168a3635ef
* feat:dropDownButton新增隐藏下拉图标属性hideCaret;nav组件新增角标、更多操作配置、支持图片拽排序 * feat:dropDownButton新增隐藏下拉图标属性hideCaret;badge组件支持横幅类型;nav组件新增角标配置、更多操作配置、拖拽排序 * chore:优化nav角标相关配置 * fix:修复badge组件ribbon高度遮挡问题 Co-authored-by: Qin,Haoyan <qinhaoyan@baidu.com>
2.9 KiB
Executable File
2.9 KiB
Executable File
title | description | type | group | menuName | icon | order |
---|---|---|---|---|---|---|
DropDownButton | 0 | ⚙ 组件 | DropDownButton | 44 |
基本用法
{
"type": "page",
"body": {
"type": "dropdown-button",
"label": "下拉菜单",
"buttons": [
{
"type": "button",
"label": "按钮1",
"disabled": true
},
{
"type": "button",
"label": "按钮2"
},
{
"type": "button",
"label": "按钮3"
}
]
}
}
触发方式
1.4.0 及以上版本
默认是点击鼠标触发,可以通过 "trigger": "hover"
配置为鼠标移上去后触发
{
"type": "page",
"body": {
"type": "dropdown-button",
"label": "下拉菜单",
"trigger": "hover",
"buttons": [
{
"type": "button",
"label": "按钮1",
"disabled": true
},
{
"type": "button",
"label": "按钮2"
},
{
"type": "button",
"label": "按钮3"
}
]
}
}
属性表
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
type | string |
dropdown-button |
类型 |
label | string |
按钮文本 | |
className | string |
外层 CSS 类名 | |
block | boolean |
块状样式 | |
size | string |
尺寸,支持'xs' 、'sm' 、'md' 、'lg' |
|
align | string |
位置,可选'left' 或'right' |
|
buttons | Array<action> |
配置下拉按钮 | |
caretIcon | string |
caretIcon | |
iconOnly | boolean |
只显示 icon | |
defaultIsOpened | boolean |
默认是否打开 | |
closeOnOutside | boolean |
点击外侧区域是否收起 | |
trigger | click 或 hover |
click |
触发方式 |
hideCaret | boolean |
false | 隐藏下拉图标 |