@GetSelectedBoolItemString()
@code { private IEnumerable NullableBoolItems { get; set; } = new SelectedItem[] { new SelectedItem() { Text = "空值", Value = "" }, new SelectedItem() { Text = "True 值", Value = "true" }, new SelectedItem() { Text = "False 值", Value = "false" } }; private bool? SelectedBoolItem = null; private string GetSelectedBoolItemString() { return SelectedBoolItem.HasValue ? SelectedBoolItem.Value.ToString() : "null"; } }