跳到主要内容
版本:v10.0

Frame / SView / Windows / Collapse

Class: Collapse

SView.Windows.Collapse

Description

折叠栏

Hierarchy​

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new Collapse(): Collapse

Returns​

Collapse

Description

构造函数

Overrides​

Label.constructor

Properties​

allSubComponent​

• allSubComponent: Map<string, any>

Inherited from​

Label.allSubComponent


eleClasses​

• eleClasses: string[]

Inherited from​

Label.eleClasses


eleId​

• eleId: string

Inherited from​

Label.eleId


eleIsShow​

• eleIsShow: boolean

Inherited from​

Label.eleIsShow


eleLabel​

• eleLabel: HTMLElement

Inherited from​

Label.eleLabel


eleOnChange​

• eleOnChange: any

Inherited from​

Label.eleOnChange


eleOnClick​

• eleOnClick: any

Inherited from​

Label.eleOnClick


eleOnTouchStart​

• eleOnTouchStart: string

Inherited from​

Label.eleOnTouchStart


eleOverLay​

• eleOverLay: boolean

Description

默认不显示

Inherited from​

Label.eleOverLay


isDisable​

• isDisable: boolean

Inherited from​

Label.isDisable


rootPath​

▪ Static rootPath: string

Inherited from​

Label.rootPath

Methods​

addClass​

▸ addClass(className): void

Parameters​

NameTypeDescription
classNamestring标签class名称

Returns​

void

Description

添加标签class,原class保留

Inherited from​

Label.addClass


addLabel​

▸ addLabel(id?): void

Parameters​

NameType
id?string

Returns​

void

Description

添加标签至网页

Inherited from​

Label.addLabel


addSubComponents​

▸ addSubComponents(subComponents, position): void

Parameters​

NameTypeDescription
subComponentsany[]子控件
positionnumber位置

Returns​

void

Description

添加子控件


changePosition​

▸ changePosition(oldPosition, newPosition): void

Parameters​

NameTypeDescription
oldPositionnumber老位置
newPositionnumber新位置

Returns​

void

Description

调整子控件位置


create​

▸ create(elementInfo): Promise<Label>

Parameters​

NameType
elementInfoany

Returns​

Promise<Label>

Inherited from​

Label.create


createLabel​

▸ createLabel(collapseInfo): Promise<Collapse>

Parameters​

NameType
collapseInfoany

Returns​

Promise<Collapse>

Description

创建列表

Overrides​

Label.createLabel


delete​

▸ delete(): void

Returns​

void

Description

移除标签

Inherited from​

Label.delete


getClasses​

▸ getClasses(): string[]

Returns​

string[]

Description

获取标签class名

Inherited from​

Label.getClasses


getDetailInfo​

▸ getDetailInfo(): string[]

Returns​

string[]

Description

获取列表细节内容


getDetailLabel​

▸ getDetailLabel(): string[]

Returns​

string[]

Description

获取列表细节标题


getFlexDirection​

▸ getFlexDirection(): string

Returns​

string

Inherited from​

Label.getFlexDirection


getId​

▸ getId(): string

Returns​

string

Description

获取标签id名

Inherited from​

Label.getId


getLabel​

▸ getLabel(): HTMLElement

Returns​

HTMLElement

Description

获取标签

Inherited from​

Label.getLabel


getOnChangeEvent​

▸ getOnChangeEvent(): any

Returns​

any

Description

获取OnChange事件

Inherited from​

Label.getOnChangeEvent


getOnClickEvent​

▸ getOnClickEvent(): any

Returns​

any

Description

获取OnClick事件

Inherited from​

Label.getOnClickEvent


getSubComponents​

▸ getSubComponents(): any[]

Returns​

any[]

Description

获取列表子控件


getTitle​

▸ getTitle(): string

Returns​

string

Description

获取列表标题


hide​

▸ hide(): void

Returns​

void

Description

隐藏标签

Inherited from​

Label.hide


initFlexDirection​

▸ initFlexDirection(): void

Returns​

void

Inherited from​

Label.initFlexDirection


isShow​

▸ isShow(): boolean

Returns​

boolean

Description

标签是否显示

Inherited from​

Label.isShow


removeClass​

▸ removeClass(className): void

Parameters​

NameTypeDescription
classNamestring标签名称

Returns​

void

Description

删除标签class

Inherited from​

Label.removeClass


removeSubComponents​

▸ removeSubComponents(position): void

Parameters​

NameTypeDescription
positionnumber位置

Returns​

void

Description

移除子控件


setAttribute​

▸ setAttribute(key, value): void

Parameters​

NameType
keystring
valuestring

Returns​

void

Description

设置其他属性

Inherited from​

Label.setAttribute


setClasses​

▸ setClasses(classNames): void

Parameters​

NameTypeDescription
classNamesstring[]标签class名称

Returns​

void

Description

设置标签class,直接替换,原class被删除

Inherited from​

Label.setClasses


setCollapseShowDetail​

▸ setCollapseShowDetail(value?): void

Parameters​

NameType
value?boolean

Returns​

void

Description

设置详情显隐


setDetailBGColor​

▸ setDetailBGColor(color): void

Parameters​

NameTypeDescription
colorstring颜色

Returns​

void

Description

设置列表细节背景颜色


setDetailInfo​

▸ setDetailInfo(position, content): void

Parameters​

NameTypeDescription
positionnumber位置
contentstring内容

Returns​

void

Description

设置列表细节内容(位置从1开始)


setDetailInfoColor​

▸ setDetailInfoColor(color): void

Parameters​

NameTypeDescription
colorstring颜色

Returns​

void

Description

设置列表细节内容字体颜色


setDetailInfoFontSize​

▸ setDetailInfoFontSize(value): void

Parameters​

NameTypeDescription
valuestring | number字体大小

Returns​

void

Description

设置列表细节内容字体大小


setDetailLabel​

▸ setDetailLabel(position, title): void

Parameters​

NameTypeDescription
positionnumber位置
titlestring标题

Returns​

void

Description

设置列表细节标题标签(位置从1开始)


setDetailLabelColor​

▸ setDetailLabelColor(color): void

Parameters​

NameTypeDescription
colorstring颜色

Returns​

void

Description

设置列表细节标题字体颜色


setDetailLabelFontSize​

▸ setDetailLabelFontSize(value): void

Parameters​

NameTypeDescription
valuestring | number字体大小

Returns​

void

Description

设置列表细节标题标签字体大小


setFlexDirection​

▸ setFlexDirection(flexDirection): void

Parameters​

NameType
flexDirectionstring

Returns​

void

Inherited from​

Label.setFlexDirection


setId​

▸ setId(id): void

Parameters​

NameType
idstring

Returns​

void

Description

设置标签id名

Inherited from​

Label.setId


setIsDisable​

▸ setIsDisable(value): void

Parameters​

NameType
valueboolean

Returns​

void

Description

设置是否禁用

Inherited from​

Label.setIsDisable


setOnChangeEvent​

▸ setOnChangeEvent(onChangeEvent, parentNode?): void

Parameters​

NameTypeDescription
onChangeEventanychange事件
parentNode?any-

Returns​

void

Description

设置change事件

Inherited from​

Label.setOnChangeEvent


setOnClickEvent​

▸ setOnClickEvent(onClickEvent, parentNode?): void

Parameters​

NameTypeDescription
onClickEventany点击事件
parentNode?any-

Returns​

void

Description

设置点击事件

Inherited from​

Label.setOnClickEvent


setTitle​

▸ setTitle(title): void

Parameters​

NameTypeDescription
titlestring标题

Returns​

void

Description

设置列表标题


setTitleBGColor​

▸ setTitleBGColor(color): void

Parameters​

NameTypeDescription
colorstring颜色

Returns​

void

Description

设置列表标题背景颜色


setTitleColor​

▸ setTitleColor(color): void

Parameters​

NameTypeDescription
colorstring颜色

Returns​

void

Description

设置列表标题字体颜色


setTitleFontSize​

▸ setTitleFontSize(value): void

Parameters​

NameTypeDescription
valuestring | number字体大小

Returns​

void

Description

设置列表标题字体大小


show​

▸ show(): void

Returns​

void

Description

显示标签

Inherited from​

Label.show


hideById​

▸ hideById(id): void

Parameters​

NameType
idstring

Returns​

void

Description

通过id隐藏标签

Inherited from​

Label.hideById


setRootPath​

▸ setRootPath(path): void

Parameters​

NameType
pathany

Returns​

void

Description

设置基础路径

Inherited from​

Label.setRootPath


showById​

▸ showById(id): void

Parameters​

NameType
idstring

Returns​

void

Description

通过id显示标签

Inherited from​

Label.showById