Angular Material grid-list API 参考文档
import {MatGridListModule} from '@angular/material/grid-list';
指令
MatGridList
属性
名称 | 描述 |
---|---|
@Input()
|
网格列表中的列数。 Amount of columns in the grid list. |
@Input()
|
网格列表的装订线大小(以像素为单位)。 Size of the grid list's gutter in pixels. |
@Input()
|
从用户提供的值中设置行高的内部表示形式。 Set internal representation of row height from the user-provided value. |
MatGridTile
属性
名称 | 描述 |
---|---|
@Input()
|
网格图块占用的列数。 Amount of columns that the grid tile takes up. |
@Input()
|
网格图块占用的行数。 Amount of rows that the grid tile takes up. |
MatGridTileText
Angular Material grid-list-testing API 参考文档
import {MatGridTileHarness} from '@angular/material/grid-list/testing';
类
MatGridTileHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard MatGridTitle
in tests.
方法
异步
getAllChildLoaders
|
|
---|---|
参数 Parameters |
|
selector S
|
|
返回值 Returns |
|
Promise<HarnessLoader[]>
|
|
异步
getAllHarnesses
|
|
---|---|
参数 Parameters |
|
query HarnessQuery<T>
|
|
返回值 Returns |
|
Promise<T[]>
|
|
异步
getChildLoader
|
|
---|---|
参数 Parameters |
|
selector S
|
|
返回值 Returns |
|
Promise<HarnessLoader>
|
|
异步
getColspan
|
|
---|---|
Gets the amount of columns that the grid-tile takes up. |
|
返回值 Returns |
|
Promise<number>
|
|
异步
getFooterText
|
|
---|---|
Gets the text of the footer if present. |
|
返回值 Returns |
|
Promise<string | null>
|
|
异步
getHarness
|
|
---|---|
参数 Parameters |
|
query HarnessQuery<T>
|
|
返回值 Returns |
|
Promise<T>
|
|
异步
getHeaderText
|
|
---|---|
Gets the text of the header if present. |
|
返回值 Returns |
|
Promise<string | null>
|
|
异步
getRowspan
|
|
---|---|
Gets the amount of rows that the grid-tile takes up. |
|
返回值 Returns |
|
Promise<number>
|
|
异步
hasAvatar
|
|
---|---|
Whether the grid-tile has an avatar. |
|
返回值 Returns |
|
Promise<boolean>
|
|
异步
hasFooter
|
|
---|---|
Whether the grid-tile has a footer. |
|
返回值 Returns |
|
Promise<boolean>
|
|
异步
hasHeader
|
|
---|---|
Whether the grid-tile has a header. |
|
返回值 Returns |
|
Promise<boolean>
|
|
异步
host
|
|
---|---|
获取一个代表该组件宿主元素的 Gets a |
|
返回值 Returns |
|
Promise<TestElement>
|
|
MatGridListHarness
extends
ComponentHarness
Harness for interacting with a standard MatGridList
in tests.
方法
异步
getColumns
|
|
---|---|
Gets the amount of columns of the grid-list. |
|
返回值 Returns |
|
Promise<number>
|
|
异步
getTileAtPosition
|
|
---|---|
Gets a tile of the grid-list that is located at the given location. |
|
参数 Parameters |
|
row
|
Zero-based row index. |
column
|
Zero-based column index. |
__0 { row
|
|
返回值 Returns |
|
Promise<MatGridTileHarness>
|
|
异步
getTiles
|
|
---|---|
Gets all tiles of the grid-list. |
|
参数 Parameters |
|
filters GridTileHarnessFilters = {}
|
|
返回值 Returns |
|
Promise<MatGridTileHarness[]>
|
|
异步
host
|
|
---|---|
获取一个代表该组件宿主元素的 Gets a |
|
返回值 Returns |
|
Promise<TestElement>
|
|
接口
GridListHarnessFilters
A set of criteria that can be used to filter a list of MatGridListHarness
instances.
GridTileHarnessFilters
A set of criteria that can be used to filter a list of MatTileHarness
instances.
属性
名称 | 描述 |
---|---|
|
Text the grid-tile footer should match. |
|
Text the grid-tile header should match. |