Angular Material progress-bar API 参考文档
import {MatProgressBarModule} from '@angular/material/progress-bar';
指令
MatProgressBar
<mat-progress-bar>
组件
<mat-progress-bar>
component.
属性
名称 | 描述 |
---|---|
@Input()
|
进度条的缓冲值。默认为零。 Buffer value of the progress bar. Defaults to zero. |
@Input()
|
Theme color palette for the component. |
@Input()
|
进度条的模式吧。 Mode of the progress bar. 此输入属性必须是以下值之一:determinate、indeterminate、buffer 和 query,默认为 'determinate'。会镜像到 mode 属性。 Input must be one of these values: determinate, indeterminate, buffer, query, defaults to 'determinate'. Mirrored to mode attribute. |
@Input()
|
进度条的值。默认为零。镜像到 aria-valuenow。 Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. |
@Output()
|
当主进度条的动画完成时会发出本事件。当禁用动画时,不会发出此事件,也不会为具有连续动画的模式(不定动画和查询动画)发出此事件。 Event emitted when animation of the primary progress bar completes. This event will not be emitted when animations are disabled, nor will it be emitted for modes with continuous animations (indeterminate and query). |
|
Default color to fall back to if no value is set. |
|
进度条的 ID。 ID of the progress bar. |
接口
ProgressAnimationEnd
最后一个动画结束数据
Last animation end data.
属性
名称 | 描述 |
---|---|
|
类型别名
ProgressBarMode
type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';
Angular Material progress-bar-testing API 参考文档
import {MatProgressBarHarness} from '@angular/material/progress-bar/testing';
类
MatProgressBarHarness
extends
ComponentHarness
在测试中用来与标准 mat-progress-bar 进行交互的测试工具。
Harness for interacting with a standard mat-progress-bar in tests.
方法
异步
getMode
|
|
---|---|
Gets the progress bar's mode. |
|
返回值 Returns |
|
Promise<string | null>
|
|
异步
getValue
|
|
---|---|
Gets the progress bar's value. |
|
返回值 Returns |
|
Promise<number | null>
|
|
异步
host
|
|
---|---|
获取一个代表该组件宿主元素的 Gets a |
|
返回值 Returns |
|
Promise<TestElement>
|
|
接口
ProgressBarHarnessFilters
A set of criteria that can be used to filter a list of MatProgressBarHarness
instances.