ant-design-blazor / demo-reuse-tabs

A reuse tabs demo for Ant Design Blazor
https://ant-design-blazor.github.io/demo-reuse-tabs/
35 stars 3 forks source link

'AntDesign.ProLayout.BasicLayout' does not have a property matching the name 'Body'. #10

Closed FreddyFox1 closed 2 days ago

FreddyFox1 commented 2 days ago

Solution from README doesnt work for me. I got this error message. Can help me some one ? изображение_2024-11-16_225657035

Code of my BasicLayout:

<AuthorizeView>
    <Authorized>
        <AntDesign.ProLayout.BasicLayout
            Logo="@("assets/logo.svg")"
            MenuData="_menuData"
            Collapsed="@false">
            <HeaderContentRender>
                <Space Size="@("24")">
                    <SpaceItem>
                        <Icon Class="action" Type="reload" Theme="outline" OnClick="Reload"/>
                    </SpaceItem>
                </Space>
            </HeaderContentRender>
            <RightContentRender>
            </RightContentRender>
            <ChildContent>
                <ReuseTabs />
            </ChildContent>
            <FooterRender>
                <FooterView Copyright="2024 Ant Design Blazor"></FooterView>
            </FooterRender>
        </AntDesign.ProLayout.BasicLayout>

        <SettingDrawer/>
    </Authorized>
    <NotAuthorized>
        <RedirectToLogin/>
    </NotAuthorized>
</AuthorizeView>

App.razor:

@inject IdentityInfoService Identity;
@using Bars.Training.Web.Models
@using Bars.Training.Web.Services
<CascadingAuthenticationState>
    <Router AppAssembly="@typeof(Program).Assembly">
        <Found Context="routeData">
            <CascadingValue Value="routeData">
                <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(BasicLayout)"/>
            </CascadingValue>
        </Found>
        <NotFound>
            <LayoutView Layout="@typeof(BasicLayout)">
                <p>Sorry, there's nothing at this address.</p>
            </LayoutView>
        </NotFound>
    </Router>
</CascadingAuthenticationState>

@code {
    [Parameter] public InitialApplicationState InitialState { get; set; }

    protected override async Task OnInitializedAsync()
    {
        Identity.UserName = InitialState.UserName;
        Identity.IsAuthenticated = InitialState.IsAuthenticated;
    }
}