Service class

Power BI 服务嵌入组件,它是将所有其他 Power BI 组件嵌入应用程序的入口点

属性

router

方法

bootstrap(HTMLElement, IBootstrapEmbedConfiguration | IComponentEmbedConfiguration)

给定 HTML 元素和 entityType,创建一个新的组件实例,并启动用于嵌入的 iframe。

createReport(HTMLElement, IEmbedConfiguration | IReportCreateConfiguration)

创建新报表

embed(HTMLElement, IEmbedConfigurationBase | IComponentEmbedConfiguration)

给定基于 HTML 元素的配置,如果组件已创建并附加到该元素,则重复使用组件实例和现有 iframe,否则创建新的组件实例。

get(HTMLElement)

返回与元素关联的组件的实例。

invokeSDKHook(Function, IExtendedRequest, Response)
load(HTMLElement, IEmbedConfigurationBase | IComponentEmbedConfiguration)

给定基于 HTML 元素的配置,如果组件已创建并附加到该元素,则重复使用组件实例和现有 iframe,否则创建新的组件实例。 这用于分阶段嵌入 API,一旦成功加载元素,就可以在它上调用“render”。

preload(IEmbedConfigurationBase | IComponentEmbedConfiguration, HTMLElement)

用于暖启动 powerbi 嵌入式终结点的 API。 使用此 API 在后台预加载 Power BI Embedded。

quickCreate(HTMLElement, IQuickCreateConfiguration)

创建新数据集

reset(HTMLElement)

给定嵌入其中的组件的 HTML 元素,从嵌入组件列表中删除该组件,删除元素和组件之间的关联,并删除 iframe。

属性详细信息

router

router: Router

属性值

Router

方法详细信息

bootstrap(HTMLElement, IBootstrapEmbedConfiguration | IComponentEmbedConfiguration)

给定 HTML 元素和 entityType,创建一个新的组件实例,并启动用于嵌入的 iframe。

function bootstrap(element: HTMLElement, config: IBootstrapEmbedConfiguration | IComponentEmbedConfiguration): Embed

参数

element

HTMLElement

返回

Embed

createReport(HTMLElement, IEmbedConfiguration | IReportCreateConfiguration)

创建新报表

function createReport(element: HTMLElement, config?: IEmbedConfiguration | IReportCreateConfiguration): Embed

参数

element

HTMLElement

返回

Embed

embed(HTMLElement, IEmbedConfigurationBase | IComponentEmbedConfiguration)

给定基于 HTML 元素的配置,如果组件已创建并附加到该元素,则重复使用组件实例和现有 iframe,否则创建新的组件实例。

function embed(element: HTMLElement, config?: IEmbedConfigurationBase | IComponentEmbedConfiguration): Embed

参数

element

HTMLElement

返回

Embed

get(HTMLElement)

返回与元素关联的组件的实例。

function get(element: HTMLElement): Embed

参数

element

HTMLElement

返回

Embed

invokeSDKHook(Function, IExtendedRequest, Response)

function invokeSDKHook(hook: Function, req: IExtendedRequest, res: Response): Promise<void>

参数

hook

Function

req

IExtendedRequest

res

Response

返回

Promise<void>

load(HTMLElement, IEmbedConfigurationBase | IComponentEmbedConfiguration)

给定基于 HTML 元素的配置,如果组件已创建并附加到该元素,则重复使用组件实例和现有 iframe,否则创建新的组件实例。 这用于分阶段嵌入 API,一旦成功加载元素,就可以在它上调用“render”。

function load(element: HTMLElement, config?: IEmbedConfigurationBase | IComponentEmbedConfiguration): Embed

参数

element

HTMLElement

返回

Embed

preload(IEmbedConfigurationBase | IComponentEmbedConfiguration, HTMLElement)

用于暖启动 powerbi 嵌入式终结点的 API。 使用此 API 在后台预加载 Power BI Embedded。

function preload(config?: IEmbedConfigurationBase | IComponentEmbedConfiguration, element?: HTMLElement): HTMLIFrameElement

参数

element

HTMLElement

返回

HTMLIFrameElement

quickCreate(HTMLElement, IQuickCreateConfiguration)

创建新数据集

function quickCreate(element: HTMLElement, config?: IQuickCreateConfiguration): Embed

参数

element

HTMLElement

返回

Embed

reset(HTMLElement)

给定嵌入其中的组件的 HTML 元素,从嵌入组件列表中删除该组件,删除元素和组件之间的关联,并删除 iframe。

function reset(element: HTMLElement)

参数

element

HTMLElement