UI / TabGroup
TabGroup<T> Class
tabbed groups
Type parameters
T | extends 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
T | extends TabGroupOnClickedProps |
---|
Parameters
tabArr T [] | Usage: button array of tag |
---|
Accessors
currentIndex
• |
---|
Index of the currently selected tag Returns |
number | Current label |
---|
Methods
init
• init(tabStyleHandle
, selectCallBack
, thisArg
, defaultIndex?
): void
other
initialization
Parameters
tabStyleHandle (btn : T , isSelect : boolean ) => void | Usage: Style method for setting labels (method parameter: button) |
---|---|
selectCallBack (index : number ) => void | Usage: callback method for selecting tags |
thisArg any | Usage: Domain |
defaultIndex? number | Usage: default selected label index default: 0 range: type: integer |
select
• select(index
, ignoreSame?
): boolean
other
Set the current tag
Parameters
index number | Usage: tag index range: unlimited type: integer |
---|---|
ignoreSame? boolean | Usage: Ignore the same index default: true |
Returns
boolean | Whether successful |
---|
setSelectableChecker
• setSelectableChecker(selectChecker
, thisArg
): void
other
Set the detection method for whether the tag can be switched
Parameters
selectChecker (index : number ) => boolean | Usage: Judgment method |
---|---|
thisArg any | Usage: Domain |