fix: 修复了昵称可以为空的问题

This commit is contained in:
jackfiled 2023-10-17 00:01:15 +08:00
parent a7e784ba65
commit 02f7ca63dc

View File

@ -1,6 +1,7 @@
@using Frontend.Models @using Frontend.Models
@using Katheryne.Abstractions @using Katheryne.Abstractions
@inject IJSRuntime JsRuntime @inject IJSRuntime JsRuntime
@inject IMessageService MessageService
<div class="content-zone"> <div class="content-zone">
<div class="chat-zone" id="chat-scroll-zone"> <div class="chat-zone" id="chat-scroll-zone">
@ -115,6 +116,12 @@
private void SetUsernameOkClicked() private void SetUsernameOkClicked()
{ {
if (string.IsNullOrEmpty(_username))
{
MessageService.Warning("昵称不能为空");
return;
}
_setUsernameVisible = false; _setUsernameVisible = false;
} }