From 60c7cafb4ee4e48a216fce91538a1f170fcd45b3 Mon Sep 17 00:00:00 2001 From: Argo Date: Thu, 29 Jul 2021 01:34:59 +0000 Subject: [PATCH] =?UTF-8?q?!1642=20refactor(#I42VKX):=20remove=20obsolete?= =?UTF-8?q?=20method=20or=20parameters=20*=20chore:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20obsolete=20=E8=BF=87=E6=9C=9F=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Display/Display.razor.cs | 7 ------- src/BootstrapBlazor/Components/Menu/MenuItem.cs | 12 ------------ .../Components/Select/MultiSelect.razor.cs | 13 ------------- src/BootstrapBlazor/Components/Select/SelectBase.cs | 11 ----------- .../Components/Transfer/Transfer.razor.cs | 13 ------------- .../Options/BootstrapBlazorOptions.cs | 6 ------ 6 files changed, 62 deletions(-) diff --git a/src/BootstrapBlazor/Components/Display/Display.razor.cs b/src/BootstrapBlazor/Components/Display/Display.razor.cs index 27726a104..b41943a0b 100644 --- a/src/BootstrapBlazor/Components/Display/Display.razor.cs +++ b/src/BootstrapBlazor/Components/Display/Display.razor.cs @@ -39,13 +39,6 @@ namespace BootstrapBlazor.Components [Parameter] public string? FormatString { get; set; } - /// - /// 获得/设置 数据集用于 CheckboxList Select 组件 通过 Value 显示 Text 使用 默认 null - /// - [Parameter] - [Obsolete("请使用 Lookup 参数,下一个版本删除此参数")] - public IEnumerable? Data { get { return Lookup; } set { Lookup = value; } } - /// /// 获得/设置 数据集用于 CheckboxList Select 组件 通过 Value 显示 Text 使用 默认 null /// diff --git a/src/BootstrapBlazor/Components/Menu/MenuItem.cs b/src/BootstrapBlazor/Components/Menu/MenuItem.cs index 9d8523339..0a9f65d5a 100644 --- a/src/BootstrapBlazor/Components/Menu/MenuItem.cs +++ b/src/BootstrapBlazor/Components/Menu/MenuItem.cs @@ -93,18 +93,6 @@ namespace BootstrapBlazor.Components Icon = icon; } - /// - /// 添加 Menutem 方法 由 MenuItem 方法加载时调用 - /// - /// Menutem 实例 - [Obsolete("Items 属性移除只读直接赋值即可,下一个版本移除此方法")] - public virtual void AddItem(MenuItem item) - { - var items = Items.ToList(); - items.Add(item); - Items = items; - } - /// /// 设置当前节点缩进方法 /// diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs index d14e7129b..47403d6d2 100644 --- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs +++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs @@ -463,19 +463,6 @@ namespace BootstrapBlazor.Components } } - /// - /// 更改组件数据源方法 - /// - /// - [Obsolete("更改数据源 Items 参数即可,下一个版本移除此方法")] - public void SetItems(List? items) - { - Items = items; - ResetItems(); - - StateHasChanged(); - } - /// /// Dispose 方法 /// diff --git a/src/BootstrapBlazor/Components/Select/SelectBase.cs b/src/BootstrapBlazor/Components/Select/SelectBase.cs index a64465cb3..2cd2e9064 100644 --- a/src/BootstrapBlazor/Components/Select/SelectBase.cs +++ b/src/BootstrapBlazor/Components/Select/SelectBase.cs @@ -44,16 +44,5 @@ namespace BootstrapBlazor.Components /// [Parameter] public Func? OnSelectedItemChanged { get; set; } - - /// - /// 更改组件数据源方法 - /// - /// - [Obsolete("更改数据源 Items 参数即可,下一个版本移除此方法")] - public void SetItems(IEnumerable items) - { - Items = items; - StateHasChanged(); - } } } diff --git a/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs b/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs index 1e55e7568..259c779e7 100644 --- a/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs +++ b/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs @@ -301,19 +301,6 @@ namespace BootstrapBlazor.Components return Task.CompletedTask; } - /// - /// 更改组件数据源方法 - /// - /// - [Obsolete("更改数据源 Items 参数即可,下一个版本移除此方法")] - public void SetItems(List? items) - { - Items = items; - ResetItems(); - - StateHasChanged(); - } - private void ResetItems() { LeftItems.Clear(); diff --git a/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs b/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs index d32707f17..80f008386 100644 --- a/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs +++ b/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs @@ -30,12 +30,6 @@ namespace BootstrapBlazor.Components /// public int SwalDelay { get; set; } - /// - /// 获得/设置 回落默认语言文化 默认为 en 英文 - /// - [Obsolete("请使用 FallbackCulture 属性,此属性下一个版本移除")] - public string FallbackCultureName { get; set; } = "en"; - /// /// 获得/设置 回落默认语言文化 默认为 en 英文 ///