Skip to content

Commit 63f9624

Browse files
committed
refactor: 调整样式
1 parent 7ded048 commit 63f9624

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/BarCodeGenerator.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<div class="bc-qr-content">
6868
@if (!string.IsNullOrEmpty(_content))
6969
{
70-
<QRCode Content="@_content"></QRCode>
70+
<QRCode Content="@_content" Width="256"></QRCode>
7171
}
7272
</div>
7373
</div>

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/BarCodeGenerator.razor.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@
1717
background-color: var(--bb-primary-color);
1818
color: var(--bs-white);
1919
}
20+
21+
.bc-qr-content {
22+
border: 2px solid var(--bb-primary-color);
23+
border-radius: var(--bs-border-radius);
24+
padding: .25rem;
25+
display: flex;
26+
height: calc(256px + .5rem + 4px);
27+
width: calc(256px + .5rem + 4px);
28+
}

src/BootstrapBlazor.Server/Components/Samples/Tutorials/BarCodeGenerator/TextContent.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@ public class TextContent
1515
/// </summary>
1616
[Required]
1717
public string? Content { get; set; }
18+
19+
/// <summary>
20+
/// <inheritdoc/>
21+
/// </summary>
22+
/// <returns></returns>
23+
public override string? ToString() => Content;
1824
}

0 commit comments

Comments
 (0)