From 02f7ca63dc2dfdfdb513044ad1b3cdaae21cd2e9 Mon Sep 17 00:00:00 2001 From: jackfiled Date: Tue, 17 Oct 2023 00:01:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E5=8F=AF=E4=BB=A5=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/Shared/ChatZone.razor | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Frontend/Shared/ChatZone.razor b/Frontend/Shared/ChatZone.razor index 737df11..ca9dbe8 100644 --- a/Frontend/Shared/ChatZone.razor +++ b/Frontend/Shared/ChatZone.razor @@ -1,6 +1,7 @@ @using Frontend.Models @using Katheryne.Abstractions @inject IJSRuntime JsRuntime +@inject IMessageService MessageService
@@ -115,6 +116,12 @@ private void SetUsernameOkClicked() { + if (string.IsNullOrEmpty(_username)) + { + MessageService.Warning("昵称不能为空"); + return; + } + _setUsernameVisible = false; }