English | 简体中文
Install-Package AntDesign.Pro.Layout
// or
dotnet add package AntDesign.Pro.Layout
builder.Services.AddAntDesign();
builder.Services.Configure<ProSettings>(x =>
{
x.Title = "Ant Design Pro";
x.NavTheme = "light";
x.Layout = "mix";
x.PrimaryColor = "daybreak";
x.ContentWidth = "Fluid";
x.HeaderHeight = 64;
});
- 此外也可以通过appsettings.json来配置
builder.Services.AddAntDesign();
builder.Services.Configure<ProSettings>(builder.Configuration.GetSection("ProSettings"));
{
"ProSettings": {
"NavTheme": "light",
"Layout": "mix",
"ContentWidth": "Fluid",
"FixedHeader": false,
"FixSiderbar": true,
"Title": "Ant Design Pro",
"PrimaryColor": "daybreak",
"ColorWeak": false,
"SplitMenus": false,
"HeaderRender": true,
"FooterRender": true,
"MenuRender": true,
"MenuHeaderRender": true,
"HeaderHeight": 64
}
}
- 在 wwwroot/index.html(WebAssembly) 或 Pages/_Host.cshtml(Server) 中引入静态文件:
<link rel="stylesheet" href="_content/AntDesign.ProLayout/css/ant-design-pro-layout-blazor.css" />
如果您在使用的过程中碰到问题,可以通过以下途径寻求帮助,同时我们也鼓励资深用户通过下面的途径给新人提供帮助。
本项目采用了《贡献者公约》所定义的行为准则,以明确我们社区的预期行为。 更多信息请见 .NET Foundation Code of Conduct.
本项目由 .NET Foundation 支持。