IClientSideWebPartStatusRenderer interface
由组件实现的接口,该组件应显示 Web 部件的加载指示器和错误消息。
方法
clear |
清除 Web 部件错误消息。 |
clear |
清除加载指示器。 |
display |
显示加载微调框。 |
render |
在 Web 部件容器分区中呈现所提供的错误消息。 |
方法详细信息
clearError(domElement)
清除 Web 部件错误消息。
clearError(domElement: HTMLElement): void;
参数
- domElement
-
HTMLElement
Web 部件容器 div。
返回
void
clearLoadingIndicator(domElement)
清除加载指示器。
clearLoadingIndicator(domElement: Element): void;
参数
- domElement
-
Element
Web 部件容器 div。
返回
void
displayLoadingIndicator(domElement, loadingMessage, timeout, clearDomElementCallback)
显示加载微调框。
displayLoadingIndicator(domElement: Element, loadingMessage: string, timeout?: number, clearDomElementCallback?: ClearDomElementCallback): void;
参数
- domElement
-
Element
Web 部件容器 div。
- loadingMessage
-
string
显示加载微调框 id 时显示的消息。
- timeout
-
number
呈现加载指示器超时。 默认值为 1500 毫秒。
- clearDomElementCallback
- @microsoft/sp-webpart-base!~ClearDomElementCallback:type
用于在呈现指示器之前清除 dom 节点的回调。 回调后将使用标准 DOM API。
返回
void
renderError(domElement, error, clearDomElementCallback)
在 Web 部件容器分区中呈现所提供的错误消息。
renderError(domElement: HTMLElement, error: Error | string, clearDomElementCallback?: ClearDomElementCallback): void;
参数
- domElement
-
HTMLElement
Web 部件容器 div。
- error
-
Error | string
错误消息。
- clearDomElementCallback
- @microsoft/sp-webpart-base!~ClearDomElementCallback:type
在呈现 error 元素之前清除 dom 节点的回调。 回调后将使用标准 DOM API。
返回
void