Skip to content

feat(Table): Support 查詢結果Dto,新增Dto 及 更新 Dto #4264

@rainmakerho

Description

@rainmakerho

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Table 可設定 TItem ,目前為 查詢結果Dto ,
如果 新增、更新有各別的 Dto 時,
不知如何設定呢?

Describe the solution you'd like

建議擴充可設定 查詢結果Dto,新增Dto 及 更新 Dto。

<Table TItem="BookDto" CreItem="CreateBookDto" UpdItem="UpdateBookDto" 
OnQueryAsync="@OnQueryAsync"
       IsStriped="true" IsBordered="true" IsPagination="true"
       ClickToSelect="true" ShowToolbar="true" ShowEditButton="true"
       OnEditAsync="@OpenEditModalAsync">
    <TableColumns>
        <TableColumn @bind-Field="@context.Name" Text="@L["Name"]" />
        <TableColumn @bind-Field="@context.Type" Text="@L["Type"]">
            <Template Context="value">
                @L[$"Enum:BookType.{(int)value.Value}"]

            </Template>
        </TableColumn>
        <TableColumn @bind-Field="@context.Price" Text="@L["Price"]" />
        <TableColumn @bind-Field="@context.PublishDate" Text="@L["PublishDate"]" />
        <TableColumn @bind-Field="@context.LastModificationTime" Text="@L["LastModificationTime"]" />
    </TableColumns>
</Table>

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions