You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Blazor Web App中Radzen主题无法正常应用的问题求助

Blazor Web App中Radzen主题无法正常应用的问题求助

嘿各位大佬,我最近在做Blazor Web App项目,想给项目用上Radzen的Material主题,结果照着配置说明弄完之后,主题完全没生效,组件还是默认的样式,折腾好半天都没搞定,来这儿求大伙帮忙看看问题出在哪!

我把自己的App.razor代码贴在下面,麻烦各位帮忙排查下:

@using Radzen.Blazor
<Router AppAssembly="@typeof(App).Assembly">
    <Found Context="routeData">
        <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
        <FocusOnNavigate RouteData="@routeData" Selector="h1" />
    </Found>
    <NotFound>
        <PageTitle>Not found</PageTitle>
        <LayoutView Layout="@typeof(MainLayout)">
            <p role="alert">Sorry, there's nothing at this address.</p>
        </LayoutView>
    </NotFound>
</Router>
<head>
    <RadzenTheme Theme="material" @rendermode="RenderMode.InteractiveWebAssembly" />

    <link rel="stylesheet" href="_content/Radzen.Blazor/css/material3-base.css">

</head>

<script src="_content/Radzen.Blazor/Radzen.Blazor.js...

我已经按照要求引入了RadzenTheme组件、对应的Material3基础CSS文件,还有Radzen的JS文件(上面代码里JS部分没贴全,但实际项目里是完整引入的),可就是看不到主题的效果,有没有大佬遇到过类似的情况,或者能一眼看出我哪里配置错了呀?

备注:内容来源于stack exchange,提问作者ParSa

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 14:20:28