Localizer
+
+@Localizer["UniverIconTitle"]
+
+@Localizer["UniverIconDescription"]
+
+
+
+
+
+ - @Localizer["P1"]
+ - @Localizer["P2"]
+
+ @Localizer["P3"]
+
+
+<link href="_content/BootstrapBlazor.UniverIcon/BootstrapBlazor.UniverIcon.bundle.scp.css" rel="stylesheet">
+
+<UniverIcon Name="create-copy-single"></UniverIcon>
+
+@((MarkupString)Localizer["Icons"].Value)
+
+
+
+
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Icons/UniverIcons.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Icons/UniverIcons.razor.cs
new file mode 100644
index 00000000000..bc0b5ee7847
--- /dev/null
+++ b/src/BootstrapBlazor.Server/Components/Samples/Icons/UniverIcons.razor.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the Apache 2.0 License
+// See the LICENSE file in the project root for more information.
+// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
+
+namespace BootstrapBlazor.Server.Components.Samples.Icons;
+
+///
+/// OctIcons 图标示例
+///
+public partial class UniverIcons
+{
+
+}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Icons/_Imports.razor b/src/BootstrapBlazor.Server/Components/Samples/Icons/_Imports.razor
new file mode 100644
index 00000000000..78d0153ba00
--- /dev/null
+++ b/src/BootstrapBlazor.Server/Components/Samples/Icons/_Imports.razor
@@ -0,0 +1 @@
+@layout IconLayout
diff --git a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs
index 6d7b7c13b0c..2aa8b65d605 100644
--- a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs
+++ b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs
@@ -1583,6 +1583,12 @@ void AddIcons(DemoMenuItem item)
{
Text = Localizer["OctIcon"],
Url = "oct-icon"
+ },
+ new()
+ {
+ IsNew = true,
+ Text = Localizer["UniverIcon"],
+ Url = "univer-icon"
}
};
AddBadge(item);
diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json
index cb0e7190da5..7ea819a756b 100644
--- a/src/BootstrapBlazor.Server/Locales/en-US.json
+++ b/src/BootstrapBlazor.Server/Locales/en-US.json
@@ -4856,6 +4856,7 @@
"Affix": "Affix",
"Watermark": "Watermark",
"OctIcon": "Oct Icons",
+ "UniverIcons": "Univer Icons",
"Typed": "Typed",
"UniverSheet": "UniverSheet"
},
@@ -6781,6 +6782,15 @@
"P3": "Please copy the following code segement",
"Icons": "For icon list, please visit [portal]"
},
+ "BootstrapBlazor.Server.Components.Samples.Icons.UniverIcons": {
+ "UniverIconTitle": "Univer Svg Icon Lib",
+ "UniverIconDescription": "Icons used by Univer",
+ "CopiedTooltipText": "Copied",
+ "P1": "1. After referencing the extension package, add the package built-in style file to open the icon",
+ "P2": "2. Enable css isolation and automatically reference component styles after compilation",
+ "P3": "Please copy the following code segement",
+ "Icons": "For icon list, please visit [portal]"
+ },
"BootstrapBlazor.Server.Components.Samples.BootstrapBlazorIcons": {
"IconsTitle": "Icon",
"IconsDescription": "Supports font icons, vector SVG icons, and Image pictures",
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index e51327f430c..f9b2f8f63ca 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -4856,6 +4856,7 @@
"Affix": "固钉组件 Affix",
"Watermark": "水印组件 Watermark",
"OctIcon": "Oct Icons",
+ "UniverIcon": "Univer Icons",
"Typed": "打字机效果 Typed",
"UniverSheet": "表格组件 UniverSheet"
},
@@ -6781,6 +6782,15 @@
"P3": "请拷贝下方样式即可",
"Icons": "图标列表请通过 [传送门] 查看"
},
+ "BootstrapBlazor.Server.Components.Samples.Icons.UniverIcons": {
+ "UniverIconTitle": "Univer Icon 图标库",
+ "UniverIconDescription": "Icons used by Univer",
+ "CopiedTooltipText": "拷贝成功",
+ "P1": "1. 引用扩展组件包后添加包内置样式文件开启图标",
+ "P2": "2. 开启样式隔离,编译后自动引用组件样式",
+ "P3": "请拷贝下方样式即可",
+ "Icons": "图标列表请通过 [传送门] 查看"
+ },
"BootstrapBlazor.Server.Components.Samples.BootstrapBlazorIcons": {
"IconsTitle": "Icon 图标",
"IconsDescription": "同时支持字体图标、矢量 Svg 图标、以及 Image 图片",
diff --git a/src/BootstrapBlazor.Server/wwwroot/css/site.css b/src/BootstrapBlazor.Server/wwwroot/css/site.css
index 506736640e9..563c14b7302 100644
--- a/src/BootstrapBlazor.Server/wwwroot/css/site.css
+++ b/src/BootstrapBlazor.Server/wwwroot/css/site.css
@@ -369,3 +369,24 @@ code {
--bd-callout-code-color: #e685b5;
--bd-pre-bg: #1b1f22;
}
+
+.icon-list {
+ margin-top: 1rem;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+}
+
+ .icon-list > div {
+ padding: 1rem 30px;
+ border: 1px solid var(--bs-border-color);
+ border-radius: var(--bs-border-radius);
+ margin: 0.25rem;
+ cursor: pointer;
+ transition: background-color .3s linear;
+ }
+
+ .icon-list > div:hover {
+ background-color: var(--bb-primary-color);
+ color: #fff;
+ }
diff --git a/test/UnitTest/Services/BootstrapBlazorRootRegisterServiceTest.cs b/test/UnitTest/Services/BootstrapBlazorRootRegisterServiceTest.cs
index a8c6b900b17..f8b68e81b63 100644
--- a/test/UnitTest/Services/BootstrapBlazorRootRegisterServiceTest.cs
+++ b/test/UnitTest/Services/BootstrapBlazorRootRegisterServiceTest.cs
@@ -28,6 +28,7 @@ public void Subscribe_Ok()
var service = new BootstrapBlazorRootRegisterService();
var identifier = new object();
service.Subscribe(identifier, new BootstrapBlazorRootOutlet());
+ service.Subscribe(identifier, new BootstrapBlazorRootOutlet());
service.Unsubscribe(new object());
}