From 0ab141bfe61fbe5dad889d4a5541e8ce96072099 Mon Sep 17 00:00:00 2001
From: Diego <2248356998@qq.com>
Date: Wed, 15 Jan 2025 21:23:31 +0800
Subject: [PATCH 1/3] =?UTF-8?q?docs(ContextMenus):=20=E8=A1=A5=E5=85=85?=
=?UTF-8?q?=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Components/Samples/ContextMenus.razor | 11 +++++++++--
.../Components/Samples/ContextMenus.razor.cs | 7 +++++++
src/BootstrapBlazor.Server/Locales/en-US.json | 2 +-
src/BootstrapBlazor.Server/Locales/zh-CN.json | 2 +-
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor
index 9a6b8934c1a..4af42e3448f 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor
@@ -58,8 +58,15 @@
-
-
+ @if (SelectModel?.Id == "1020")
+ {
+
+
+ }
+ else
+ {
+
+ }
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs
index 92e164927fa..72e358e2939 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs
@@ -41,15 +41,22 @@ protected override void OnInitialized()
Items = Foo.GenerateFoo(LocalizerFoo);
}
+ TreeFoo? SelectModel = default;
private Task OnBeforeShowCallback(object? item)
{
if (item is TreeFoo foo)
{
_callbackLogger.Log($"{foo.Text} trigger");
+ SelectModel = foo;
}
return Task.CompletedTask;
}
+
+ Task OnCopySub(ContextMenuItem item, object value)
+ {
+ return Task.CompletedTask;
+ }
private bool OnDisabledCallback(ContextMenuItem item, object? context)
{
var ret = false;
diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json
index 3296cc0bd3d..98192d24d3b 100644
--- a/src/BootstrapBlazor.Server/Locales/en-US.json
+++ b/src/BootstrapBlazor.Server/Locales/en-US.json
@@ -6087,7 +6087,7 @@
"ContextMenuTreeTitle": "Tree",
"ContextMenuTreeIntro": "Right click on the Tree to pop up a context menu",
"ContextMenuCallbackTitle": "ContextMenu Callback",
- "ContextMenuCallbackIntro": "By setting the ContextMenu component parameter OnBeforeShowCallback, you can get the callback event before the right-click menu pops up, which can be used for data preparation",
+ "ContextMenuCallbackIntro": "By setting the ContextMenu component parameter OnBeforeShowCallback, you can get the callback event before the right-click menu pops up, which can be used for data preparation or render menus based on conditions",
"ContextMenuDisabledTitle": "OnDisabledCallback",
"ContextMenuDisabledIntro": "By setting the ContextMenuItem component parameter OnDisabledCallback callback method, you can set whether the current right-click option is disabled."
},
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index bf20ae8ebef..4777c6c5f1a 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -6087,7 +6087,7 @@
"ContextMenuTreeTitle": "Tree 组件",
"ContextMenuTreeIntro": "点击 Tree 组件行数据右键,弹出上下文关联菜单",
"ContextMenuCallbackTitle": "ContextMenu 回调",
- "ContextMenuCallbackIntro": "通过设置 ContextMenu 组件参数 OnBeforeShowCallback 获得右键菜单弹出前回调事件,可用于数据准备工作",
+ "ContextMenuCallbackIntro": "通过设置 ContextMenu 组件参数 OnBeforeShowCallback 获得右键菜单弹出前回调事件,可用于数据准备工作,也可按需渲染菜单",
"ContextMenuDisabledTitle": "禁止回调方法",
"ContextMenuDisabledIntro": "通过设置 ContextMenuItem 组件参数 OnDisabledCallback 回调方法可用于设置当前右键选项是否禁用逻辑"
},
From f4b46123f17c40d019d817d4a52b50dd90dde70a Mon Sep 17 00:00:00 2001
From: Argo Zhang
Date: Thu, 16 Jan 2025 11:42:10 +0800
Subject: [PATCH 2/3] chore: bump version 9.2.8-beta04
---
src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj
index 665f76f8512..9fe8e475fcc 100644
--- a/src/BootstrapBlazor/BootstrapBlazor.csproj
+++ b/src/BootstrapBlazor/BootstrapBlazor.csproj
@@ -1,7 +1,7 @@
- 9.2.8-beta02
+ 9.2.8-beta04
From 17797a9e088defbc06ca47f027f054d881306ffc Mon Sep 17 00:00:00 2001
From: Argo Zhang
Date: Thu, 16 Jan 2025 11:44:09 +0800
Subject: [PATCH 3/3] chore: bump version 9.2.8-beta03
---
src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj
index 7d583993fd3..727ddeb2df1 100644
--- a/src/BootstrapBlazor/BootstrapBlazor.csproj
+++ b/src/BootstrapBlazor/BootstrapBlazor.csproj
@@ -1,7 +1,7 @@
- 9.2.8-beta01
+ 9.2.8-beta03