Skip to main content

KPanelWidget

kds-plugin-document / Exports / KPanelWidget

Interface: KPanelWidget

Hierarchy

Table of contents

Methods

Methods

getClickListener

getClickListener(): KClickListener

获取控件的点击监听器

Get the click listener of the widget

Returns

KClickListener

Inherited from

KWidget.getClickListener

Defined in

api.d.ts:6886


getContainerStyle

getContainerStyle(): Properties

获取面板容器样式

Container style

See

https://github.com/microsoft/TypeScript/blob/391616532d6827254a86dc266121fd5d1958ffb9/src/lib/dom.generated.d.ts#L5746 - TypeScript 中 CSSStyleDeclaration 接口的完整定义

Returns

Properties

Defined in

api.d.ts:4351


getDraggable

getDraggable(): boolean

获取面板是否可拖动

Get whether the panel is draggable

Returns

boolean

是否可拖动

Defined in

api.d.ts:4343


getHeight

getHeight(): string

获取面板高度

Get the height of the panel

Returns

string

高度的值

Defined in

api.d.ts:4335


getId

getId(): string

获取控件的唯一标识符

Unique identifier for the widget

Returns

string

Inherited from

KWidget.getId

Defined in

api.d.ts:6871


getLeft

getLeft(): string

获取面板左侧位置

Get the left position of the panel

Returns

string

左侧位置的像素值

Defined in

api.d.ts:4311


getSrc

getSrc(): string

获取面板内容源

Get the source URL of the panel content

Returns

string

内容的URL地址

Defined in

api.d.ts:4359


getTop

getTop(): string

获取面板顶部位置

Get the top position of the panel

Returns

string

顶部位置的像素值

Defined in

api.d.ts:4319


getType

getType(): KWidgetIdentifier

获取控件的类型

Get the type of the widget

Returns

KWidgetIdentifier

Inherited from

KWidget.getType

Defined in

api.d.ts:6863


getVisible

getVisible(): boolean

获取是否可见

get visibility of the widget

Returns

boolean

Inherited from

KWidget.getVisible

Defined in

api.d.ts:6909


getWidth

getWidth(): string

获取面板宽度

Get the width of the panel

Returns

string

宽度的像素值

Defined in

api.d.ts:4327


offMessage

offMessage(listener): void

移除面板消息监听

Remove a message listener from the panel

Parameters

NameTypeDescription
listener(data: any) => void要移除的消息处理函数

Returns

void

Defined in

api.d.ts:4295


onMessage

onMessage(listener): void

监听面板消息

Add a message listener to the panel

Parameters

NameTypeDescription
listener(data: any) => void消息处理函数

Returns

void

Defined in

api.d.ts:4287


onResizeMove

onResizeMove(callback): void

设置面板缩放移动回调

Set the callback for panel resize and move events

Parameters

NameTypeDescription
callback(state: DOMRect) => Partial<DOMRect>接收当前状态并返回调整后状态的函数

Returns

void

Defined in

api.d.ts:4303


postMessage

postMessage(message, origin?): void

向面板发送消息

Post a message to the panel

Parameters

NameTypeDescription
messageany要发送的消息对象
origin?string-

Returns

void

Defined in

api.d.ts:4279


remove

remove(): void

从界面中移除此控件

Remove this widget from the UI

Returns

void

Inherited from

KWidget.remove

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

Inherited from

KWidget.setClickListener

Defined in

api.d.ts:6879


setContainerStyle

setContainerStyle(style): void

设置面板容器样式

Container style

See

https://github.com/microsoft/TypeScript/blob/391616532d6827254a86dc266121fd5d1958ffb9/src/lib/dom.generated.d.ts#L5746 - TypeScript 中 CSSStyleDeclaration 接口的完整定义

Parameters

NameType
styleProperties

Returns

void

Defined in

api.d.ts:4263


setDraggable

setDraggable(draggable): void

设置面板是否可拖动

Set whether the panel is draggable

Parameters

NameTypeDescription
draggableboolean是否可拖动

Returns

void

Defined in

api.d.ts:4255


setHeight

setHeight(height): void

设置面板高度

Set the height of the panelxi

Parameters

NameTypeDescription
heightstring高度的值,可以是像素值或百分比

Returns

void

Defined in

api.d.ts:4247


setLeft

setLeft(left): void

设置面板左侧位置

Set the left position of the panel

Parameters

NameType
leftstring

Returns

void

Defined in

api.d.ts:4223


setSrc

setSrc(src): void

设置面板内容源

Set the source URL of the panel content

Parameters

NameTypeDescription
srcstring内容的URL地址

Returns

void

Defined in

api.d.ts:4271


setTop

setTop(top): void

设置面板顶部位置

Set the top position of the panel

Parameters

NameTypeDescription
topstring顶部位置的像素值

Returns

void

Defined in

api.d.ts:4231


setVisible

setVisible(visible): void

设置是否可见

Set the visibility of the widget

Parameters

NameType
visibleboolean

Returns

void

Inherited from

KWidget.setVisible

Defined in

api.d.ts:6902


setWidth

setWidth(width): void

设置面板宽度

Set the width of the panel

Parameters

NameTypeDescription
widthstring宽度的像素值

Returns

void

Defined in

api.d.ts:4239