mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 21:47:38 +08:00
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
<Table DataSource="data">
|
|
<Column @bind-Field="@context.Name" Width="150">
|
|
<a>@context.Name</a>
|
|
</Column>
|
|
<Column @bind-Field="@context.Age" Width="80" />
|
|
<Column @bind-Field="@context.Address" Ellipsis />
|
|
<Column @bind-Field="@context.Address" Ellipsis Title="Long Column Long Column Long Column" />
|
|
<Column @bind-Field="@context.Address" Ellipsis Title="Long Column Long Column" />
|
|
<Column @bind-Field="@context.Address" Ellipsis Title="Long Column" />
|
|
</Table>
|
|
|
|
@code {
|
|
Column[] data = new Column[] {
|
|
new()
|
|
{
|
|
Name = "John Brown",
|
|
Age = 32,
|
|
Address = "New York No. 1 Lake Park, New York No. 1 Lake Park"
|
|
},
|
|
new()
|
|
{
|
|
Name = "Jim Green",
|
|
Age = 42,
|
|
Address = "London No. 2 Lake Park, London No. 2 Lake Park"
|
|
},
|
|
new()
|
|
{
|
|
Name = "Joe Black",
|
|
Age = 32,
|
|
Address = "Sidney No. 1 Lake Park, Sidney No. 1 Lake Park"
|
|
},
|
|
};
|
|
|
|
class Column
|
|
{
|
|
public string Name { get; set; }
|
|
|
|
public int Age { get; set; }
|
|
|
|
public string Address { get; set; }
|
|
}
|
|
|
|
} |