Order.razor 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. @page "/app/order"
  2. @attribute [ReuseTabsPage(Title = "订单管理")]
  3. <Spin Spinning="Loading">
  4. <Table @ref="_Table" AutoHeight TItem="SystemMenu" DataSource="_DataSource" @bind-PageSize="Ps" @bind-PageIndex="Pi"
  5. TreeChildren="item=>item.Children" @bind-SelectedRows="_SelectedRows" OnChange="OnChange">
  6. <ColumnDefinitions Context="row">
  7. <PropertyColumn Property="c => c.Name" Title="菜单名称" />
  8. <PropertyColumn Property="c => c.Path" Title="路由" />
  9. <PropertyColumn Property="c=>c.Necessary">
  10. @{
  11. var tag = row.Necessary ? "必需" : "非必需";
  12. var color = row.Necessary ? TagColor.Green : TagColor.Blue;
  13. }
  14. <Tag Color="@color">@tag</Tag>
  15. </PropertyColumn>
  16. <PropertyColumn Property="c => c.Key" Title="自定义唯一键值" />
  17. <PropertyColumn Property="c => c.Icon" Title="图标">
  18. @{
  19. var type = row.Icon;
  20. }
  21. <Icon Type="@type" Theme="IconThemeType.Outline" />
  22. </PropertyColumn>
  23. <PropertyColumn Property="c => c.Sort" Title="排序" />
  24. </ColumnDefinitions>
  25. <PaginationTemplate>
  26. <Pagination Class="@(context.PaginationClass + " my-custom-pagination")"
  27. Total="context.Total"
  28. PageSize="context.PageSize"
  29. Current="context.PageIndex"
  30. ShowSizeChanger
  31. OnChange="context.HandlePageChange" />
  32. </PaginationTemplate>
  33. </Table>
  34. </Spin>