Skip to main content

KWidget

kds-plugin-document / Exports / KWidget

Interface: KWidget

Hierarchy​

Table of contents​

Methods​

Methods​

getClickListener​

▸ getClickListener(): KClickListener

获取控件的点击监听器

Get the click listener of the widget

Returns​

KClickListener

Defined in​

api.d.ts:6886


getId​

▸ getId(): string

获取控件的唯一标识符

Unique identifier for the widget

Returns​

string

Defined in​

api.d.ts:6871


getType​

▸ getType(): KWidgetIdentifier

获取控件的类型

Get the type of the widget

Returns​

KWidgetIdentifier

Defined in​

api.d.ts:6863


getVisible​

▸ getVisible(): boolean

获取是否可见

get visibility of the widget

Returns​

boolean

Defined in​

api.d.ts:6909


remove​

▸ remove(): void

从界面中移除此控件

Remove this widget from the UI

Returns​

void

Defined in​

api.d.ts:6893


setClickListener​

▸ setClickListener(listener?): void

设置点击监听器

Set the click listener for the widget

Parameters​

NameTypeDescription
listener?KClickListener可选的点击事件监听器 (Optional click event listener)

Returns​

void

Defined in​

api.d.ts:6879


setVisible​

▸ setVisible(visible): void

设置是否可见

Set the visibility of the widget

Parameters​

NameType
visibleboolean

Returns​

void

Defined in​

api.d.ts:6902