Skip to content

Commit 89d99dc

Browse files
committed
doc: 增加 Smarts 示例
1 parent 165502b commit 89d99dc

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

src/BootstrapBlazor.Server/Components/Samples/RDKits.razor

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,15 @@
1616
<DemoBlock Title="@Localizer["RDKitSmartsTitle"]"
1717
Introduction="@Localizer["RDKitSmartsIntro"]"
1818
Name="Smarts">
19-
<RDKit Value="CC(=O)Oc1ccccc1C(=O)O" Smarts="Oc1[c,n]cccc1"></RDKit>
19+
<section ignore>
20+
<div class="row g-3">
21+
<div class="col-12 col-sm-6">
22+
<BootstrapInputGroup>
23+
<BootstrapInputGroupLabel DisplayText="@Localizer["RDKitSmartsLabel"]" />
24+
<Checkbox @bind-Value="_showSmarts"></Checkbox>
25+
</BootstrapInputGroup>
26+
</div>
27+
</div>
28+
</section>
29+
<RDKit Value="CC(=O)Oc1ccccc1C(=O)O" Smarts="@Smarts"></RDKit>
2030
</DemoBlock>

src/BootstrapBlazor.Server/Components/Samples/RDKits.razor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ namespace BootstrapBlazor.Server.Components.Samples;
1010
/// </summary>
1111
public partial class RDKits
1212
{
13+
private string? Smarts => _showSmarts ? "Oc1[c,n]cccc1" : "";
1314

15+
private bool _showSmarts;
1416
}

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6845,6 +6845,7 @@
68456845
"RDKitNormalTitle": "Basic usage",
68466846
"RDKitNormalIntro": "Set the molecular formula through <code>Value</code> and draw the component",
68476847
"RDKitSmartsTitle": "Smarts",
6848-
"RDKitSmartsIntro": "By setting the <code>Smarts</code> value, parts of the molecular formula can be highlighted"
6848+
"RDKitSmartsIntro": "By setting the <code>Smarts</code> value, parts of the molecular formula can be highlighted",
6849+
"RDKitSmartsLabel": "Show Smarts"
68496850
}
68506851
}

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6845,6 +6845,7 @@
68456845
"RDKitNormalTitle": "基础用法",
68466846
"RDKitNormalIntro": "通过 <code>Value</code> 设置分子式,组件画图",
68476847
"RDKitSmartsTitle": "Smarts",
6848-
"RDKitSmartsIntro": "通过设置 <code>Smarts</code> 值,高亮显示部分分子式"
6848+
"RDKitSmartsIntro": "通过设置 <code>Smarts</code> 值,高亮显示部分分子式",
6849+
"RDKitSmartsLabel": "显示 Smarts"
68496850
}
68506851
}

0 commit comments

Comments
 (0)