ant-design-blazor/site/AntDesign.Docs/Demos/Components/Table/demo/Ellipsis.razor
2021-02-06 20:15:46 +08:00

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; }
}
}