Skip to content
TabGroup<T>

界面 / TabGroup

TabGroup<T> Class

选项卡组

Type parameters

Textends TabGroupOnClickedProps

Table of contents

Accessors

currentIndex(): number client
当前选择的标签索引

Methods

init(tabStyleHandle: (btn: T, isSelect: boolean) => void, selectCallBack: (index: number) => void, thisArg: any, defaultIndex?: number): void client
初始化
select(index: number, ignoreSame?: boolean): boolean client
设置当前的标签
setSelectableChecker(selectChecker: (index: number) => boolean, thisArg: any): void client
设置该标签是否可以切换的检测方法

构造

Type parameters

Textends TabGroupOnClickedProps

Parameters

tabArr T[]标签的按钮数组

Accessors

currentIndex

get currentIndex(): number client

当前选择的标签索引

Returns

number当前标签

Methods

init

init(tabStyleHandle, selectCallBack, thisArg, defaultIndex?): void client

初始化

Parameters

tabStyleHandle (btn: T, isSelect: boolean) => void设置标签的样式方法(方法参数:按钮)
selectCallBack (index: number) => void选择标签的回调方法
thisArg any
defaultIndex? number默认选择的标签索引 default:0 range: type:整数

select

select(index, ignoreSame?): boolean client

设置当前的标签

Parameters

index number标签索引 range:不做限制 type:整数
ignoreSame? boolean是否忽略相同索引 default:true

Returns

boolean是否成功

setSelectableChecker

setSelectableChecker(selectChecker, thisArg): void client

设置该标签是否可以切换的检测方法

Parameters

selectChecker (index: number) => boolean判断方法
thisArg any