Skip to content

Commit 44be1cb

Browse files
committed
refactor: 微调样式
1 parent 34a88ef commit 44be1cb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ public partial class AvatarUpload<TValue>
9797
}
9898

9999
var state = item?.IsValid ?? IsValid;
100-
return state is true ? "is-valid" : "is-invalid";
100+
if (state == null)
101+
{
102+
return null;
103+
}
104+
105+
return state.Value ? "is-valid" : "is-invalid";
101106
}
102107

103108
/// <summary>

0 commit comments

Comments
 (0)