Skip to content

TableColumn 模板上下文问题 #6295

Answered by ArgoZhang
shakugans asked this question in Q&A
Discussion options

You must be logged in to vote

@shakugans

<TableColumn @bind-Field="@context.parentid" Text="父菜单">
    <Template Context="v">
        @if (true)
        {
            <div style="color: red;">
                @getParent(context.parentid)
            </div>
        }
    </Template>
</TableColumn>
<TableColumn @bind-Field="@context.id" Text="ID">
    <Template Context="v">
        @if (true)
        {
            <div style="color: red;">
                @getParent(context.id)
            </div>
        }
    </Template>
</TableColumn>

使用 v.Row 的对应参数才对

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ArgoZhang
Comment options

Answer selected by shakugans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Question that needs to be answered
2 participants
Converted from issue

This discussion was converted from issue #6292 on June 24, 2025 10:50.