diff --git a/src/BootstrapBlazor.Shared/Pages/Components/DialogBodyFoo.razor b/src/BootstrapBlazor.Shared/Pages/Components/DialogBodyFoo.razor new file mode 100644 index 0000000000000000000000000000000000000000..88d39b6febd57e014cb525b336887c110a7d9140 --- /dev/null +++ b/src/BootstrapBlazor.Shared/Pages/Components/DialogBodyFoo.razor @@ -0,0 +1 @@ +改变标题栏中下拉框此处会更改: @Value diff --git a/src/BootstrapBlazor.Shared/Pages/Components/DialogBodyFoo.razor.cs b/src/BootstrapBlazor.Shared/Pages/Components/DialogBodyFoo.razor.cs new file mode 100644 index 0000000000000000000000000000000000000000..52592c29503d1b4d01563b0093cbeed1108e2a39 --- /dev/null +++ b/src/BootstrapBlazor.Shared/Pages/Components/DialogBodyFoo.razor.cs @@ -0,0 +1,32 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using BootstrapBlazor.Components; + +namespace BootstrapBlazor.Shared.Pages.Components +{ + /// + /// + /// + public partial class DialogBodyFoo + { + private string? Value { get; set; } + + private List Items { get; } = new(new[] + { + new SelectedItem("beijing", "北京"), + new SelectedItem("shanghai", "上海") + }); + + /// + /// + /// + public Task UpdateAsync(string val) + { + Value = Items.First(i => i.Value == val).Text; + StateHasChanged(); + return Task.CompletedTask; + } + } +} diff --git a/src/BootstrapBlazor.Shared/Pages/Components/DialogHeaderFoo.razor b/src/BootstrapBlazor.Shared/Pages/Components/DialogHeaderFoo.razor new file mode 100644 index 0000000000000000000000000000000000000000..16d9ccccf1876463f2d143155ec133f64df2052d --- /dev/null +++ b/src/BootstrapBlazor.Shared/Pages/Components/DialogHeaderFoo.razor @@ -0,0 +1,4 @@ + +
+