Skip to content
TabGroup<T>

UI / TabGroup

TabGroup<T> Class ​

tabbed groups

Type parameters ​

Textends TabGroupOnClickedProps

Table of contents ​

Accessors ​

currentIndex(): number other
Index of the currently selected tag

Methods ​

init(tabStyleHandle: (btn: T, isSelect: boolean) => void, selectCallBack: (index: number) => void, thisArg: any, defaultIndex?: number): void other
initialization
select(index: number, ignoreSame?: boolean): boolean other
Set the current tag
setSelectableChecker(selectChecker: (index: number) => boolean, thisArg: any): void other
Set the detection method for whether the tag can be switched

structure

Type parameters ​

Textends TabGroupOnClickedProps

Parameters ​

tabArr T[]Usage: button array of tag

Accessors ​

currentIndex ​

• get currentIndex(): number other

Index of the currently selected tag

Returns ​

numberCurrent label

Methods ​

init ​

• init(tabStyleHandle, selectCallBack, thisArg, defaultIndex?): void other

initialization

Parameters ​

tabStyleHandle (btn: T, isSelect: boolean) => voidUsage: Style method for setting labels (method parameter: button)
selectCallBack (index: number) => voidUsage: callback method for selecting tags
thisArg anyUsage: Domain
defaultIndex? numberUsage: default selected label index default: 0 range: type: integer

select ​

• select(index, ignoreSame?): boolean other

Set the current tag

Parameters ​

index numberUsage: tag index range: unlimited type: integer
ignoreSame? booleanUsage: Ignore the same index default: true

Returns ​

booleanWhether successful

setSelectableChecker ​

• setSelectableChecker(selectChecker, thisArg): void other

Set the detection method for whether the tag can be switched

Parameters ​

selectChecker (index: number) => booleanUsage: Judgment method
thisArg anyUsage: Domain