English | 中文
This project is part of the .NET Foundation and operates under their code of conduct.
dotnet add package BootstrapBlazor
_Imports.razor
@using BootstrapBlazor.Components
MainLayout.razor
<BootstrapBlazorRoot>
@Body
</BootstrapBlazorRoot>
it's either index.html or _Layout.cshtml/_Host.cshtml/App.razor depending on whether you're running WebAssembly or Server
<link rel="stylesheet" href="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css" />
<script src="_content/BootstrapBlazor/js/bootstrap.blazor.bundle.min.js"></script>
Program.cs
builder.Services.AddBootstrapBlazor();
<Display Value="@_text"></Display>
<Button Text="Button" OnClick="@ClickButton"></Button>
@code {
private string? _text;
private void ClickButton(MouseEventArgs e)
{
_text = DateTime.Now.ToString();
}
}
dotnet new install Bootstrap.Blazor.Templates::*
dotnet new bbapp
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.
If this project is helpful to you, please scan the QR code below for a cup of coffee.
Thanks to JetBrains for providing free open source license
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Комментарии ( 0 )