AppToolbar
# 一、属性
# toolbar
array<{ btnId, text, method, iconCls?, type?, hidden?, disabled?, style?, option?, defaultShow?}>
按钮配置列表。
默认值: []
array 属性说明:
btnId: string
: 按钮的功能标识text: string
: 按钮的显示文字method: (typeParams) => void
: 按钮的点击事件iconCls: string
: 按钮的图标type: string
: 按钮类型,默认default
,可选值primary
、dashed
、danger
、link
hidden: boolean | (typeParams) => boolean
: 是否隐藏按钮disabled: boolean | (typeParams) => boolean
: 是否禁用按钮style: object | (typeParams) => object
: 按钮样式option: array
: 下拉菜单选项配置项text: string
: 菜单项的标题iconCls: string
: 菜单项的图标style: object | (typeParams) => object
: 菜单项的样式
defaultShow: boolean
: 是否显示下拉按钮,默认false
,仅当配置option
时有效
# size
String
按钮大小。
默认值: 'small'
可选值: 'large'
、'default'
、'samll'
提示
该属性可直接挂载至 columns 下。
columns: {
// ...
size: 'small'
}
1
2
3
4
2
3
4
# typeParams
object
类型参数,可以为其传递任意属性,在各回调事件中,会将其按原样返回。
默认值: {}
# 二、方法
# click
(tbar) => void
按钮点击事件。
参数说明:
tbar: object
: 当前点击按钮 toolbar