fix(Topology): missing background cause value is null (#3822)

* feat: 增加 null 忽略标签

* chore: bump version 8.0.8
This commit is contained in:
Argo Zhang 2024-07-09 14:30:24 +08:00 committed by GitHub
parent a0de191cff
commit f09c8d5d05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>8.0.7</Version>
<Version>8.0.8</Version>
</PropertyGroup>
<PropertyGroup>

View File

@ -2,6 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Website: https://www.blazor.zone or https://argozhang.github.io/
using System.Text.Json.Serialization;
namespace BootstrapBlazor.Components;
/// <summary>
@ -22,6 +24,7 @@ public class TopologyItem
/// <summary>
/// 获得/设置 显示文字
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Text { get; set; }
/// <summary>
@ -32,11 +35,13 @@ public class TopologyItem
/// <summary>
/// 获得/设置 显示文字颜色
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? TextColor { get; set; }
/// <summary>
/// 获得/设置 背景颜色
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Background { get; set; }
/// <summary>